The attached patch fixes a problem when building for Mingw-w64 using
binutils-2.36.1:

x86_64-w64-mingw32-windres -I. -Isrc/ --preprocessor
"x86_64-w64-mingw32-gcc -E -xc-header -DRC_INVOKED -MMD -MF
libavdevice/avdeviceres.d -MT libavdevice/avdeviceres.o" -o
libavdevice/avdeviceres.o
/usr/x86_64-w64-mingw32/tmp/portage/media-video/ffmpeg-4.3.2/work/ffmpeg-4.3.2/libavdevice/avdeviceres.rc
sh: line 1: x86_64-w64-mingw32-gcc -E -xc-header -DRC_INVOKED -MMD -MF
libavdevice/avdeviceres.d -MT libavdevice/avdeviceres.o: No such file
or directory
x86_64-w64-mingw32-windres: preprocessing failed.
make: *** 
[/usr/x86_64-w64-mingw32/tmp/portage/media-video/ffmpeg-4.3.2/work/ffmpeg-4.3.2/ffbuild/common.mak:85:
libavdevice/avdeviceres.o] Error 1
diff --git a/ffbuild/common.mak b/ffbuild/common.mak
index 32f5b997b5..3e545ab9cd 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) --preprocessor "$(DEPWINDRES)" $(patsubst %,--preprocessor-arg %,-E -xc-header -DRC_INVOKED $(CC_DEPFLAGS)) -o $@ $<
 
 %.i: %.c
 	$(CC) $(CCFLAGS) $(CC_E) $<
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to