From: James Norris Date: Tue, 10 May 2016 18:05:02 +0000 (+0000) Subject: sysv4.h (CRTOFFLOADBEGIN): Define. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3126957087d5ce8dc7e7c5f38118769732c335bc;p=gcc.git sysv4.h (CRTOFFLOADBEGIN): Define. * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e9d2b8dfe15..1fa7f5e0ada 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2016-05-10 James Norris + + * 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 * config/i386/i386.c (legitimize_pic_address): Merge 64-bit and 32-bit diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index 46d2b4bcdbc..dbef3780a9d 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -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 ""