This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/17841] Build failure if compiler defaults to PIE
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 03 Mar 2015 16:30:00 +0000
- Subject: [Bug libc/17841] Build failure if compiler defaults to PIE
- Auto-submitted: auto-generated
- References: <bug-17841-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17841
--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr17841 has been created
at 2a0b2d28affdb91ecdb0900719ba2f9fb942d0ee (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2a0b2d28affdb91ecdb0900719ba2f9fb942d0ee
commit 2a0b2d28affdb91ecdb0900719ba2f9fb942d0ee
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Mar 2 10:40:46 2015 -0800
Use -mno-copyreloc-in-pie to compile vismain.c
GCC 5 may use copy relocation in PIE on x86-64 if linker supports it.
But vismain.c, which is compiled as PIE, doesn't work with copy
relocation. This patch compiles vismain.c with -mno-copyreloc-in-pie
if -mcopyreloc-in-pie is available.
[BZ #17841]
* config.make.in (have-mcopyreloc-in-pie): New.
* configure.ac (libc_cv_mcopyreloc_in_pie): New. Set to yes if
-mcopyreloc-in-pie works. AC_SUBST.
* configure: Regenerated.
* elf/Makefile (CFLAGS-vismain.c): Add -mno-copyreloc-in-pie
if supported.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=157b304dd18e7ffb89921ea80b9fbebe9da18952
commit 157b304dd18e7ffb89921ea80b9fbebe9da18952
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Mar 2 14:53:11 2015 -0800
Compile archives with -fno-pie
When compiler defaults to PIE, we compile archives with -fno-pie. Since
archives won't be used with PIE, compile them with -fpie isn't necessary.
[BZ #17841]
* Makeconfig (no-pie-ccflag): New. Set to -fno-pie.
(pic-default): Don't define if $(no-pie-ccflag) is -fno-pie.
* Makerules (archive-objects): New. Set before including
extra-lib.mk.
($(archive-objects)): New. New rule to append $(no-pie-ccflag)
to CFLAGS.
* extra-lib.mk (archive-objects): New.
* crypt/Makefile (crypt-suffix): New.
($(objpfx)md5test): Replace ".o" with $(crypt-suffix).
($(objpfx)md5test-giant): Likewise.
($(objpfx)sha256test): Likewise.
($(objpfx)sha512test): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b13706de6259ffb4140b75e898038afe04b2074f
commit b13706de6259ffb4140b75e898038afe04b2074f
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 14 06:29:04 2015 -0800
Support compilers defaulting to PIE
If PIE is the default, we need to build programs as PIE.
[BZ #17841]
* Makeconfig (+link): Set to $(+link-pie) if default to PIE.
(+link-tests): Set to $(+link-pie-tests) if default to PIE.
* config.make.in (build-pie-default): New.
* configure.ac (libc_cv_pie_default): New. Set to yes if -fPIE
is default. AC_SUBST.
* configure: Regenerated.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.