Created
December 18, 2018 03:57
-
-
Save ndowens/cc190e7e1eb4049974105eed67941900 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-arm-unwind-cxx-support | |
=================================================================== | |
--- lang/gcc7/files/patch-arm-unwind-cxx-support (revision 487725) | |
+++ lang/gcc7/files/patch-arm-unwind-cxx-support (working copy) | |
@@ -1,9 +1,6 @@ | |
---- UTC | |
-Index: gcc/ginclude/unwind-arm-common.h | |
-=================================================================== | |
---- gcc/ginclude/unwind-arm-common.h (revision 219113) | |
-+++ gcc/ginclude/unwind-arm-common.h (working copy) | |
-@@ -82,7 +82,11 @@ | |
+--- gcc/ginclude/unwind-arm-common.h.orig 2017-01-01 12:07:43 UTC | |
++++ gcc/ginclude/unwind-arm-common.h | |
+@@ -82,7 +82,11 @@ extern "C" { | |
struct _Unwind_Control_Block | |
{ | |
@@ -15,7 +12,7 @@ | |
void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *); | |
/* Unwinder cache, private fields for the unwinder's use */ | |
struct | |
-@@ -181,7 +185,11 @@ | |
+@@ -181,7 +185,11 @@ extern "C" { | |
/* Support functions for the PR. */ | |
#define _Unwind_Exception _Unwind_Control_Block | |
@@ -27,11 +24,9 @@ | |
void * _Unwind_GetLanguageSpecificData (_Unwind_Context *); | |
_Unwind_Ptr _Unwind_GetRegionStart (_Unwind_Context *); | |
-Index: libstdc++-v3/libsupc++/unwind-cxx.h | |
-=================================================================== | |
---- libstdc++-v3/libsupc++/unwind-cxx.h (revision 219147) | |
-+++ libstdc++-v3/libsupc++/unwind-cxx.h (working copy) | |
-@@ -235,7 +235,7 @@ | |
+--- libstdc++-v3/libsupc++/unwind-cxx.h.orig 2017-01-01 12:07:43 UTC | |
++++ libstdc++-v3/libsupc++/unwind-cxx.h | |
+@@ -235,7 +235,7 @@ __get_dependent_exception_from_ue (_Unwind_Exception * | |
return reinterpret_cast<__cxa_dependent_exception *>(exc + 1) - 1; | |
} | |
@@ -40,7 +35,7 @@ | |
static inline bool | |
__is_gxx_exception_class(_Unwind_Exception_Class c) | |
{ | |
-@@ -309,13 +309,7 @@ | |
+@@ -309,13 +309,7 @@ __GXX_INIT_FORCED_UNWIND_CLASS(_Unwind_Exception_Class | |
c[6] = 'R'; | |
c[7] = '\0'; | |
} | |
@@ -55,7 +50,7 @@ | |
// This is the primary exception class we report -- "GNUCC++\0". | |
const _Unwind_Exception_Class __gxx_primary_exception_class | |
= ((((((((_Unwind_Exception_Class) 'G' | |
-@@ -339,6 +333,16 @@ | |
+@@ -339,6 +333,16 @@ const _Unwind_Exception_Class __gxx_dependent_exceptio | |
<< 8 | (_Unwind_Exception_Class) '+') | |
<< 8 | (_Unwind_Exception_Class) '\x01'); | |
@@ -72,7 +67,7 @@ | |
static inline bool | |
__is_gxx_exception_class(_Unwind_Exception_Class c) | |
{ | |
-@@ -346,6 +350,12 @@ | |
+@@ -346,6 +350,12 @@ __is_gxx_exception_class(_Unwind_Exception_Class c) | |
|| c == __gxx_dependent_exception_class; | |
} | |
@@ -85,13 +80,13 @@ | |
// Only checks for primary or dependent, but not that it is a C++ exception at | |
// all. | |
static inline bool | |
-@@ -357,7 +367,18 @@ | |
+@@ -357,6 +367,17 @@ __is_dependent_exception(_Unwind_Exception_Class c) | |
#define __GXX_INIT_PRIMARY_EXCEPTION_CLASS(c) c = __gxx_primary_exception_class | |
#define __GXX_INIT_DEPENDENT_EXCEPTION_CLASS(c) \ | |
c = __gxx_dependent_exception_class | |
+#define __GXX_INIT_FORCED_UNWIND_CLASS(c) c = __gxx_forced_unwind_class | |
+#endif // __ARM_EABI_UNWINDER__ && !__FreeBSD__ | |
- | |
++ | |
+#ifdef __ARM_EABI_UNWINDER__ | |
+static inline void* | |
+__gxx_caught_object(_Unwind_Exception* eo) | |
@@ -100,7 +95,6 @@ | |
+} | |
+ | |
+#else // !__ARM_EABI_UNWINDER__ | |
-+ | |
+ | |
// GNU C++ personality routine, Version 0. | |
extern "C" _Unwind_Reason_Code __gxx_personality_v0 | |
- (int, _Unwind_Action, _Unwind_Exception_Class, | |
Index: lang/gcc7/files/patch-gets-no-more | |
=================================================================== | |
--- lang/gcc7/files/patch-gets-no-more (revision 487725) | |
+++ lang/gcc7/files/patch-gets-no-more (working copy) | |
@@ -1,12 +1,9 @@ | |
Disable the build/use of libssp/gets-chk since FreeBSD 12 and later | |
do not feature gets() any longer. | |
---- UTC | |
-Index: libssp/Makefile.am | |
-=================================================================== | |
---- libssp/Makefile.am (revision 263319) | |
-+++ libssp/Makefile.am (working copy) | |
-@@ -42,7 +42,7 @@ | |
+--- libssp/Makefile.am.orig 2017-01-17 09:38:48 UTC | |
++++ libssp/Makefile.am | |
+@@ -42,7 +42,7 @@ libsubincludedir = $(libdir)/gcc/$(target_noncanonical | |
nobase_libsubinclude_HEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h | |
libssp_la_SOURCES = \ | |
@@ -15,11 +12,9 @@ | |
memset-chk.c snprintf-chk.c sprintf-chk.c stpcpy-chk.c \ | |
strcat-chk.c strcpy-chk.c strncat-chk.c strncpy-chk.c \ | |
vsnprintf-chk.c vsprintf-chk.c | |
-Index: libssp/Makefile.in | |
-=================================================================== | |
---- libssp/Makefile.in (revision 263319) | |
-+++ libssp/Makefile.in (working copy) | |
-@@ -108,7 +108,7 @@ | |
+--- libssp/Makefile.in.orig 2017-01-17 09:38:48 UTC | |
++++ libssp/Makefile.in | |
+@@ -108,7 +108,7 @@ am__uninstall_files_from_dir = { \ | |
am__installdirs = "$(DESTDIR)$(toolexeclibdir)" \ | |
"$(DESTDIR)$(libsubincludedir)" | |
LTLIBRARIES = $(toolexeclib_LTLIBRARIES) | |
@@ -28,7 +23,7 @@ | |
mempcpy-chk.lo memset-chk.lo snprintf-chk.lo sprintf-chk.lo \ | |
stpcpy-chk.lo strcat-chk.lo strcpy-chk.lo strncat-chk.lo \ | |
strncpy-chk.lo vsnprintf-chk.lo vsprintf-chk.lo | |
-@@ -291,7 +291,7 @@ | |
+@@ -291,7 +291,7 @@ toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.l | |
libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include | |
nobase_libsubinclude_HEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h | |
libssp_la_SOURCES = \ | |
@@ -37,7 +32,7 @@ | |
memset-chk.c snprintf-chk.c sprintf-chk.c stpcpy-chk.c \ | |
strcat-chk.c strcpy-chk.c strncat-chk.c strncpy-chk.c \ | |
vsnprintf-chk.c vsprintf-chk.c | |
-@@ -452,7 +452,6 @@ | |
+@@ -452,7 +452,6 @@ mostlyclean-compile: | |
distclean-compile: | |
-rm -f *.tab.c | |
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