commit 7ca345cd4dd8c4dd57a3267fdfe0bf9c08bd5854
Author: Enrico Forestieri <[email protected]>
Date: Wed Oct 22 22:15:16 2025 +0200
Fix windres invocation on Windows.
A relatively recent change to windres sources introduced a
regression that breaks many build scripts. Essentially, when
specifying the argument --preprocessor="gcc -E -xc-header -DRC_INVOKED"
this is now taken to literally mean the program with that exact name.
This regression has been reported:
https://sourceware.org/bugzilla/show_bug.cgi?id=27594
but is still not addressed. So, adapt the windres invocation to
the new paradigm.
Patch by Marco Atzeri, slightly modified by me to adapt it to
cross-compilations.
(cherry picked from commit 63f2e83fc0d683488a959b4fdd5f8c06df58235a)
---
development/cygwin/Makefile.am | 2 +-
src/Makefile.am | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/development/cygwin/Makefile.am b/development/cygwin/Makefile.am
index 78358c5e9d..7e74f67b96 100644
--- a/development/cygwin/Makefile.am
+++ b/development/cygwin/Makefile.am
@@ -5,7 +5,7 @@ include $(top_srcdir)/config/common.am
.rc.o:
cp $(top_srcdir)/development/Win32/packaging/icons/lyx_*32x32.ico .
- windres -I$(top_builddir) --preprocessor "$(CPP) -xc-header
-DRC_INVOKED" $< -o $@
+ windres -I$(top_builddir) --preprocessor="$(CC)"
--preprocessor-arg="-E" --preprocessor-arg="-xc-header"
--preprocessor-arg="-DRC_INVOKED" $< -o $@
bin_PROGRAMS = lyxeditor lyxwin
bin_SCRIPTS = lyxeditor.sh
diff --git a/src/Makefile.am b/src/Makefile.am
index 3bbcae30fb..f17958e734 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -43,7 +43,7 @@ if LYX_WIN_RESOURCE
.rc.o:
cp $(top_srcdir)/development/Win32/packaging/icons/lyx.ico .
cp $(top_srcdir)/development/Win32/packaging/icons/lyx_doc.ico .
- $(RC) -I$(top_builddir) --preprocessor "$(CPP) -xc-header -DRC_INVOKED"
$< -o $@
+ $(RC) -I$(top_builddir) --preprocessor="$(CC)" --preprocessor-arg="-E"
--preprocessor-arg="-xc-header" --preprocessor-arg="-DRC_INVOKED" $< -o $@
endif
if INSTALL_MACOSX
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs