bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH mig 7/12] Drop -undef -ansi from cpp flags


From: Flávio Cruz
Subject: Re: [RFC PATCH mig 7/12] Drop -undef -ansi from cpp flags
Date: Sun, 12 Feb 2023 13:43:20 -0500



On Sun, Feb 12, 2023 at 10:02 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
Sergey Bugaev, le dim. 12 févr. 2023 14:10:38 +0300, a ecrit:
> 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.

That looks alright to me. Flavior, what do you think about it?

Seems fine to me.
 

> ---
mig.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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=
> --
> 2.39.1

reply via email to

[Prev in Thread] Current Thread [Next in Thread]