From 0073b54f8eb3b40cf5929beb4b1f82001d534102 Mon Sep 17 00:00:00 2001 From: flederwiesel Date: Sun, 2 Feb 2020 00:13:55 +0100 Subject: [PATCH] Pass CPPFLAGS to cpp when generating rcdefs.h Honour user-defined CPPFLAGS when creating rcdefs.h, this notably fixes generating the file with wrong architecture when cross-compiling from 64 to 32 bits with CPPFLAGS=-m32. Closes #17844. --- build/bakefiles/wx.bkl | 2 +- build/msw/makefile.bcc | 2 +- build/msw/makefile.gcc | 2 +- build/msw/makefile.vc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/bakefiles/wx.bkl b/build/bakefiles/wx.bkl index 9c7b419b40..fe5f922871 100644 --- a/build/bakefiles/wx.bkl +++ b/build/bakefiles/wx.bkl @@ -205,7 +205,7 @@ $(SRCDIR)/include/wx/msw/genrcdefs.h - $(DOLLAR)(CPP) "$(nativePaths(SRCDIR))\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h" + $(DOLLAR)(CPP) $(DOLLAR)(CPPFLAGS) "$(nativePaths(SRCDIR))\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h" diff --git a/build/msw/makefile.bcc b/build/msw/makefile.bcc index fefb2ee256..a7690d7647 100644 --- a/build/msw/makefile.bcc +++ b/build/msw/makefile.bcc @@ -5580,7 +5580,7 @@ $(SETUPHDIR)\wx\msw: $(SETUPHDIR)\wx if not exist $(SETUPHDIR)\wx\msw mkdir $(SETUPHDIR)\wx\msw $(SETUPHDIR)\wx\msw\rcdefs.h: $(SETUPHDIR)\wx\msw ..\..\include\wx\msw\genrcdefs.h - $(CPP) "..\..\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h" + $(CPP) $(CPPFLAGS) "..\..\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h" build_cfg_file: $(SETUPHDIR) @echo WXVER_MAJOR=3 >$(BUILD_CFG_FILE) diff --git a/build/msw/makefile.gcc b/build/msw/makefile.gcc index c1c27dcc5f..908cae4338 100644 --- a/build/msw/makefile.gcc +++ b/build/msw/makefile.gcc @@ -5885,7 +5885,7 @@ $(SETUPHDIR)\wx\msw: $(SETUPHDIR)\wx if not exist $(SETUPHDIR)\wx\msw mkdir $(SETUPHDIR)\wx\msw $(SETUPHDIR)\wx\msw\rcdefs.h: $(SETUPHDIR)\wx\msw ..\..\include\wx\msw\genrcdefs.h - $(CPP) "..\..\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h" + $(CPP) $(CPPFLAGS) "..\..\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h" build_cfg_file: $(SETUPHDIR) @echo WXVER_MAJOR=3 >$(BUILD_CFG_FILE) diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc index 8f828728ba..c679224f48 100644 --- a/build/msw/makefile.vc +++ b/build/msw/makefile.vc @@ -6331,7 +6331,7 @@ $(SETUPHDIR)\wx\msw: $(SETUPHDIR)\wx if not exist $(SETUPHDIR)\wx\msw mkdir $(SETUPHDIR)\wx\msw $(SETUPHDIR)\wx\msw\rcdefs.h: $(SETUPHDIR)\wx\msw ..\..\include\wx\msw\genrcdefs.h - $(CPP) "..\..\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h" + $(CPP) $(CPPFLAGS) "..\..\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h" build_cfg_file: $(SETUPHDIR) @echo WXVER_MAJOR=3 >$(BUILD_CFG_FILE)