On Sun, 16 Mar 2025, Jacek Caban wrote:
Allows using additional macros like __arm64ec__ or __SIZEOF_LONG_DOUBLE__. ---
Commit message typo, "standart"
mingw-w64-crt/Makefile.am | 16 +++++------ mingw-w64-crt/def-include/crt-aliases.def.in | 2 +- mingw-w64-crt/def-include/func.def.in | 10 +++---- .../api-ms-win-crt-math-l1-1-0.def.in | 6 ++-- mingw-w64-crt/lib-common/msvcr120_app.def.in | 6 ++-- mingw-w64-crt/lib-common/msvcrt.def.in | 24 ++++++++-------- mingw-w64-crt/lib-common/ntdll.def.in | 28 +++++++++---------- mingw-w64-crt/lib-common/ntdllcrt.def.in | 8 +++--- .../lib-common/ucrtbase-common.def.in | 4 +-- 9 files changed, 52 insertions(+), 52 deletions(-) diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am index 15642b3ff..217c0325f 100644 --- a/mingw-w64-crt/Makefile.am +++ b/mingw-w64-crt/Makefile.am @@ -4167,28 +4167,28 @@ endif $(RANLIB) $@ lib32/%.def: lib32/%.def.in - $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P -I$(top_srcdir)/def-include -DDEF_I386 > $@ + $(MKDIR_P) $(@D) && $(CPP) -x c $(CPPFLAGS32) $< -Wp,-w -P -I$(top_srcdir)/def-include > $@ lib64/%.def: lib64/%.def.in - $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P -I$(top_srcdir)/def-include -DDEF_X64 > $@ + $(MKDIR_P) $(@D) && $(CPP) -x c $(CPPFLAGS64) $< -Wp,-w -P -I$(top_srcdir)/def-include > $@ libarm32/%.def: libarm32/%.def.in - $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P -I$(top_srcdir)/def-include -DDEF_ARM32 > $@ + $(MKDIR_P) $(@D) && $(CPP) -x c $(CPPFLAGSARM32) $< -Wp,-w -P -I$(top_srcdir)/def-include > $@ libarm64/%.def: libarm64/%.def.in - $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P -I$(top_srcdir)/def-include -DDEF_ARM64 > $@ + $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -P -I$(top_srcdir)/def-include -DDEF_ARM64 > $@
Why doesn't this use CPPFLAGSARM64, for consistency? We do reference that variable in a number of places, even though we never really set it.
lib32/%.def: lib-common/%.def.in - $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P -I$(top_srcdir)/def-include -DDEF_I386 > $@ + $(MKDIR_P) $(@D) && $(CPP) -x c $(CPPFLAGS32) $< -Wp,-w -P -I$(top_srcdir)/def-include > $@ lib64/%.def: lib-common/%.def.in - $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P -I$(top_srcdir)/def-include -DDEF_X64 | sed -E 's/^([^ ]+)@[0-9]+( |$$)/\1\2/' > $@ + $(MKDIR_P) $(@D) && $(CPP) -x c $(CPPFLAGS64) $< -Wp,-w -P -I$(top_srcdir)/def-include | sed -E 's/^([^ ]+)@[0-9]+( |$$)/\1\2/' > $@ libarm32/%.def: lib-common/%.def.in - $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P -I$(top_srcdir)/def-include -DDEF_ARM32 | sed -E 's/^([^ ]+)@[0-9]+( |$$)/\1\2/' > $@ + $(MKDIR_P) $(@D) && $(CPP) -x c $(CPPFLAGSARM32) $< -Wp,-w -P -I$(top_srcdir)/def-include | sed -E 's/^([^ ]+)@[0-9]+( |$$)/\1\2/' > $@ libarm64/%.def: lib-common/%.def.in - $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P -I$(top_srcdir)/def-include -DDEF_ARM64 | sed -E 's/^([^ ]+)@[0-9]+( |$$)/\1\2/' > $@ + $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -P -I$(top_srcdir)/def-include -DDEF_ARM64 | sed -E 's/^([^ ]+)@[0-9]+( |$$)/\1\2/' > $@
This probably is ok. I think I initially did this with the setup where preprocessing could be done with any plain "cpp" executable (as we also use -undef), but this change does make sense, with what you want to do in the following patch.
It's worth pointing out to other readers here, that the CPPFLAGS* variables themselves don't really add much of value here, it's mostly the fact that you remove -undef, that the default compiler defines become available.
I think the rest of this change seems fine, it seems mostly like a plain mechanical substitution.
// Martin _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public