Skip to content

contrib: rav1e: fix parallel build (fixes #26518)

Rémi Denis-Courmont requested to merge Courmisch/vlc:ravie into master

Newer versions of GNU/make mark the job server pipe file descriptors with the close-on-exec flag. This prevents the file descriptors from being leaked into other programs executed by the children processes of GNU/make.

But of course, the flip side is that the file descriptors are closed even if the program is also a make-like tool that wants to participate in the job counting and access the job server.

To support recursive make, GNU/make will clear the close-on-exec flag in a child process that is about to execute a command containing the substring "$(MAKE)".

In this particular case, the command is $(CARGO_VENDOR_SETUP), not $(MAKE), so this does not work... unless we append an otherwise gratuitious occurence of the substring. This is what this patch does.

Merge request reports