Makeconfig: Do not sort and deduplicate +cflags [BZ # 17248]

Message ID 20180817132401.5523B404122B7@oldenburg.str.redhat.com
State Committed
Headers

Commit Message

Florian Weimer Aug. 17, 2018, 1:24 p.m. UTC
  The original intent behind this is unclear.  It interferes with flags
that has to be ordered in a particular way.

This change does not introduce any changes in the built binaries on
x86-64, and build-many-glibcs.py shows no regressions, either.  (I did
not compare all object files, though.)

2018-08-17  Florian Weimer  <fweimer@redhat.com>

	[BZ #17248]
	* Makeconfig (+cflags): Do not sort (and deduplicate).
  

Comments

Carlos O'Donell Aug. 21, 2018, 1:18 a.m. UTC | #1
On 08/17/2018 09:24 AM, Florian Weimer wrote:
> The original intent behind this is unclear.  It interferes with flags
> that has to be ordered in a particular way.

Agreed.

> This change does not introduce any changes in the built binaries on
> x86-64, and build-many-glibcs.py shows no regressions, either.  (I did
> not compare all object files, though.)

Thank you for testing this.

> 2018-08-17  Florian Weimer  <fweimer@redhat.com>
> 
> 	[BZ #17248]
> 	* Makeconfig (+cflags): Do not sort (and deduplicate).

OK for master.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> diff --git a/Makeconfig b/Makeconfig
> index 92e76d6200..a9e50e5b60 100644
> --- a/Makeconfig
> +++ b/Makeconfig
> @@ -902,9 +902,6 @@ endif	# $(+cflags) == ""
>  	   $(+stack-protector)
>  +gcc-nowarn := -w
>  
> -# Don't duplicate options if we inherited variables from the parent.
> -+cflags	:= $(sort $(+cflags))
> -
>  # Each sysdeps directory can contain header files that both will be
>  # used to compile and will be installed.  Each can also contain an
>  # include/ subdirectory, whose header files will be used to compile
>
  

Patch

diff --git a/Makeconfig b/Makeconfig
index 92e76d6200..a9e50e5b60 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -902,9 +902,6 @@  endif	# $(+cflags) == ""
 	   $(+stack-protector)
 +gcc-nowarn := -w
 
-# Don't duplicate options if we inherited variables from the parent.
-+cflags	:= $(sort $(+cflags))
-
 # Each sysdeps directory can contain header files that both will be
 # used to compile and will be installed.  Each can also contain an
 # include/ subdirectory, whose header files will be used to compile