mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-17 08:01:36 +00:00
Upgrade ext-toolchain GCC ports to GCC 6.4.0
This is the latest supported release in GCC 6.x series. Drop aarch64 support patch - it has been committed upstream. Enable ifunc suppport by default. PR: 228161 Reviewed by: bapt (update part) Differential Revision: https://reviews.freebsd.org/D13602
This commit is contained in:
parent
a330f0ff1a
commit
527e1ce0f8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=469834
@ -1,6 +1,5 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
PORTREVISION= 1
|
|
||||||
PKGNAMEPREFIX= aarch64-
|
PKGNAMEPREFIX= aarch64-
|
||||||
PLIST= ${.CURDIR}/pkg-plist
|
PLIST= ${.CURDIR}/pkg-plist
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
PORTREVISION= 1
|
|
||||||
PKGNAMEPREFIX= aarch64-none-elf-
|
PKGNAMEPREFIX= aarch64-none-elf-
|
||||||
COMMENT= GNU Compiler Collection for bare metal arm cross-development
|
COMMENT= GNU Compiler Collection for bare metal arm cross-development
|
||||||
GCC_TARGET= aarch64-none-elf
|
GCC_TARGET= aarch64-none-elf
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
PORTREVISION= 1
|
|
||||||
PKGNAMEPREFIX= arm-none-eabi-
|
PKGNAMEPREFIX= arm-none-eabi-
|
||||||
COMMENT= GNU Compiler Collection for bare metal arm cross-development
|
COMMENT= GNU Compiler Collection for bare metal arm cross-development
|
||||||
GCC_TARGET= arm-none-eabi
|
GCC_TARGET= arm-none-eabi
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
PORTREVISION= 1
|
|
||||||
PKGNAMEPREFIX= mips-
|
PKGNAMEPREFIX= mips-
|
||||||
PLIST= ${.CURDIR}/pkg-plist
|
PLIST= ${.CURDIR}/pkg-plist
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
PORTREVISION= 1
|
|
||||||
PKGNAMEPREFIX= mips64-
|
PKGNAMEPREFIX= mips64-
|
||||||
PLIST= ${.CURDIR}/pkg-plist
|
PLIST= ${.CURDIR}/pkg-plist
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
PORTNAME= gcc
|
PORTNAME= gcc
|
||||||
PORTVERSION= 6.3.0
|
PORTVERSION= 6.4.0
|
||||||
PORTREVISION= 5
|
|
||||||
CATEGORIES= devel
|
CATEGORIES= devel
|
||||||
MASTER_SITES= GCC/releases/gcc-${DISTVERSION}
|
MASTER_SITES= GCC/releases/gcc-${DISTVERSION}
|
||||||
PKGNAMEPREFIX?= powerpc64-
|
PKGNAMEPREFIX?= powerpc64-
|
||||||
@ -19,7 +18,7 @@ LIB_DEPENDS= libgmp.so:math/gmp \
|
|||||||
BUILD_DEPENDS= ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils
|
BUILD_DEPENDS= ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils
|
||||||
RUN_DEPENDS= ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils
|
RUN_DEPENDS= ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils
|
||||||
|
|
||||||
USES= gmake iconv libtool tar:bzip2 makeinfo compiler
|
USES= gmake iconv libtool tar:xz makeinfo compiler
|
||||||
PLIST_SUB= TARGETARCH=${PKGNAMEPREFIX:C/-//g} \
|
PLIST_SUB= TARGETARCH=${PKGNAMEPREFIX:C/-//g} \
|
||||||
OPSYS=${OPSYS:tl} \
|
OPSYS=${OPSYS:tl} \
|
||||||
GCC_TARGET=${GCC_TARGET} \
|
GCC_TARGET=${GCC_TARGET} \
|
||||||
@ -42,6 +41,7 @@ TARGETARCH=${PKGNAMEPREFIX:C/-//g}
|
|||||||
GNU_CONFIGURE= yes
|
GNU_CONFIGURE= yes
|
||||||
CONFIGURE_OUTSOURCE= yes
|
CONFIGURE_OUTSOURCE= yes
|
||||||
CONFIGURE_ARGS+=--target=${GCC_TARGET} --disable-nls --enable-languages=c,c++ \
|
CONFIGURE_ARGS+=--target=${GCC_TARGET} --disable-nls --enable-languages=c,c++ \
|
||||||
|
--enable-gnu-indirect-function \
|
||||||
--without-headers \
|
--without-headers \
|
||||||
--with-gmp=${LOCALBASE} \
|
--with-gmp=${LOCALBASE} \
|
||||||
--with-pkgversion="FreeBSD Ports Collection for ${PKGNAMEPREFIX:C/-//g}" \
|
--with-pkgversion="FreeBSD Ports Collection for ${PKGNAMEPREFIX:C/-//g}" \
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
TIMESTAMP = 1482670316
|
TIMESTAMP = 1514072608
|
||||||
SHA256 (gcc-6.3.0.tar.bz2) = f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f
|
SHA256 (gcc-6.4.0.tar.xz) = 850bf21eafdfe5cd5f6827148184c08c4a0852a37ccf36ce69855334d2c914d4
|
||||||
SIZE (gcc-6.3.0.tar.bz2) = 99903185
|
SIZE (gcc-6.4.0.tar.xz) = 76156220
|
||||||
|
@ -1,234 +0,0 @@
|
|||||||
--- UTC
|
|
||||||
--- configure.ac.orig 2016-03-17 23:54:19.000000000 +0100
|
|
||||||
+++ configure.ac 2016-10-20 21:29:03.780044000 +0200
|
|
||||||
@@ -819,6 +819,9 @@
|
|
||||||
*-*-vxworks*)
|
|
||||||
noconfigdirs="$noconfigdirs ${libgcj}"
|
|
||||||
;;
|
|
||||||
+ aarch64*-*-freebsd*)
|
|
||||||
+ noconfigdirs="$noconfigdirs ${libgcj}"
|
|
||||||
+ ;;
|
|
||||||
alpha*-*-*vms*)
|
|
||||||
noconfigdirs="$noconfigdirs ${libgcj}"
|
|
||||||
;;
|
|
||||||
--- configure.orig 2016-03-17 23:54:19.000000000 +0100
|
|
||||||
+++ configure 2016-10-20 21:29:03.779159000 +0200
|
|
||||||
@@ -3483,6 +3483,9 @@
|
|
||||||
*-*-vxworks*)
|
|
||||||
noconfigdirs="$noconfigdirs ${libgcj}"
|
|
||||||
;;
|
|
||||||
+ aarch64*-*-freebsd*)
|
|
||||||
+ noconfigdirs="$noconfigdirs ${libgcj}"
|
|
||||||
+ ;;
|
|
||||||
alpha*-*-*vms*)
|
|
||||||
noconfigdirs="$noconfigdirs ${libgcj}"
|
|
||||||
;;
|
|
||||||
--- libgcc/config.host.orig 2016-05-17 08:15:52.000000000 +0200
|
|
||||||
+++ libgcc/config.host 2016-10-20 21:29:03.782426000 +0200
|
|
||||||
@@ -333,6 +333,11 @@
|
|
||||||
tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
|
|
||||||
tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
|
|
||||||
;;
|
|
||||||
+aarch64*-*-freebsd*)
|
|
||||||
+ extra_parts="$extra_parts crtfastmath.o"
|
|
||||||
+ tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
|
|
||||||
+ tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
|
|
||||||
+ ;;
|
|
||||||
aarch64*-*-linux*)
|
|
||||||
extra_parts="$extra_parts crtfastmath.o"
|
|
||||||
md_unwind_header=aarch64/linux-unwind.h
|
|
||||||
--- gcc/config.host.orig 2016-01-04 15:30:50.000000000 +0100
|
|
||||||
+++ gcc/config.host 2016-10-20 21:29:03.781971000 +0200
|
|
||||||
@@ -99,7 +99,7 @@
|
|
||||||
esac
|
|
||||||
|
|
||||||
case ${host} in
|
|
||||||
- aarch64*-*-linux*)
|
|
||||||
+ aarch64*-*-freebsd* | aarch64*-*-linux*)
|
|
||||||
case ${target} in
|
|
||||||
aarch64*-*-*)
|
|
||||||
host_extra_gcc_objs="driver-aarch64.o"
|
|
||||||
--- gcc/config.gcc.orig 2016-06-08 15:34:25.000000000 +0200
|
|
||||||
+++ gcc/config.gcc 2016-10-20 21:29:03.781684000 +0200
|
|
||||||
@@ -941,6 +941,11 @@
|
|
||||||
done
|
|
||||||
TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
|
|
||||||
;;
|
|
||||||
+aarch64*-*-freebsd*)
|
|
||||||
+ tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file}"
|
|
||||||
+ tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-freebsd.h"
|
|
||||||
+ tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-freebsd"
|
|
||||||
+ ;;
|
|
||||||
aarch64*-*-linux*)
|
|
||||||
tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
|
|
||||||
tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
|
|
||||||
--- gcc/config/aarch64/t-aarch64-freebsd.orig 2016-10-20 21:29:03.780409000 +0200
|
|
||||||
+++ gcc/config/aarch64/t-aarch64-freebsd 2016-10-20 21:29:03.780540000 +0200
|
|
||||||
@@ -0,0 +1,21 @@
|
|
||||||
+# Machine description for AArch64 architecture.
|
|
||||||
+# Copyright (C) 2016 Free Software Foundation, Inc.
|
|
||||||
+#
|
|
||||||
+# This file is part of GCC.
|
|
||||||
+#
|
|
||||||
+# GCC is free software; you can redistribute it and/or modify it
|
|
||||||
+# under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 3, or (at your option)
|
|
||||||
+# any later version.
|
|
||||||
+#
|
|
||||||
+# GCC is distributed in the hope that it will be useful, but
|
|
||||||
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
+# General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with GCC; see the file COPYING3. If not see
|
|
||||||
+# <http://www.gnu.org/licenses/>.
|
|
||||||
+
|
|
||||||
+LIB1ASMSRC = aarch64/lib1funcs.asm
|
|
||||||
+LIB1ASMFUNCS = _aarch64_sync_cache_range
|
|
||||||
--- gcc/config/aarch64/aarch64-freebsd.h.orig 2016-10-20 21:29:03.780130000 +0200
|
|
||||||
+++ gcc/config/aarch64/aarch64-freebsd.h 2016-10-20 21:29:03.780349000 +0200
|
|
||||||
@@ -0,0 +1,98 @@
|
|
||||||
+/* Definitions for AArch64 running FreeBSD
|
|
||||||
+ Copyright (C) 2016 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+ This file is part of GCC.
|
|
||||||
+
|
|
||||||
+ GCC is free software; you can redistribute it and/or modify it
|
|
||||||
+ under the terms of the GNU General Public License as published by
|
|
||||||
+ the Free Software Foundation; either version 3, or (at your option)
|
|
||||||
+ any later version.
|
|
||||||
+
|
|
||||||
+ GCC is distributed in the hope that it will be useful, but
|
|
||||||
+ WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
+ General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received a copy of the GNU General Public License
|
|
||||||
+ along with GCC; see the file COPYING3. If not see
|
|
||||||
+ <http://www.gnu.org/licenses/>. */
|
|
||||||
+
|
|
||||||
+#ifndef GCC_AARCH64_FREEBSD_H
|
|
||||||
+#define GCC_AARCH64_FREEBSD_H
|
|
||||||
+
|
|
||||||
+#undef SUBTARGET_CPP_SPEC
|
|
||||||
+#define SUBTARGET_CPP_SPEC FBSD_CPP_SPEC
|
|
||||||
+
|
|
||||||
+#if TARGET_BIG_ENDIAN_DEFAULT
|
|
||||||
+#define TARGET_LINKER_EMULATION "aarch64fbsdb"
|
|
||||||
+#else
|
|
||||||
+#define TARGET_LINKER_EMULATION "aarch64fbsd"
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#undef SUBTARGET_EXTRA_LINK_SPEC
|
|
||||||
+#define SUBTARGET_EXTRA_LINK_SPEC " -m" TARGET_LINKER_EMULATION
|
|
||||||
+
|
|
||||||
+#undef FBSD_TARGET_LINK_SPEC
|
|
||||||
+#define FBSD_TARGET_LINK_SPEC " \
|
|
||||||
+ %{p:%nconsider using `-pg' instead of `-p' with gprof (1) } \
|
|
||||||
+ %{v:-V} \
|
|
||||||
+ %{assert*} %{R*} %{rpath*} %{defsym*} \
|
|
||||||
+ %{shared:-Bshareable %{h*} %{soname*}} \
|
|
||||||
+ %{symbolic:-Bsymbolic} \
|
|
||||||
+ %{static:-Bstatic} \
|
|
||||||
+ %{!static: \
|
|
||||||
+ %{rdynamic:-export-dynamic} \
|
|
||||||
+ %{!shared:-dynamic-linker " FBSD_DYNAMIC_LINKER " }} \
|
|
||||||
+ -X" SUBTARGET_EXTRA_LINK_SPEC " \
|
|
||||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}"
|
|
||||||
+
|
|
||||||
+#if TARGET_FIX_ERR_A53_835769_DEFAULT
|
|
||||||
+#define CA53_ERR_835769_SPEC \
|
|
||||||
+ " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
|
|
||||||
+#else
|
|
||||||
+#define CA53_ERR_835769_SPEC \
|
|
||||||
+ " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#ifdef TARGET_FIX_ERR_A53_843419_DEFAULT
|
|
||||||
+#define CA53_ERR_843419_SPEC \
|
|
||||||
+ " %{!mno-fix-cortex-a53-843419:--fix-cortex-a53-843419}"
|
|
||||||
+#else
|
|
||||||
+#define CA53_ERR_843419_SPEC \
|
|
||||||
+ " %{mfix-cortex-a53-843419:--fix-cortex-a53-843419}"
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#undef LINK_SPEC
|
|
||||||
+#define LINK_SPEC FBSD_TARGET_LINK_SPEC \
|
|
||||||
+ CA53_ERR_835769_SPEC \
|
|
||||||
+ CA53_ERR_843419_SPEC
|
|
||||||
+
|
|
||||||
+#define GNU_USER_TARGET_MATHFILE_SPEC \
|
|
||||||
+ "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
|
|
||||||
+
|
|
||||||
+#undef ENDFILE_SPEC
|
|
||||||
+#define ENDFILE_SPEC \
|
|
||||||
+ GNU_USER_TARGET_MATHFILE_SPEC " " \
|
|
||||||
+ FBSD_ENDFILE_SPEC
|
|
||||||
+
|
|
||||||
+#undef TARGET_OS_CPP_BUILTINS
|
|
||||||
+#define TARGET_OS_CPP_BUILTINS() \
|
|
||||||
+ do \
|
|
||||||
+ { \
|
|
||||||
+ FBSD_TARGET_OS_CPP_BUILTINS (); \
|
|
||||||
+ } \
|
|
||||||
+ while (false)
|
|
||||||
+
|
|
||||||
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
|
||||||
+
|
|
||||||
+/* Uninitialized common symbols in non-PIE executables, even with
|
|
||||||
+ strong definitions in dependent shared libraries, will resolve
|
|
||||||
+ to COPY relocated symbol in the executable. See PR65780. */
|
|
||||||
+#undef TARGET_BINDS_LOCAL_P
|
|
||||||
+#define TARGET_BINDS_LOCAL_P default_binds_local_p_2
|
|
||||||
+
|
|
||||||
+/* Use the AAPCS type for wchar_t, override the one from config/freebsd.h. */
|
|
||||||
+#undef WCHAR_TYPE
|
|
||||||
+#define WCHAR_TYPE "unsigned int"
|
|
||||||
+
|
|
||||||
+#endif /* GCC_AARCH64_FREEBSD_H */
|
|
||||||
Index: gcc/dwarf2out.c
|
|
||||||
===================================================================
|
|
||||||
--- gcc/dwarf2out.c (revision 244100)
|
|
||||||
+++ gcc/dwarf2out.c (working copy)
|
|
||||||
@@ -23752,7 +23752,16 @@
|
|
||||||
{
|
|
||||||
dw_die_ref die = lookup_decl_die (decl);
|
|
||||||
if (die)
|
|
||||||
- add_location_or_const_value_attribute (die, decl, false);
|
|
||||||
+ {
|
|
||||||
+ /* We get called via the symtab code invoking late_global_decl
|
|
||||||
+ for symbols that are optimized out. Do not add locations
|
|
||||||
+ for those. */
|
|
||||||
+ varpool_node *node = varpool_node::get (decl);
|
|
||||||
+ if (! node || ! node->definition)
|
|
||||||
+ tree_add_const_value_attribute_for_decl (die, decl);
|
|
||||||
+ else
|
|
||||||
+ add_location_or_const_value_attribute (die, decl, false);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Index: gcc/cgraphunit.c
|
|
||||||
===================================================================
|
|
||||||
--- gcc/cgraphunit.c (revision 244100)
|
|
||||||
+++ gcc/cgraphunit.c (working copy)
|
|
||||||
@@ -1193,8 +1193,16 @@
|
|
||||||
at looking at optimized away DECLs, since
|
|
||||||
late_global_decl will subsequently be called from the
|
|
||||||
contents of the now pruned symbol table. */
|
|
||||||
- if (!decl_function_context (node->decl))
|
|
||||||
- (*debug_hooks->late_global_decl) (node->decl);
|
|
||||||
+ if (VAR_P (node->decl)
|
|
||||||
+ && !decl_function_context (node->decl))
|
|
||||||
+ {
|
|
||||||
+ /* We are reclaiming totally unreachable code and variables
|
|
||||||
+ so they effectively appear as readonly. Show that to
|
|
||||||
+ the debug machinery. */
|
|
||||||
+ TREE_READONLY (node->decl) = 1;
|
|
||||||
+ node->definition = false;
|
|
||||||
+ (*debug_hooks->late_global_decl) (node->decl);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
node->remove ();
|
|
||||||
continue;
|
|
@ -1,11 +0,0 @@
|
|||||||
--- gcc/ubsan.c.orig 2016-12-07 22:39:29 UTC
|
|
||||||
+++ gcc/ubsan.c
|
|
||||||
@@ -1471,7 +1471,7 @@ ubsan_use_new_style_p (location_t loc)
|
|
||||||
|
|
||||||
expanded_location xloc = expand_location (loc);
|
|
||||||
if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0
|
|
||||||
- || xloc.file == '\0' || xloc.file[0] == '\xff'
|
|
||||||
+ || xloc.file[0] == '\0' || xloc.file[0] == '\xff'
|
|
||||||
|| xloc.file[1] == '\xff')
|
|
||||||
return false;
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
PORTREVISION= 1
|
|
||||||
PKGNAMEPREFIX= sparc64-
|
PKGNAMEPREFIX= sparc64-
|
||||||
PLIST= ${.CURDIR}/pkg-plist
|
PLIST= ${.CURDIR}/pkg-plist
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user