summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2023-02-12 14:10:38 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-02-12 19:44:32 +0100
commit403007dc55222d4ca1120dd7730baa7579d12d88 (patch)
tree847deee53039715826542478c638d02817667c74
parentd76280e4fc71265b88bce2bdaf25b3be846fc6b2 (diff)
Drop -undef -ansi from cpp flags
Since GNU Mach commit d30481122a5d24ad6b921062f93b9172ef922fc3, i386/machine_types.defs defines types based on defined(__x86_64__). Supressing the built-in macro definitions will now result in the wrong type being silently selected. -undef was initially introduced in commit 78b6a7665db7b2eae367e17102821cbdca231d19 without much of an explanation. -ansi was introduced in commit 6940fb91859e46b2e96a331a029f2dc2a0ee51c9 "to avoid -Di386=1 and the like". Since glibc has been using MIG with CPP set to a custom GCC invocation which did *not* use either flag, it appears that everything works well enough even without them. On the other hand, not having __x86_64__ defined most definetely causes issues for anything that does not set a custom CPP when invoking MIG (i.e., most users). Other built-in definitions could be used in the future in a similar way (e.g. on other architectures); it's really more of a coincidence that they have not been used until now, and things kept working with -undef. Message-Id: <20230212111044.610942-8-bugaevc@gmail.com>
-rw-r--r--mig.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/mig.in b/mig.in
index 63e0269..94fd500 100644
--- a/mig.in
+++ b/mig.in
@@ -38,7 +38,7 @@ migcom=${MIGDIR-$libexecdir}/${MIGCOM-@MIGCOM@}
# The expansion of TARGET_CC might refer to ${CC}, so make sure it is defined.
default_cc="@CC@"
CC="${CC-${default_cc}}"
-default_cpp="@TARGET_CC@ -E -x c -undef -ansi"
+default_cpp="@TARGET_CC@ -E -x c"
cpp="${CPP-${default_cpp}}"
cppflags=