sysv4.h (CRTOFFLOADBEGIN): Define.
authorJames Norris <jnorris@codesourcery.com>
Tue, 10 May 2016 18:05:02 +0000 (18:05 +0000)
committerJames Norris <jnorris@gcc.gnu.org>
Tue, 10 May 2016 18:05:02 +0000 (18:05 +0000)
* config/rs6000/sysv4.h (CRTOFFLOADBEGIN): Define. Add crtoffloadbegin.o
if offloading is enabled and -fopenacc or -fopenmp is specified.
(CRTOFFLOADEND): Likewise.
(STARTFILE_LINUX_SPEC): Add CRTOFFLOADBEGIN.
(ENDFILE_LINUX_SPEC): Add CRTOFFLOADEND.

From-SVN: r236098

gcc/ChangeLog
gcc/config/rs6000/sysv4.h

index e9d2b8dfe158a0d64203d49282292b689b85dee8..1fa7f5e0ada26ec896869dd9228702cd573b5b0a 100644 (file)
@@ -1,3 +1,11 @@
+2016-05-10  James Norris  <jnorris@codesourcery.com>
+
+       * config/rs6000/sysv4.h (CRTOFFLOADBEGIN): Define. Add crtoffloadbegin.o
+       if offloading is enabled and -fopenacc or -fopenmp is specified.
+       (CRTOFFLOADEND): Likewise.
+       (STARTFILE_LINUX_SPEC): Add CRTOFFLOADBEGIN.
+       (ENDFILE_LINUX_SPEC): Add CRTOFFLOADEND.
+
 2016-05-10  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.c (legitimize_pic_address): Merge 64-bit and 32-bit
index 46d2b4bcdbc9f724f07129c32d959941af6d926e..dbef3780a9d685bb9837e83f2301083894354522 100644 (file)
@@ -749,21 +749,32 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
 %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \
 %{!shared: %{profile:-lc_p} %{!profile:-lc}}}"
 
+#if ENABLE_OFFLOADING == 1
+#define CRTOFFLOADBEGIN "%{fopenacc|fopenmp:crtoffloadbegin%O%s}"
+#define CRTOFFLOADEND "%{fopenacc|fopenmp:crtoffloadend%O%s}"
+#else
+#define CRTOFFLOADBEGIN ""
+#define CRTOFFLOADEND ""
+#endif
+
 #ifdef HAVE_LD_PIE
 #define        STARTFILE_LINUX_SPEC "\
 %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
 %{mnewlib:ecrti.o%s;:crti.o%s} \
-%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \
+" CRTOFFLOADBEGIN
 #else
 #define        STARTFILE_LINUX_SPEC "\
 %{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
 %{mnewlib:ecrti.o%s;:crti.o%s} \
-%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \
+" CRTOFFLOADBEGIN
 #endif
 
 #define        ENDFILE_LINUX_SPEC "\
 %{shared|pie:crtendS.o%s;:crtend.o%s} \
-%{mnewlib:ecrtn.o%s;:crtn.o%s}"
+%{mnewlib:ecrtn.o%s;:crtn.o%s} \
+" CRTOFFLOADEND
 
 #define LINK_START_LINUX_SPEC ""