View | Details | Raw Unified | Return to bug 251670
Collapse All | Expand All

(-)Makefile (-1 / +1 lines)
Lines 13-19 Link Here
13
LICENSE=	GPLv3 GPLv3RLE
13
LICENSE=	GPLv3 GPLv3RLE
14
LICENSE_COMB=	multi
14
LICENSE_COMB=	multi
15
15
16
ONLY_FOR_ARCHS=	aarch64 amd64 arm armv6 armv7 i386 powerpc powerpc64
16
ONLY_FOR_ARCHS=	aarch64 amd64 arm armv6 armv7 i386 powerpc powerpc64 powerpc64le
17
17
18
LIB_DEPENDS=	libgmp.so:math/gmp \
18
LIB_DEPENDS=	libgmp.so:math/gmp \
19
		libmpfr.so:math/mpfr \
19
		libmpfr.so:math/mpfr \
(-)files/patch-gcc_config.gcc (+13 lines)
Line 0 Link Here
1
--- gcc/config.gcc.orig	2020-12-07 03:00:29 UTC
2
+++ gcc/config.gcc
3
@@ -2868,6 +2868,10 @@ powerpc*-*-freebsd*)
4
 	extra_options="${extra_options} rs6000/sysv4.opt"
5
 	tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
6
 	case ${target} in
7
+	    powerpc*le-*-*)
8
+		tm_file="${tm_file} rs6000/sysv4le.h" ;;
9
+	esac
10
+	case ${target} in
11
 	     powerpc64*)
12
 	    	tm_file="${tm_file} rs6000/default64.h rs6000/freebsd64.h"
13
 		tmake_file="${tmake_file} rs6000/t-freebsd64"
(-)files/patch-gcc_config_rs6000_freebsd64.h (+44 lines)
Line 0 Link Here
1
--- gcc/config/rs6000/freebsd64.h.orig	2020-07-23 06:35:17 UTC
2
+++ gcc/config/rs6000/freebsd64.h
3
@@ -51,11 +51,10 @@ extern int dot_symbols;
4
 #define SET_CMODEL(opt) do {} while (0)
5
 #endif
6
 
7
-/* Until now the 970 is the only Processor where FreeBSD 64-bit runs on.  */
8
 #undef  PROCESSOR_DEFAULT
9
-#define PROCESSOR_DEFAULT PROCESSOR_POWER4
10
+#define PROCESSOR_DEFAULT PROCESSOR_PPC7450
11
 #undef  PROCESSOR_DEFAULT64
12
-#define PROCESSOR_DEFAULT64 PROCESSOR_POWER4
13
+#define PROCESSOR_DEFAULT64 PROCESSOR_POWER8
14
 
15
 /* We don't need to generate entries in .fixup, except when
16
    -mrelocatable or -mrelocatable-lib is given.  */
17
@@ -158,8 +157,8 @@ extern int dot_symbols;
18
 #define ASM_SPEC64 "-a64"
19
 
20
 #define ASM_SPEC_COMMON "%(asm_cpu) \
21
-%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
22
-%{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}"
23
+%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \
24
+  ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
25
 
26
 #undef	SUBSUBTARGET_EXTRA_SPECS
27
 #define SUBSUBTARGET_EXTRA_SPECS					\
28
@@ -181,9 +180,15 @@ extern int dot_symbols;
29
     %{static:-Bstatic}} \
30
   %{symbolic:-Bsymbolic}"
31
 
32
+#undef  DEFAULT_ASM_ENDIAN
33
 #define LINK_OS_FREEBSD_SPEC32 "-melf32ppc_fbsd " LINK_OS_FREEBSD_SPEC_DEF
34
-  
35
+#if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
36
+#define DEFAULT_ASM_ENDIAN " -mlittle"
37
+#define LINK_OS_FREEBSD_SPEC64 "-melf64lppc_fbsd " LINK_OS_FREEBSD_SPEC_DEF
38
+#else
39
+#define DEFAULT_ASM_ENDIAN " -mbig"
40
 #define LINK_OS_FREEBSD_SPEC64 "-melf64ppc_fbsd " LINK_OS_FREEBSD_SPEC_DEF
41
+#endif
42
 
43
 #undef	MULTILIB_DEFAULTS
44
 #define MULTILIB_DEFAULTS { "m64" }
(-)files/patch-gcc_configure (+20 lines)
Line 0 Link Here
1
--- gcc/configure.orig	2020-07-23 06:35:17 UTC
2
+++ gcc/configure
3
@@ -29398,13 +29398,16 @@ $as_echo "#define HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE 1" 
4
 esac
5
 
6
 case "$target:$tm_file" in
7
-  powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
8
+  powerpc64*-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
9
   case "$target" in
10
      *le-*-linux*)
11
      emul_name="-melf64lppc"
12
       ;;
13
      *-*-linux*)
14
      emul_name="-melf64ppc"
15
+      ;;
16
+     *le-*-freebsd*)
17
+     emul_name="-melf64lppc_fbsd"
18
       ;;
19
      *-*-freebsd*)
20
      emul_name="-melf64ppc_fbsd"
(-)files/patch-libcpp_lex.c (+16 lines)
Line 0 Link Here
1
--- libcpp/lex.c.orig	2020-11-02 10:24:50 UTC
2
+++ libcpp/lex.c
3
@@ -531,11 +531,11 @@ init_vectorized_lexer (void)
4
   search_line_fast = impl;
5
 }
6
 
7
-#elif defined(_ARCH_PWR8) && defined(__ALTIVEC__)
8
+#elif (GCC_VERSION >= 4005) && defined(_ARCH_PWR8) && defined(__ALTIVEC__)
9
 
10
 /* A vection of the fast scanner using AltiVec vectorized byte compares
11
    and VSX unaligned loads (when VSX is available).  This is otherwise
12
-   the same as the pre-GCC 5 version.  */
13
+   the same as the AltiVec version.  */
14
 
15
 ATTRIBUTE_NO_SANITIZE_UNDEFINED
16
 static const uchar *

Return to bug 251670