diff mbox series

Delete !HAVE_LD_PIE variants of startfile/endfile specs

Message ID 20181112112925.GC22752@bubble.grove.modra.org
State New
Headers show
Series Delete !HAVE_LD_PIE variants of startfile/endfile specs | expand

Commit Message

Alan Modra Nov. 12, 2018, 11:29 a.m. UTC
This patch is a small cleanup.

The HAVE_LD_PIE variant doesn't contain anything that will break
linking when !HAVE_LD_PIE that isn't already broken if you choose to
build PIEs with a linker that doesn't support PIE.  All this
HAVE_LD_PIE protects is the choice of different crt files, which is
more about libc capability than linker capability.

Bootstrapped etc. powerpc64le-linux and x86_64-linux.  OK?

	* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
	!HAVE_LD_PIE variant.
	(GNU_USER_TARGET_ENDFILE_SPEC): Likewise.

Comments

Jeff Law Nov. 14, 2018, 6:35 p.m. UTC | #1
On 11/12/18 4:29 AM, Alan Modra wrote:
> This patch is a small cleanup.
> 
> The HAVE_LD_PIE variant doesn't contain anything that will break
> linking when !HAVE_LD_PIE that isn't already broken if you choose to
> build PIEs with a linker that doesn't support PIE.  All this
> HAVE_LD_PIE protects is the choice of different crt files, which is
> more about libc capability than linker capability.
> 
> Bootstrapped etc. powerpc64le-linux and x86_64-linux.  OK?
> 
> 	* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
> 	!HAVE_LD_PIE variant.
> 	(GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
OK
jeff
diff mbox series

Patch

diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
index 5b48fb21514..75f6a6f0a7d 100644
--- a/gcc/config/gnu-user.h
+++ b/gcc/config/gnu-user.h
@@ -45,7 +45,6 @@  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    provides part of the support for getting C++ file-scope static
    object constructed before entering `main'.  */
 
-#if defined HAVE_LD_PIE
 #define GNU_USER_TARGET_STARTFILE_SPEC \
   "%{shared:; \
      pg|p|profile:%{static-pie:grcrt1.o%s;:gcrt1.o%s}; \
@@ -59,22 +58,8 @@  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
      :crtbegin.o%s} \
    %{fvtable-verify=none:%s; \
      fvtable-verify=preinit:vtv_start_preinit.o%s; \
-     fvtable-verify=std:vtv_start.o%s} \
-   " CRTOFFLOADBEGIN
-#else
-#define GNU_USER_TARGET_STARTFILE_SPEC \
-  "%{shared:; \
-     pg|p|profile:gcrt1.o%s; \
-     :crt1.o%s} \
-   crti.o%s \
-   %{static:crtbeginT.o%s; \
-     shared|pie|static-pie:crtbeginS.o%s; \
-     :crtbegin.o%s} \
-   %{fvtable-verify=none:%s; \
-     fvtable-verify=preinit:vtv_start_preinit.o%s; \
-     fvtable-verify=std:vtv_start.o%s} \
-   " CRTOFFLOADBEGIN
-#endif
+     fvtable-verify=std:vtv_start.o%s} " \
+   CRTOFFLOADBEGIN
 #undef  STARTFILE_SPEC
 #define STARTFILE_SPEC GNU_USER_TARGET_STARTFILE_SPEC
 
@@ -84,7 +69,6 @@  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    object constructed before entering `main', followed by a normal
    GNU userspace "finalizer" file, `crtn.o'.  */
 
-#if defined HAVE_LD_PIE
 #define GNU_USER_TARGET_ENDFILE_SPEC \
   "%{fvtable-verify=none:%s; \
      fvtable-verify=preinit:vtv_end_preinit.o%s; \
@@ -92,19 +76,8 @@  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    %{static:crtend.o%s; \
      shared|static-pie|" PIE_SPEC ":crtendS.o%s; \
      :crtend.o%s} \
-   crtn.o%s \
-   " CRTOFFLOADEND
-#else
-#define GNU_USER_TARGET_ENDFILE_SPEC \
-  "%{fvtable-verify=none:%s; \
-     fvtable-verify=preinit:vtv_end_preinit.o%s; \
-     fvtable-verify=std:vtv_end.o%s} \
-   %{static:crtend.o%s; \
-     shared|pie|static-pie:crtendS.o%s; \
-     :crtend.o%s} \
-   crtn.o%s \
-   " CRTOFFLOADEND
-#endif
+   crtn.o%s " \
+   CRTOFFLOADEND
 #undef  ENDFILE_SPEC
 #define ENDFILE_SPEC GNU_USER_TARGET_ENDFILE_SPEC