* Allow target to override gnu-user.h crti and crtn
@ 2018-11-12 11:31 Alan Modra
2018-11-14 18:38 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Alan Modra @ 2018-11-12 11:31 UTC (permalink / raw)
To: gcc-patches
Also give target access to the gnu-user.h LINK_GCC_C_SEQUENCE_SPEC.
In preparation for using gnu-user.h in rs6000/.
Bootstrapped etc. powerpc64le-linux. OK?
* config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
(GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
(GNU_USER_TARGET_CRTN): Define.
(GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
(GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
index 75f6a6f0a7d..09170d416b8 100644
--- a/gcc/config/gnu-user.h
+++ b/gcc/config/gnu-user.h
@@ -40,6 +40,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define CRTOFFLOADEND ""
#endif
+#define GNU_USER_TARGET_CRTI "crti.o%s"
+#define GNU_USER_TARGET_CRTN "crtn.o%s"
+
/* Provide a STARTFILE_SPEC appropriate for GNU userspace. Here we add
the GNU userspace magical crtbegin.o file (see crtstuff.c) which
provides part of the support for getting C++ file-scope static
@@ -51,8 +54,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
static:crt1.o%s; \
static-pie:rcrt1.o%s; \
" PIE_SPEC ":Scrt1.o%s; \
- :crt1.o%s} \
- crti.o%s \
+ :crt1.o%s} " \
+ GNU_USER_TARGET_CRTI " \
%{static:crtbeginT.o%s; \
shared|static-pie|" PIE_SPEC ":crtbeginS.o%s; \
:crtbegin.o%s} \
@@ -75,8 +78,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
fvtable-verify=std:vtv_end.o%s} \
%{static:crtend.o%s; \
shared|static-pie|" PIE_SPEC ":crtendS.o%s; \
- :crtend.o%s} \
- crtn.o%s " \
+ :crtend.o%s} " \
+ GNU_USER_TARGET_CRTN " " \
CRTOFFLOADEND
#undef ENDFILE_SPEC
#define ENDFILE_SPEC GNU_USER_TARGET_ENDFILE_SPEC
@@ -106,11 +109,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
#endif
-#undef LINK_GCC_C_SEQUENCE_SPEC
-#define LINK_GCC_C_SEQUENCE_SPEC \
+#define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \
"%{static|static-pie:--start-group} %G %{!nolibc:%L} \
%{static|static-pie:--end-group}%{!static:%{!static-pie:%G}}"
+#undef LINK_GCC_C_SEQUENCE_SPEC
+#define LINK_GCC_C_SEQUENCE_SPEC GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC
+
/* Use --as-needed -lgcc_s for eh support. */
#ifdef HAVE_LD_AS_NEEDED
#define USE_LD_AS_NEEDED 1
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Allow target to override gnu-user.h crti and crtn
2018-11-12 11:31 Allow target to override gnu-user.h crti and crtn Alan Modra
@ 2018-11-14 18:38 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2018-11-14 18:38 UTC (permalink / raw)
To: Alan Modra, gcc-patches
On 11/12/18 4:31 AM, Alan Modra wrote:
> Also give target access to the gnu-user.h LINK_GCC_C_SEQUENCE_SPEC.
> In preparation for using gnu-user.h in rs6000/.
>
> Bootstrapped etc. powerpc64le-linux. OK?
>
> * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
> (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
> (GNU_USER_TARGET_CRTN): Define.
> (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
> (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
OK
jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-14 18:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-12 11:31 Allow target to override gnu-user.h crti and crtn Alan Modra
2018-11-14 18:38 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).