mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
lang/gcc10: add support for powerpc64le
PR: 251670 Approved by: gerald@ (maintainer)
This commit is contained in:
parent
e3b2885dea
commit
15627c3182
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=559636
@ -13,7 +13,7 @@ COMMENT= GNU Compiler Collection 10
|
||||
LICENSE= GPLv3 GPLv3RLE
|
||||
LICENSE_COMB= multi
|
||||
|
||||
ONLY_FOR_ARCHS= aarch64 amd64 arm armv6 armv7 i386 powerpc powerpc64
|
||||
ONLY_FOR_ARCHS= aarch64 amd64 arm armv6 armv7 i386 powerpc powerpc64 powerpc64le
|
||||
|
||||
LIB_DEPENDS= libgmp.so:math/gmp \
|
||||
libmpfr.so:math/mpfr \
|
||||
|
77
lang/gcc10/files/patch-powerpc64le
Normal file
77
lang/gcc10/files/patch-powerpc64le
Normal file
@ -0,0 +1,77 @@
|
||||
--- gcc/config.gcc.orig 2020-07-23 06:35:17 UTC
|
||||
+++ gcc/config.gcc
|
||||
@@ -2868,6 +2868,10 @@ powerpc*-*-freebsd*)
|
||||
extra_options="${extra_options} rs6000/sysv4.opt"
|
||||
tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
|
||||
case ${target} in
|
||||
+ powerpc*le-*-*)
|
||||
+ tm_file="${tm_file} rs6000/sysv4le.h" ;;
|
||||
+ esac
|
||||
+ case ${target} in
|
||||
powerpc64*)
|
||||
tm_file="${tm_file} rs6000/default64.h rs6000/freebsd64.h"
|
||||
tmake_file="${tmake_file} rs6000/t-freebsd64"
|
||||
--- gcc/config/rs6000/freebsd64.h.orig 2020-07-23 06:35:17 UTC
|
||||
+++ gcc/config/rs6000/freebsd64.h
|
||||
@@ -51,11 +51,10 @@ extern int dot_symbols;
|
||||
#define SET_CMODEL(opt) do {} while (0)
|
||||
#endif
|
||||
|
||||
-/* Until now the 970 is the only Processor where FreeBSD 64-bit runs on. */
|
||||
#undef PROCESSOR_DEFAULT
|
||||
-#define PROCESSOR_DEFAULT PROCESSOR_POWER4
|
||||
+#define PROCESSOR_DEFAULT PROCESSOR_PPC7450
|
||||
#undef PROCESSOR_DEFAULT64
|
||||
-#define PROCESSOR_DEFAULT64 PROCESSOR_POWER4
|
||||
+#define PROCESSOR_DEFAULT64 PROCESSOR_POWER8
|
||||
|
||||
/* We don't need to generate entries in .fixup, except when
|
||||
-mrelocatable or -mrelocatable-lib is given. */
|
||||
@@ -158,8 +157,8 @@ extern int dot_symbols;
|
||||
#define ASM_SPEC64 "-a64"
|
||||
|
||||
#define ASM_SPEC_COMMON "%(asm_cpu) \
|
||||
-%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
|
||||
-%{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}"
|
||||
+%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \
|
||||
+ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
|
||||
|
||||
#undef SUBSUBTARGET_EXTRA_SPECS
|
||||
#define SUBSUBTARGET_EXTRA_SPECS \
|
||||
@@ -181,9 +180,15 @@ extern int dot_symbols;
|
||||
%{static:-Bstatic}} \
|
||||
%{symbolic:-Bsymbolic}"
|
||||
|
||||
+#undef DEFAULT_ASM_ENDIAN
|
||||
#define LINK_OS_FREEBSD_SPEC32 "-melf32ppc_fbsd " LINK_OS_FREEBSD_SPEC_DEF
|
||||
-
|
||||
+#if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
|
||||
+#define DEFAULT_ASM_ENDIAN " -mlittle"
|
||||
+#define LINK_OS_FREEBSD_SPEC64 "-melf64lppc_fbsd " LINK_OS_FREEBSD_SPEC_DEF
|
||||
+#else
|
||||
+#define DEFAULT_ASM_ENDIAN " -mbig"
|
||||
#define LINK_OS_FREEBSD_SPEC64 "-melf64ppc_fbsd " LINK_OS_FREEBSD_SPEC_DEF
|
||||
+#endif
|
||||
|
||||
#undef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS { "m64" }
|
||||
--- gcc/configure.orig 2020-07-23 06:35:17 UTC
|
||||
+++ gcc/configure
|
||||
@@ -29398,13 +29398,16 @@ $as_echo "#define HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE 1"
|
||||
esac
|
||||
|
||||
case "$target:$tm_file" in
|
||||
- powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
|
||||
+ powerpc64*-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
|
||||
case "$target" in
|
||||
*le-*-linux*)
|
||||
emul_name="-melf64lppc"
|
||||
;;
|
||||
*-*-linux*)
|
||||
emul_name="-melf64ppc"
|
||||
+ ;;
|
||||
+ *le-*-freebsd*)
|
||||
+ emul_name="-melf64lppc_fbsd"
|
||||
;;
|
||||
*-*-freebsd*)
|
||||
emul_name="-melf64ppc_fbsd"
|
Loading…
Reference in New Issue
Block a user