Created
December 18, 2018 04:03
-
-
Save ndowens/6a8751c34e257123a92f703bf9a5196f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: lang/gcc7/Makefile | |
=================================================================== | |
--- lang/gcc7/Makefile (revision 487725) | |
+++ lang/gcc7/Makefile (working copy) | |
@@ -3,7 +3,7 @@ | |
PORTNAME= gcc | |
PORTVERSION= 7.4.0 | |
-PORTREVISION= 1 | |
+PORTREVISION= 2 | |
CATEGORIES= lang | |
MASTER_SITES= GCC | |
PKGNAMESUFFIX= ${SUFFIX} | |
@@ -14,8 +14,6 @@ | |
LICENSE= GPLv3 GPLv3RLE | |
LICENSE_COMB= multi | |
-ONLY_FOR_ARCHS= aarch64 amd64 arm armv6 armv7 i386 powerpc powerpc64 powerpcspe sparc64 | |
- | |
LIB_DEPENDS= libgmp.so:math/gmp \ | |
libmpfr.so:math/mpfr \ | |
libmpc.so:math/mpc | |
@@ -55,7 +53,15 @@ | |
.include <bsd.port.pre.mk> | |
-.if ${ARCH} == amd64 | |
+.if ${ARCH} == mips || ${ARCH} == mips64 | |
+CONFIGURE_ARGS+=--disable-shared --disable-threads --disable-wchar_t \ | |
+ --disable-werror --disable-libstdcxx-pch --with-endians=big | |
+EXTRA_PATCHES= ${PATCHDIR}/mips-patch-libgcc-config \ | |
+ ${PATCHDIR}/mips-patch-Makefile.in | |
+CXXFLAGS+= -fpermissive | |
+CFLAGS+= -Wno-error | |
+ | |
+.elif ${ARCH} == amd64 | |
CONFIGURE_TARGET= x86_64-portbld-${OPSYS:tl}${OSREL} | |
.elif ${ARCH} == powerpc64 | |
@@ -77,7 +83,11 @@ | |
CONFIGURE_ARGS+=--disable-bootstrap | |
.else | |
CONFIGURE_ARGS+=--with-build-config=bootstrap-debug | |
+. if ${ARCH} == mips || ${ARCH} == mips64 | |
+ALL_TARGET= stage1-bubble | |
+. else | |
ALL_TARGET= bootstrap-lean | |
+. endif | |
.endif | |
INSTALL_TARGET= install-strip | |
.if ${UID} != 0 | |
Index: lang/gcc7/files/mips-patch-Makefile.in | |
=================================================================== | |
--- lang/gcc7/files/mips-patch-Makefile.in (nonexistent) | |
+++ lang/gcc7/files/mips-patch-Makefile.in (working copy) | |
@@ -0,0 +1,70 @@ | |
+--- Makefile.in.orig 2017-04-19 18:49:29 UTC | |
++++ Makefile.in | |
+@@ -2657,7 +2657,6 @@ install-strip-host: \ | |
+ maybe-install-strip-dejagnu \ | |
+ maybe-install-strip-etc \ | |
+ maybe-install-strip-fastjar \ | |
+- maybe-install-strip-fixincludes \ | |
+ maybe-install-strip-flex \ | |
+ maybe-install-strip-gas \ | |
+ maybe-install-strip-gcc \ | |
+@@ -2693,7 +2692,6 @@ install-strip-host: \ | |
+ maybe-install-strip-utils \ | |
+ maybe-install-strip-gnattools \ | |
+ maybe-install-strip-lto-plugin \ | |
+- maybe-install-strip-libcc1 \ | |
+ maybe-install-strip-gotools | |
+ | |
+ .PHONY: install-strip-target | |
+@@ -9160,21 +9158,7 @@ install-fixincludes: installdirs | |
+ | |
+ @endif fixincludes | |
+ | |
+-.PHONY: install-strip-fixincludes maybe-install-strip-fixincludes | |
+-maybe-install-strip-fixincludes: | |
+-@if fixincludes | |
+-maybe-install-strip-fixincludes: install-strip-fixincludes | |
+ | |
+-install-strip-fixincludes: installdirs | |
+- @: $(MAKE); $(unstage) | |
+- @r=`${PWD_COMMAND}`; export r; \ | |
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
+- $(HOST_EXPORTS) \ | |
+- (cd $(HOST_SUBDIR)/fixincludes && \ | |
+- $(MAKE) $(FLAGS_TO_PASS) install-strip) | |
+- | |
+-@endif fixincludes | |
+- | |
+ # Other targets (info, dvi, pdf, etc.) | |
+ | |
+ .PHONY: maybe-info-fixincludes info-fixincludes | |
+@@ -35411,21 +35395,7 @@ install-libcc1: installdirs | |
+ | |
+ @endif libcc1 | |
+ | |
+-.PHONY: install-strip-libcc1 maybe-install-strip-libcc1 | |
+-maybe-install-strip-libcc1: | |
+-@if libcc1 | |
+-maybe-install-strip-libcc1: install-strip-libcc1 | |
+ | |
+-install-strip-libcc1: installdirs | |
+- @: $(MAKE); $(unstage) | |
+- @r=`${PWD_COMMAND}`; export r; \ | |
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
+- $(HOST_EXPORTS) \ | |
+- (cd $(HOST_SUBDIR)/libcc1 && \ | |
+- $(MAKE) $(FLAGS_TO_PASS) install-strip) | |
+- | |
+-@endif libcc1 | |
+- | |
+ # Other targets (info, dvi, pdf, etc.) | |
+ | |
+ .PHONY: maybe-info-libcc1 info-libcc1 | |
+@@ -55167,7 +55137,6 @@ html-stageautoprofile-gcc: maybe-all-build-libiberty | |
+ html-stageautofeedback-gcc: maybe-all-build-libiberty | |
+ install-gcc: maybe-install-fixincludes | |
+ install-gcc: maybe-install-lto-plugin | |
+-install-strip-gcc: maybe-install-strip-fixincludes | |
+ install-strip-gcc: maybe-install-strip-lto-plugin | |
+ configure-libcpp: configure-libiberty | |
+ | |
Property changes on: lang/gcc7/files/mips-patch-Makefile.in | |
___________________________________________________________________ | |
Added: svn:eol-style | |
## -0,0 +1 ## | |
+native | |
\ No newline at end of property | |
Added: svn:mime-type | |
## -0,0 +1 ## | |
+text/plain | |
\ No newline at end of property | |
Index: lang/gcc7/files/mips-patch-libgcc-config | |
=================================================================== | |
--- lang/gcc7/files/mips-patch-libgcc-config (nonexistent) | |
+++ lang/gcc7/files/mips-patch-libgcc-config (working copy) | |
@@ -0,0 +1,11 @@ | |
+--- libgcc/config.host.orig 2018-01-08 13:39:11 UTC | |
++++ libgcc/config.host | |
+@@ -854,7 +854,7 @@ microblaze*-*-rtems*) | |
+ tmake_file="${tmake_file} microblaze/t-microblaze t-fdpbit" | |
+ extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o crti.o crtn.o" | |
+ ;; | |
+-mips*-*-netbsd*) # NetBSD/mips, either endian. | |
++mips*-*-freebsd*) | |
+ ;; | |
+ mips*-*-linux*) # Linux MIPS, either endian. | |
+ extra_parts="$extra_parts crtfastmath.o" | |
Property changes on: lang/gcc7/files/mips-patch-libgcc-config | |
___________________________________________________________________ | |
Added: svn:eol-style | |
## -0,0 +1 ## | |
+native | |
\ No newline at end of property | |
Added: svn:mime-type | |
## -0,0 +1 ## | |
+text/plain | |
\ No newline at end of property | |
Index: lang/gcc7/files/patch-gcc_config.gcc | |
=================================================================== | |
--- lang/gcc7/files/patch-gcc_config.gcc (nonexistent) | |
+++ lang/gcc7/files/patch-gcc_config.gcc (working copy) | |
@@ -0,0 +1,14 @@ | |
+--- gcc/config.gcc.orig 2018-12-17 18:59:46 UTC | |
++++ gcc/config.gcc | |
+@@ -2063,6 +2063,11 @@ riscv*-*-elf* | riscv*-*-rtems*) | |
+ ;; | |
+ esac | |
+ ;; | |
++mips*-*-freebsd*) | |
++ target_cpu_default="MASK_ABICALLS" | |
++ tm_file="elfos.h ${tm_file} mips/elf.h ${fbsd_tm_file}" | |
++ extra_options="${extra_options} freebsd.opt" | |
++ ;; | |
+ mips*-*-netbsd*) # NetBSD/mips, either endian. | |
+ target_cpu_default="MASK_ABICALLS" | |
+ tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h" | |
Property changes on: lang/gcc7/files/patch-gcc_config.gcc | |
___________________________________________________________________ | |
Added: fbsd:nokeywords | |
## -0,0 +1 ## | |
+yes | |
\ No newline at end of property | |
Added: svn:eol-style | |
## -0,0 +1 ## | |
+native | |
\ No newline at end of property | |
Added: svn:mime-type | |
## -0,0 +1 ## | |
+text/plain | |
\ No newline at end of property | |
Index: lang/gcc7/files/patch-spe-config | |
=================================================================== | |
--- lang/gcc7/files/patch-spe-config (revision 487725) | |
+++ lang/gcc7/files/patch-spe-config (nonexistent) | |
@@ -1,15 +0,0 @@ | |
---- UTC | |
-Index: gcc/config.gcc | |
-=================================================================== | |
---- gcc/config.gcc.old 2017-04-05 17:48:03.045750000 -0500 | |
-+++ gcc/config.gcc 2017-04-05 17:49:22.143572000 -0500 | |
-@@ -2285,6 +2285,9 @@ | |
- tmake_file="${tmake_file} rs6000/t-freebsd64" | |
- extra_options="${extra_options} rs6000/linux64.opt" | |
- ;; | |
-+ powerpcspe-*) | |
-+ tm_file="${tm_file} rs6000/freebsd.h rs6000/linuxspe.h rs6000/e500.h" | |
-+ ;; | |
- *) | |
- tm_file="${tm_file} rs6000/freebsd.h" | |
- ;; | |
Property changes on: lang/gcc7/files/patch-spe-config | |
___________________________________________________________________ | |
Deleted: fbsd:nokeywords | |
## -1 +0,0 ## | |
-yes | |
\ No newline at end of property | |
Deleted: svn:eol-style | |
## -1 +0,0 ## | |
-native | |
\ No newline at end of property | |
Deleted: svn:mime-type | |
## -1 +0,0 ## | |
-text/plain | |
\ No newline at end of property |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment