summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <[email protected]>2021-05-15 00:42:38 +0300
committerMartin Storsjö <[email protected]>2021-06-24 23:25:30 +0300
commit031c0cb0b4f3cd79e7bc8245db0fdee1239623b3 (patch)
tree21095247a3a03537fabacf20893c48009a8a6bf8
parent3f06be77acc85d9918b28027ce7b74fe392ddf93 (diff)
ffbuild: Avoid using the --preprocessor argument to windres
Instead use --preprocessor-arg; in binutils 2.36, the --preprocessor flag was changed so that it no longer accepts a string containing multiple arguments, but the whole --preprocessor argument is treated as the path to the preprocessor executable (where the path can contain spaces). It's currently unclear whether this behaviour will stay or if it is going to be reverted in the future, see discussion at [1]. Just to be safe, avoid using the --preprocessor argument. Don't redeclare the full preprocessing command, but just add the $(CC_DEPFLAGS) options. Based on a patch by Kyle Schwartz. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=27594 Signed-off-by: Martin Storsjö <[email protected]> (cherry picked from commit f9626d1065c43f1d51afe66bdf988b9f33729440)
-rwxr-xr-xconfigure1
-rw-r--r--ffbuild/common.mak2
2 files changed, 1 insertions, 2 deletions
diff --git a/configure b/configure
index 658db349f4..4ba72bf84b 100755
--- a/configure
+++ b/configure
@@ -7502,7 +7502,6 @@ LD_LIB=$LD_LIB
LD_PATH=$LD_PATH
DLLTOOL=$dlltool
WINDRES=$windres
-DEPWINDRES=$dep_cc
DOXYGEN=$doxygen
LDFLAGS=$LDFLAGS
LDEXEFLAGS=$LDEXEFLAGS
diff --git a/ffbuild/common.mak b/ffbuild/common.mak
index e070b6b5e2..164a43932d 100644
--- a/ffbuild/common.mak
+++ b/ffbuild/common.mak
@@ -90,7 +90,7 @@ COMPILE_MSA = $(call COMPILE,CC,MSAFLAGS)
-$(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@)
%.o: %.rc
- $(WINDRES) $(IFLAGS) --preprocessor "$(DEPWINDRES) -E -xc-header -DRC_INVOKED $(CC_DEPFLAGS)" -o $@ $<
+ $(WINDRES) $(IFLAGS) $(foreach ARG,$(CC_DEPFLAGS),--preprocessor-arg "$(ARG)") -o $@ $<
%.i: %.c
$(CC) $(CCFLAGS) $(CC_E) $<