1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-07 06:40:06 +00:00

Update to the 20171126 snapshot of GCC 8.

This requires two temporary patches to allow for building with
clang 3.4.1 (on FreeBSD 10.4) and trimming down an overeager check
that breaks Wine, for example.

Forward port revision 454177 from lang/gcc7: [1]

Make sure what we install is stripped (i.e., debug info is removed).

The straightforward way is setting INSTALL_TARGET to install-strip,
which is supported by the upstream GCC build machinery.

Unfortunately this fails when running as regular user (non-root)
since strip requires write permission to the files in question,
and we install binaries as r-xr-xr-x by default.  To work around
that we need to set BINMODE to allow for write access by the user,
something that's common on GNU/Linux (which is why this probably
has not been noticed there).  This is not necessary when running
as root.

(A different approach suggested was to set STRIP=true, alas that
leads to many files actually not being stripped.  This is due to
GCC using its own script install-sh that in turn uses cp, chmod,
strip,...  instead of our own install-* tools in many cases.)

Reported by:	Ports QA Framework, miwi, sobomax [1]
Discussed with:	tijl, miwi [1]
Differential Revision:	https://reviews.freebsd.org/D10357 [1]
This commit is contained in:
Gerald Pfeifer 2017-11-29 18:51:00 +00:00
parent ddfec268c3
commit 781b800d3f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=455139
4 changed files with 51 additions and 4 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= gcc
PORTVERSION= 8.0.0.s20171119
PORTVERSION= 8.0.0.s20171126
CATEGORIES= lang
MASTER_SITES= GCC/snapshots/${DIST_VERSION}
PKGNAMESUFFIX= ${SUFFIX}-devel
@ -76,6 +76,10 @@ CONFIGURE_ARGS+=--disable-bootstrap
CONFIGURE_ARGS+=--with-build-config=bootstrap-debug
ALL_TARGET= bootstrap-lean
.endif
INSTALL_TARGET= install-strip
.if ${UID} != 0
BINMODE= 755
.endif
CONFIGURE_ARGS+=--disable-nls \
--enable-gnu-indirect-function \
--libdir=${TARGLIB} \

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1511131785
SHA256 (gcc-8-20171119.tar.xz) = 0b6da0bbddc4379fa9dc7fc11ae6a3d54eb503068c47ebd76d1418010ffac088
SIZE (gcc-8-20171119.tar.xz) = 60502776
TIMESTAMP = 1511737702
SHA256 (gcc-8-20171126.tar.xz) = b3fc82c0714f1489119bfbde242221bdd851e105af236da1f15b4a542da98b51
SIZE (gcc-8-20171126.tar.xz) = 60566772

View File

@ -0,0 +1,29 @@
--- UTC
Index: gcc/hash-set.h
===================================================================
--- gcc/hash-set.h (revision 255155)
+++ gcc/hash-set.h (working copy)
@@ -150,7 +150,7 @@
}
#define DEFINE_DEBUG_HASH_SET(T) \
- template static void debug_helper (hash_set<T> &); \
+ template void debug_helper (hash_set<T> &); \
DEBUG_FUNCTION void \
debug (hash_set<T> &ref) \
{ \
Index: gcc/vec.h
===================================================================
--- gcc/vec.h (revision 255155)
+++ gcc/vec.h (working copy)
@@ -453,8 +453,8 @@
functions for a type T. */
#define DEFINE_DEBUG_VEC(T) \
- template static void debug_helper (vec<T> &); \
- template static void debug_helper (vec<T, va_gc> &); \
+ template void debug_helper (vec<T> &); \
+ template void debug_helper (vec<T, va_gc> &); \
/* Define the vec<T> debug functions. */ \
DEBUG_FUNCTION void \
debug (vec<T> &ref) \

View File

@ -0,0 +1,14 @@
--- UTC
Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c (revision 255155)
+++ gcc/tree-cfg.c (working copy)
@@ -3994,7 +3994,7 @@
{
if (!POINTER_TYPE_P (rhs1_type)
|| !POINTER_TYPE_P (rhs2_type)
- || !types_compatible_p (rhs1_type, rhs2_type)
+// || !types_compatible_p (rhs1_type, rhs2_type)
|| TREE_CODE (lhs_type) != INTEGER_TYPE
|| TYPE_UNSIGNED (lhs_type)
|| TYPE_PRECISION (lhs_type) != TYPE_PRECISION (rhs1_type))