From cc08749b2d1c68284b25b157fbbe1ff219495cae Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 25 Jun 2015 02:37:04 -0700 Subject: Support compilers defaulting to PIE To support building glibc with GCC 6 configured with --enable-default-pie, which generates PIE by default, we need to build programs as PIE. But elf/tst-dlopen-aout must not be built as PIE since it tests dlopen on ET_EXEC file and PIE is ET_DYN. [BZ #17841] * Makeconfig (no-pie-ldflag): New. (+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. * elf/Makefile (LDFLAGS-tst-dlopen-aout): New. --- config.make.in | 1 + 1 file changed, 1 insertion(+) (limited to 'config.make.in') diff --git a/config.make.in b/config.make.in index 5a18daed24..a9f5696077 100644 --- a/config.make.in +++ b/config.make.in @@ -82,6 +82,7 @@ nss-crypt = @libc_cv_nss_crypt@ # Configuration options. build-shared = @shared@ build-pic-default= @libc_cv_pic_default@ +build-pie-default= @libc_cv_pie_default@ build-profile = @profile@ build-static-nss = @static_nss@ add-ons = @add_ons@ -- cgit v1.2.1