[arch-dev-public] Changing compilation flags

Allan McRae allan at archlinux.org
Sat Dec 24 07:39:47 UTC 2016


On 13/12/16 19:07, Allan McRae wrote:
> On 24/10/16 13:56, Allan McRae wrote:
>> That means we will add all of these to our default CFLAGS/LDFLAGS etc.
>> The changes are:
>>
>> 1) building gcc to enable PIE by default
>> 2) add -z,now to LDFLAGS
>> 3) and -fno-plt and -fstack-check to our CFLAGS
> 
> For those wondering what happened with this:
> 
> binutils build with gcc with default PIE:
> 
> # grep Error binutils-git-89080.bfbf34d-1-x86_64-check.log
> make[5]: *** [Makefile:7161: incremental_test_2] Error 1
> make[5]: *** [Makefile:7185: incremental_test_5] Error 1
> make[5]: *** [Makefile:7200: incremental_copy_test] Error 1
> make[5]: *** [Makefile:7206: incremental_common_test_1] Error 1
> make[5]: *** [Makefile:7132: ehdr_start_test_4] Error 1
> readelf: Error: the PHDR segment is not covered by a LOAD segment
> make[4]: *** [Makefile:5609: check-am] Error 2
> make[3]: *** [Makefile:5613: check] Error 2
> make[2]: *** [Makefile:941: check-recursive] Error 1
> make[1]: *** [Makefile:6134: check-gold] Error 2
> make[5]: *** [Makefile:3678: check-DEJAGNU] Error 1
> make[4]: *** [Makefile:1953: check-am] Error 2
> make[3]: *** [Makefile:1793: check-recursive] Error 1
> make[2]: *** [Makefile:1955: check] Error 2
> make[1]: *** [Makefile:7547: check-ld] Error 2
> make: *** [Makefile:2206: do-check] Error 2
> 
> 
> binutils build with current gcc:
> 
> # grep Error binutils-git-89080.bfbf34d-1-x86_64-check.log
> readelf: Error: the PHDR segment is not covered by a LOAD segment
> 
> 
> I need time to fix this.  It is probably just test suite assumptions
> rather than errors.

I'm putting these changes on a permanent hold due to a lack of time on
my behalf.  I'm not putting a binutils build with this many testsuite
failures into the repos until I fully understand why this is happening.

If default PIE is wanted, someone other than me will need to figure this
out.  Just build gcc with --enable-default-pie and then build binutils
to see the issues in the testsuite.

Allan


More information about the arch-dev-public mailing list