aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/sparc
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2015-09-24 09:00:22 +0000
committerRainer Orth <ro@gcc.gnu.org>2015-09-24 09:00:22 +0000
commitdf2a1cc48b45a5493646e14bcd81eff7d684e15b (patch)
treef52d2a26a4f1a076c6412585f560c29447771e77 /gcc/config/sparc
parent2d11044217edd9168eafea1c8c60603f87b0e00d (diff)
downloadgcc-df2a1cc48b45a5493646e14bcd81eff7d684e15b.zip
gcc-df2a1cc48b45a5493646e14bcd81eff7d684e15b.tar.gz
gcc-df2a1cc48b45a5493646e14bcd81eff7d684e15b.tar.bz2
Support PIE on Solaris
gcc/testsuite: * lib/target-supports.exp (check_effective_target_pie): Check for PIE support on Solaris 11.x and 12. libgcc: * config.host (*-*-solaris2*): Add t-crtstuff-pic to tmake_file. Add crtbeginS.o, crtendS.o to extra_parts if libgcc_cv_solaris_crts. * config/sol2/gmon.c: (monstartup): Don't write trailing NUL of messages. (internal_mcount): Likewise. * config/sol2/t-sol2 (crtp.o, crtpg.o, gmon.o): Compile with crt_compile, add CRTSTUFF_T_CFLAGS_S. gcc: * configure.ac (gcc_cv_ld_pie): Check for gld >= 2.26 on Solaris. Check for ld -type pie on Solaris 11.x and 12. * configure: Regenerate. * config.in: Regenerate. * gcc.c (LD_PIE_SPEC): Allow redefinition. * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Define. (STARTFILE_SPEC): Use it. (ENDFILE_CRTEND_SPEC): Define. (ENDFILE_SPEC): Use it and ENDFILE_ARCH_SPEC. (SUBTARGET_EXTRA_SPECS): Add STARTFILE_CRTBEGIN_SPEC, ENDFILE_ARCH_SPEC, ENDFILE_CRTEND_SPEC. [HAVE_LD_PIE && HAVE_SOLARIS_CRTS] (LD_PIE_SPEC): Define. (!(HAVE_LD_PIE && HAVE_SOLARIS_CRTS)] (LINK_PIE_SPEC): Define. * config/i386/sol2.h (ENDFILE_SPEC): Remove. (ENDFILE_ARCH_SPEC): Define. * config/sparc/sol2.h (ENDFILE_ARCH_SPEC): Define. From-SVN: r228078
Diffstat (limited to 'gcc/config/sparc')
-rw-r--r--gcc/config/sparc/sol2.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h
index c169e7c..9912e8c 100644
--- a/gcc/config/sparc/sol2.h
+++ b/gcc/config/sparc/sol2.h
@@ -280,6 +280,8 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
#define SUBTARGET_CPU_EXTRA_SPECS
+#define ENDFILE_ARCH_SPEC ""
+
/* Register the Solaris-specific #pragma directives. */