⛏️ index : buildtools.git

author Yn0ga <ynoga@protonmail.com> 2023-10-05 19:58:27.0 +00:00:00
committer Niels Sascha Reedijk <niels.reedijk@gmail.com> 2023-10-06 6:23:49.0 +00:00:00
commit
8b91d5a2da18e1a8092570adfc7d0221124b7817 [patch]
tree
4b5cc0c739a749b0fac7b732a36e12a170695338
parent
752d29d62445fdf8b77a75cdc91cf1f749841234
download
8b91d5a2da18e1a8092570adfc7d0221124b7817.tar.gz

Update PPC toolchain, should fix #18474

(due to https://github.com/gcc-mirror/gcc/commit/62045234757dbe0e3c44eef4cc952e773eea784e)

Change-Id: I5d070da18160b26bab1d29454f1c2c7799b6dcab
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/6984
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Diff

 gcc/gcc/config.gcc            |  2 +-
 gcc/libgcc/config.host        |  1 +
 gcc/gcc/config/haiku.h        |  1 +
 gcc/gcc/config/rs6000/haiku.h | 21 +++++++++++++++++++++
 4 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/gcc/gcc/config.gcc b/gcc/gcc/config.gcc
index 4bf2366..b8d3fbe 100644
--- a/gcc/gcc/config.gcc
+++ a/gcc/gcc/config.gcc
@@ -3010,7 +3010,7 @@
	;;
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/libgcc/config.host b/gcc/libgcc/config.host
index 662bc11..d096a0b 100644
--- a/gcc/libgcc/config.host
+++ a/gcc/libgcc/config.host
@@ -1221,6 +1221,7 @@
	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"
diff --git a/gcc/gcc/config/haiku.h b/gcc/gcc/config/haiku.h
index 88adc25..b768dfd 100644
--- a/gcc/gcc/config/haiku.h
+++ a/gcc/gcc/config/haiku.h
@@ -59,6 +59,7 @@
#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 8c2e805..59be0b8 100644
--- a/gcc/gcc/config/rs6000/haiku.h
+++ a/gcc/gcc/config/rs6000/haiku.h
@@ -28,6 +28,10 @@
#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 @@
	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 @@

#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)