diff --git a/gcc/gcc/config.gcc b/gcc/gcc/config.gcc index 4bf2366c75..b8d3fbef9c 100644 --- a/gcc/gcc/config.gcc +++ b/gcc/gcc/config.gcc @@ -3010,7 +3010,7 @@ powerpc-*-eabi*) ;; powerpc-*-haiku*) tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppcos rs6000/t-ppccomm t-haiku" - tm_file="${tm_file} elfos.h freebsd-spec.h rs6000/sysv4.h haiku.h rs6000/haiku.h haiku-stdint.h" + tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h haiku.h rs6000/haiku.h haiku-stdint.h" extra_options="${extra_options} rs6000/sysv4.opt" ;; powerpc-*-rtems*) diff --git a/gcc/gcc/config/haiku.h b/gcc/gcc/config/haiku.h index 88adc25772..b768dfdf1c 100644 --- a/gcc/gcc/config/haiku.h +++ b/gcc/gcc/config/haiku.h @@ -59,6 +59,7 @@ Boston, MA 02111-1307, USA. */ #undef CC1PLUS_SPEC #define CC1PLUS_SPEC "%{!Wctor-dtor-privacy:-Wno-ctor-dtor-privacy}" +#undef SUBTARGET_OVERRIDE_OPTIONS #define SUBTARGET_OVERRIDE_OPTIONS \ do { \ haiku_override_options (); \ diff --git a/gcc/gcc/config/rs6000/haiku.h b/gcc/gcc/config/rs6000/haiku.h index 8c2e8054b8..59be0b821e 100644 --- a/gcc/gcc/config/rs6000/haiku.h +++ b/gcc/gcc/config/rs6000/haiku.h @@ -28,6 +28,10 @@ Boston, MA 02111-1307, USA. */ #undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128*/ +/* Undef gnu-user.h macros we don't want. */ +#undef CPLUSPLUS_CPP_SPEC +#undef LINK_GCC_C_SEQUENCE_SPEC + #undef TARGET_OS_CPP_BUILTINS #define TARGET_OS_CPP_BUILTINS() \ do \ @@ -35,7 +39,7 @@ Boston, MA 02111-1307, USA. */ builtin_define ("__HAIKU__"); \ builtin_define ("__POWERPC__"); \ builtin_define ("__powerpc__"); \ - builtin_define ("__STDC_ISO_10646__=201103L"); \ + builtin_define ("__STDC_ISO_10646__=201103L"); \ builtin_assert ("system=haiku"); \ builtin_assert ("cpu=powerpc"); \ builtin_assert ("machine=powerpc"); \ @@ -52,3 +56,18 @@ Boston, MA 02111-1307, USA. */ #undef LINK_SPEC #define LINK_SPEC "-m elf32ppchaiku %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}" + +/* override options from sysv4.h */ +#undef SUBTARGET_OVERRIDE_OPTIONS +#define SUBTARGET_OVERRIDE_OPTIONS \ + do { \ + rs6000_abi_name = "sysv"; \ + rs6000_current_abi = ABI_V4; \ + rs6000_sdata = SDATA_DATA; \ + rs6000_sdata_name = "data"; \ + /*secure_plt = true;*/ \ + rs6000_isa_flags |= OPTION_MASK_MINIMAL_TOC; \ + TARGET_NO_FP_IN_TOC = 1; \ + haiku_override_options (); \ + } + while (0) diff --git a/gcc/libgcc/config.host b/gcc/libgcc/config.host index 662bc116ec..d096a0bf16 100644 --- a/gcc/libgcc/config.host +++ b/gcc/libgcc/config.host @@ -1221,6 +1221,7 @@ powerpc*-*-freebsd*) esac ;; powerpc-*-haiku*) + tmake_file="$tmake_file rs6000/t-ppccomm rs6000/t-savresfpgr rs6000/t-crtstuff rs6000/t-crtstuff-pic t-fdpbit" ;; powerpc-*-netbsd*) tmake_file="$tmake_file rs6000/t-netbsd rs6000/t-crtstuff"