svn commit: r559636 - in head/lang/gcc10: . files
Piotr Kubaj
pkubaj at FreeBSD.org
Wed Dec 30 03:11:15 UTC 2020
Author: pkubaj
Date: Wed Dec 30 03:11:14 2020
New Revision: 559636
URL: https://svnweb.freebsd.org/changeset/ports/559636
Log:
lang/gcc10: add support for powerpc64le
PR: 251670
Approved by: gerald@ (maintainer)
Added:
head/lang/gcc10/files/patch-powerpc64le (contents, props changed)
Modified:
head/lang/gcc10/Makefile
Modified: head/lang/gcc10/Makefile
==============================================================================
--- head/lang/gcc10/Makefile Wed Dec 30 01:51:11 2020 (r559635)
+++ head/lang/gcc10/Makefile Wed Dec 30 03:11:14 2020 (r559636)
@@ -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 \
Added: head/lang/gcc10/files/patch-powerpc64le
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/gcc10/files/patch-powerpc64le Wed Dec 30 03:11:14 2020 (r559636)
@@ -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"
More information about the svn-ports-all
mailing list