aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorgerald <gerald@FreeBSD.org>2019-08-12 15:30:34 +0800
committergerald <gerald@FreeBSD.org>2019-08-12 15:30:34 +0800
commit7e9b7daed469027bd39aa237a32c2e1072aab919 (patch)
tree3d4dfe036b1a0d2fd95d94f829affa719af6df47 /lang
parent2877816ba78abeeb84ae6efdea2e2dc5ddf8e452 (diff)
downloadfreebsd-ports-gnome-7e9b7daed469027bd39aa237a32c2e1072aab919.tar.gz
freebsd-ports-gnome-7e9b7daed469027bd39aa237a32c2e1072aab919.tar.zst
freebsd-ports-gnome-7e9b7daed469027bd39aa237a32c2e1072aab919.zip
Ensure _GNU_SOURCE is now longer defined on powerpc64 (which was a
regression from the GCC 8 series). The technical background is that a consolidation in upstream GCC made non-GNU platforms include gnu-user.h and then undefined some macros in rs6000/freebsd.h, but missed doing the same in rs6000/freebsd64.h. The has now been included upstream and the current snapshot that the lang/gcc9-devel port tracks; carrying files/patch-powerpc64-no-_GNU_SOURCE in this port should become obsolete with the GCC 9.2 release. (As this should be a very short-lived measure, bump PORTREVISION only for powerpc64 to avoid all other users having to rebuild, too.) PR: 239648
Diffstat (limited to 'lang')
-rw-r--r--lang/gcc9/Makefile1
-rw-r--r--lang/gcc9/files/patch-powerpc64-no-_GNU_SOURCE27
2 files changed, 28 insertions, 0 deletions
diff --git a/lang/gcc9/Makefile b/lang/gcc9/Makefile
index 8b938485bfc0..5391c548f67a 100644
--- a/lang/gcc9/Makefile
+++ b/lang/gcc9/Makefile
@@ -61,6 +61,7 @@ CONFIGURE_ARGS+= --disable-multilib
CONFIGURE_TARGET= x86_64-portbld-${OPSYS:tl}${OSREL}
.elif ${ARCH} == powerpc64
+PORTREVISION= 2
CONFIGURE_ENV+= UNAME_m="powerpc64"
USE_GCC= 8
.endif
diff --git a/lang/gcc9/files/patch-powerpc64-no-_GNU_SOURCE b/lang/gcc9/files/patch-powerpc64-no-_GNU_SOURCE
new file mode 100644
index 000000000000..4303b436fb9d
--- /dev/null
+++ b/lang/gcc9/files/patch-powerpc64-no-_GNU_SOURCE
@@ -0,0 +1,27 @@
+r274105 | amodra | 2019-08-05 01:52:33 +0000
+
+PR91349, powerpc64*-*-freebsd* defines _GNU_SOURCE
+
+rev 266496 (git ab6b1bb456) undefined some macros in rs6000/freebsd.h
+but missed doing the same in rs6000/freebsd64.h.
+
+ PR target/91349
+ * config/rs6000/freebsd64.h (CPLUSPLUS_CPP_SPEC),
+ (LINK_GCC_C_SEQUENCE_SPEC): Undef.
+
+--- UTC
+Index: gcc/config/rs6000/freebsd64.h
+===================================================================
+--- gcc/config/rs6000/freebsd64.h (revision 274104)
++++ gcc/config/rs6000/freebsd64.h (revision 274105)
+@@ -17,6 +17,10 @@
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++/* Undef gnu-user.h macros we don't want. */
++#undef CPLUSPLUS_CPP_SPEC
++#undef LINK_GCC_C_SEQUENCE_SPEC
++
+ /* Override the defaults, which exist to force the proper definition. */
+
+ #ifdef IN_LIBGCC2