--- gcc/config/i386/osfelf.h 2018/04/24 18:10:27 1.1.1.1 +++ gcc/config/i386/osfelf.h 2018/04/24 18:16:48 1.1.1.2 @@ -21,11 +21,14 @@ the Free Software Foundation, 675 Mass A #include "config/i386/osfrose.h" #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Di386 -Asystem(unix) -Acpu(i386) -Amachine(i386)" +#define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Di386 -Asystem(unix) -Asystem(xpg4) -Acpu(i386) -Amachine(i386)" #undef CPP_SPEC #define CPP_SPEC "\ -%{!mrose: %{!mno-elf: -D__ELF__}} %{mrose: -D__ROSE__} %{mno-elf: -D__ROSE__} \ +%{mrose: -D__ROSE__ %{!pic-none: -D__SHARED__}} \ +%{!mrose: -D__ELF__ %{fpic: -D__SHARED__}} \ +%{mno-underscores: -D__NO_UNDERSCORES__} \ +%{!mrose: %{!munderscores: -D__NO_UNDERSCORES__}} \ %{.S: %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \ %{.S: -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ %{.cc: -D__LANGUAGE_C_PLUS_PLUS} \ @@ -37,22 +40,29 @@ the Free Software Foundation, 675 Mass A /* Turn on -mpic-extern by default (change to later use -fpic. */ #undef CC1_SPEC #define CC1_SPEC "\ -%{!melf: %{!mrose: %{!mno-elf: -melf }}} \ +%{!melf: %{!mrose: -melf }} \ +%{!mrose: %{!munderscores: %{!mno-underscores: -mno-underscores }}} \ %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ -%{pic-none: -mno-half-pic} \ -%{fpic: -mno-half-pic} \ -%{fPIC: -mno-half-pic} \ -%{pic-lib: -mhalf-pic} \ -%{pic-extern: -mhalf-pic} \ -%{pic-calls: -mhalf-pic} \ -%{pic-names*: -mhalf-pic} \ -%{!pic-*: %{!fpic: %{!fPIC: -mhalf-pic}}}" +%{mrose: %{pic-none: -mno-half-pic} \ + %{pic-extern: } %{pic-lib: } %{pic-calls: } %{pic-names*: } \ + %{!pic-none: -mhalf-pic }}" #undef ASM_SPEC #define ASM_SPEC "%{v*: -v}" #undef LINK_SPEC -#define LINK_SPEC "%{noshrlib: } %{glue: }" +#define LINK_SPEC "%{v*: -v} \ +%{mrose: %{!noshrlib: %{pic-none: -noshrlib} %{!pic-none: -warn_nopic}} \ + %{nostdlib} %{noshrlib} %{glue}} \ +%{!mrose: %{dy} %{dn} %{glue: } \ + %{h*} %{z*} \ + %{static:-dn -Bstatic} \ + %{shared:-G -dy} \ + %{symbolic:-Bsymbolic -G -dy} \ + %{G:-G} \ + %{!dy: %{!dn: %{!static: %{!shared: %{!symbolic: \ + %{noshrlib: -dn } %{pic-none: -dn } \ + %{!noshrlib: %{!pic-none: -dy}}}}}}}}" #undef TARGET_VERSION_INTERNAL #undef TARGET_VERSION