Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Apr 2017 15:03:21 +0000 (UTC)
From:      Gerald Pfeifer <gerald@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r437437 - in head: Mk lang/gcc lang/gcc/files lang/gcc49 lang/gcc5 lang/gcc5-devel
Message-ID:  <201704011503.v31F3LQh000527@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gerald
Date: Sat Apr  1 15:03:21 2017
New Revision: 437437
URL: https://svnweb.freebsd.org/changeset/ports/437437

Log:
  Update lang/gcc and hence the default version of GCC in the Ports
  Collection (requested by USE_GCC=yes and various USES=compiler
  invocations) from GCC 4.9.4 to GCC 5.4.
  
  files/patch-arm-support and files/patch-gcc_system.h have become
  obsolete.  New patches files/patch-arm-unwind-cxx-support and
  files/patch-libc++ help support arm targets and new libc++ in base.
  
  ONLY_FOR_ARCHS now also includes arm.
  
  A new option GRAPHITE_DESC, off by default for now, adds support for
  Graphite loop optimizations.
  
  Finally, conflicts with other lang/gcc* ports are adjusted suitably.
  
  In terms of changes for users, this upgrade brings the following:
  
  The default mode for C is now -std=gnu11 instead of -std=gnu89.
  New warning options -Wc90-c99-compat and -Wc99-c11-compat may
  prove useful on that front.
  
  The C++ front end now has full C++14 language support including
  C++14 variable templates, C++14 aggregates with non-static data
  member initializers, C++14 extended constexpr, and more.
  The Standard C++ Library (libstdc++) has full C++11 support and
  experimental full C++14 support.  It uses a new ABI by default.
  
  There have been significant improvements to inter-procedural optimizations
  and link-time optimization such as One Definition Rule based merging of C++
  types as well as register allocation.
  
  OpenMP 4.0 specification offloading features are now supported by the C,
  C++, and Fortran compilers.  Cilk Plus, an extension to the C and C++
  languages to support data and task parallelism, has been added as well.
  
  New warning options -Wswitch-bool, -Wlogical-not-parentheses,
  -Wbool-compare and -Wsizeof-array-argument may prove useful as
  may new preprocessor directives __has_include, __has_include_next,
  and __has_attribute.
  
  GCC can now be built as a shared library for embedding in other processes
  (such as interpreters), suitable for Just-In-Time compilation to machine
  code.  This provides a C API and a C++ wrapper API.
  
  Many code generation improvements for AArch64, ARM, support for
  AVX-512{BW,DQ,VL,IFMA,VBMI} and Intel MPX on x86-64, and generally
  improvements on many targets.
  
  The Local Register Allocator (LRA) now contains a rematerialization
  subpass and is able to reuse the PIC hard register on x86/x86-64 to
  improve performance of position independent code.
  
  https://gcc.gnu.org/gcc-5/changes.html has a more extensive set of
  changes and https://gcc.gnu.org/gcc-5/porting_to.html has a solid
  overview of issue you may encountering porting to this new version.
  
  PR:             216707, 218125
  Tested by:      antoine (-exp runs)
  Supported by:   jbeich, tcberner, and others

Added:
  head/lang/gcc/files/patch-arm-unwind-cxx-support
     - copied unchanged from r433065, head/lang/gcc5/files/patch-arm-unwind-cxx-support
  head/lang/gcc/files/patch-libc++
     - copied unchanged from r433065, head/lang/gcc5/files/patch-libc++
Deleted:
  head/lang/gcc/files/patch-arm-support
  head/lang/gcc/files/patch-gcc_system.h
Modified:
  head/Mk/bsd.default-versions.mk
  head/lang/gcc/Makefile
  head/lang/gcc/distinfo
  head/lang/gcc/pkg-descr
  head/lang/gcc/pkg-plist
  head/lang/gcc49/Makefile
  head/lang/gcc5-devel/Makefile
  head/lang/gcc5/Makefile

Modified: head/Mk/bsd.default-versions.mk
==============================================================================
--- head/Mk/bsd.default-versions.mk	Sat Apr  1 13:29:14 2017	(r437436)
+++ head/Mk/bsd.default-versions.mk	Sat Apr  1 15:03:21 2017	(r437437)
@@ -38,7 +38,7 @@ FIREBIRD_DEFAULT?=	2.5
 # Possible values: 3.0.0
 FPC_DEFAULT?=		3.0.2
 # Possible values: 4.7, 4.8, 4.9, 5, 6
-GCC_DEFAULT?=		4.9
+GCC_DEFAULT?=		5
 # Possible values: 7, 8, 9, agpl
 GHOSTSCRIPT_DEFAULT?=	agpl
 .if ${ARCH} == amd64
@@ -141,6 +141,6 @@ TCLTK_DEFAULT?=		8.6
 VARNISH_DEFAULT?=	4
 
 # Version of lang/gcc.  Do not override!
-LANG_GCC_IS=		4.9
+LANG_GCC_IS=		5
 
 .endif

Modified: head/lang/gcc/Makefile
==============================================================================
--- head/lang/gcc/Makefile	Sat Apr  1 13:29:14 2017	(r437436)
+++ head/lang/gcc/Makefile	Sat Apr  1 15:03:21 2017	(r437437)
@@ -2,13 +2,12 @@
 # $FreeBSD$
 
 PORTNAME=	gcc
-PORTVERSION=	4.9.4
-PORTREVISION=	1
+PORTVERSION=	5.4.0
 CATEGORIES=	lang java
 MASTER_SITES=	GCC/releases/gcc-${DISTVERSION}
 
 MAINTAINER=	gerald@FreeBSD.org
-COMMENT=	GNU Compiler Collection 4.9
+COMMENT=	GNU Compiler Collection 5
 
 LICENSE=	GPLv3 GPLv3RLE
 LICENSE_COMB=	multi
@@ -23,28 +22,28 @@ RUN_DEPENDS+=	${LOCALBASE}/bin/as:devel/
 BUILD_DEPENDS+=	runtest:misc/dejagnu
 .endif
 
-CONFLICTS=	gcc49*
+CONFLICTS=	gcc5*
 CPE_VENDOR=	gnu
 
 # GCC_VERSION and SUFFIX relate to names of executables and directories
 # once installed.
 GCC_VERSION=	${PORTVERSION}
-SUFFIX=		${PORTVERSION:C/([0-9]+).([0-9]+).*/\1\2/}
-ONLY_FOR_ARCHS=	amd64 armv6 i386 powerpc powerpc64 sparc64
+SUFFIX=		${PORTVERSION:C/([0-9]+).*/\1/}
+ONLY_FOR_ARCHS=	amd64 arm armv6 i386 powerpc powerpc64 sparc64
 USES=		compiler cpe gmake iconv libtool makeinfo perl5 tar:bzip2
 USE_BINUTILS=	yes
 USE_PERL5=	build
 SSP_UNSAFE=	yes
 
-OPTIONS_DEFINE=		BOOTSTRAP
+OPTIONS_DEFINE=		BOOTSTRAP GRAPHITE
 OPTIONS_DEFINE_i386=	JAVA
 OPTIONS_DEFINE_amd64=	JAVA
 OPTIONS_DEFINE_powerpc64=	JAVA
 OPTIONS_DEFAULT_i386=	JAVA
 OPTIONS_DEFAULT_amd64=	JAVA
-OPTIONS_DEFAULT_powerpc64=	BOOTSTRAP
 OPTIONS_EXCLUDE_DragonFly=	JAVA
 BOOTSTRAP_DESC=		Build using a full bootstrap
+GRAPHITE_DESC=		Support for Graphite loop optimizations
 
 .if exists(/usr/lib32/libc.so)
 OPTIONS_DEFINE_powerpc64+=	MULTILIB
@@ -66,8 +65,6 @@ CONFIGURE_ENV+=	UNAME_m="powerpc64"
 .endif
 
 .if ${ARCH} == "armv6"
-# Override sys.mk including -O in CFLAGS which breaks libgomp building.
-CFLAGS:=	${CFLAGS:S/-O/-O2/g}
 . if ${COMPILER_TYPE} == clang
 .  if empty(PORT_OPTIONS:MBOOTSTRAP)
 MAKE_ARGS+=CXXFLAGS=-fbracket-depth=512
@@ -120,6 +117,11 @@ INFO+=		gcc${SUFFIX}/libquadmath \
 SUB_FILES=	pkg-message
 SUB_LIST+=	TARGLIB=${TARGLIB}
 
+.if ${PORT_OPTIONS:MGRAPHITE}
+LIB_DEPENDS+=	libisl.so:devel/isl
+CONFIGURE_ARGS+=--with-isl=${LOCALBASE}
+.endif
+
 .if ${PORT_OPTIONS:MJAVA}
 ECJ_JAR=	${LOCALBASE}/share/java/ecj-4.5.jar
 BUILD_DEPENDS+=	${ECJ_JAR}:lang/gcc-ecj45 \

Modified: head/lang/gcc/distinfo
==============================================================================
--- head/lang/gcc/distinfo	Sat Apr  1 13:29:14 2017	(r437436)
+++ head/lang/gcc/distinfo	Sat Apr  1 15:03:21 2017	(r437437)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1478034530
-SHA256 (gcc-4.9.4.tar.bz2) = 6c11d292cd01b294f9f84c9a59c230d80e9e4a47e5c6355f046bb36d4f358092
-SIZE (gcc-4.9.4.tar.bz2) = 90097606
+TIMESTAMP = 1490558722
+SHA256 (gcc-5.4.0.tar.bz2) = 608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a
+SIZE (gcc-5.4.0.tar.bz2) = 95661481

Copied: head/lang/gcc/files/patch-arm-unwind-cxx-support (from r433065, head/lang/gcc5/files/patch-arm-unwind-cxx-support)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/gcc/files/patch-arm-unwind-cxx-support	Sat Apr  1 15:03:21 2017	(r437437, copy of r433065, head/lang/gcc5/files/patch-arm-unwind-cxx-support)
@@ -0,0 +1,106 @@
+--- 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 @@
+ 
+   struct _Unwind_Control_Block
+     {
++#ifdef __FreeBSD__
++      unsigned exception_class __attribute__((__mode__(__DI__)));
++#else
+       char exception_class[8];
++#endif
+       void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *);
+       /* Unwinder cache, private fields for the unwinder's use */
+       struct
+@@ -181,7 +185,11 @@
+ 
+   /* Support functions for the PR.  */
+ #define _Unwind_Exception _Unwind_Control_Block
++#ifdef __FreeBSD__
++  typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__)));
++#else
+   typedef char _Unwind_Exception_Class[8];
++#endif
+ 
+   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 @@
+   return reinterpret_cast<__cxa_dependent_exception *>(exc + 1) - 1;
+ }
+ 
+-#ifdef __ARM_EABI_UNWINDER__
++#if defined(__ARM_EABI_UNWINDER__) && !defined(__FreeBSD__)
+ static inline bool
+ __is_gxx_exception_class(_Unwind_Exception_Class c)
+ {
+@@ -309,13 +309,7 @@
+   c[6] = 'R';
+   c[7] = '\0';
+ }
+-
+-static inline void*
+-__gxx_caught_object(_Unwind_Exception* eo)
+-{
+-  return (void*)eo->barrier_cache.bitpattern[0];
+-}
+-#else // !__ARM_EABI_UNWINDER__
++#else // !__ARM_EABI_UNWINDER__ || __FreeBSD__
+ // 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 @@
+     << 8 | (_Unwind_Exception_Class) '+')
+    << 8 | (_Unwind_Exception_Class) '\x01');
+ 
++const _Unwind_Exception_Class __gxx_forced_unwind_class
++= ((((((((_Unwind_Exception_Class) 'G'
++        << 8 | (_Unwind_Exception_Class) 'N')
++       << 8 | (_Unwind_Exception_Class) 'U')
++      << 8 | (_Unwind_Exception_Class) 'C')
++     << 8 | (_Unwind_Exception_Class) 'F')
++    << 8 | (_Unwind_Exception_Class) 'O')
++   << 8 | (_Unwind_Exception_Class) 'R')
++  << 8 | (_Unwind_Exception_Class) '\0');
++
+ static inline bool
+ __is_gxx_exception_class(_Unwind_Exception_Class c)
+ {
+@@ -346,6 +350,12 @@
+       || c == __gxx_dependent_exception_class;
+ }
+ 
++static inline bool
++__is_gxx_forced_unwind_class(_Unwind_Exception_Class c)
++{
++  return c ==  __gxx_forced_unwind_class;
++}
++
+ // Only checks for primary or dependent, but not that it is a C++ exception at
+ // all.
+ static inline bool
+@@ -357,7 +367,18 @@
+ #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)
++{
++    return (void*)eo->barrier_cache.bitpattern[0];
++}
++
++#else // !__ARM_EABI_UNWINDER__
++
+ // GNU C++ personality routine, Version 0.
+ extern "C" _Unwind_Reason_Code __gxx_personality_v0
+      (int, _Unwind_Action, _Unwind_Exception_Class,

Copied: head/lang/gcc/files/patch-libc++ (from r433065, head/lang/gcc5/files/patch-libc++)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/gcc/files/patch-libc++	Sat Apr  1 15:03:21 2017	(r437437, copy of r433065, head/lang/gcc5/files/patch-libc++)
@@ -0,0 +1,43 @@
+--- gcc/auto-profile.c.orig	2015-01-18 02:25:42 UTC
++++ gcc/auto-profile.c
+@@ -19,11 +19,9 @@ along with GCC; see the file COPYING3.  
+ <http://www.gnu.org/licenses/>.  */
+ 
+ #include "config.h"
+-#include "system.h"
+-
+-#include <string.h>
+ #include <map>
+ #include <set>
++#include "system.h"
+ 
+ #include "coretypes.h"
+ #include "hash-set.h"
+--- gcc/graphite-isl-ast-to-gimple.c.orig	2017-01-19 21:02:12 UTC
++++ gcc/graphite-isl-ast-to-gimple.c
+@@ -38,6 +38,7 @@ extern "C" {
+ #endif
+ #endif
+ 
++#include <map>
+ #include "system.h"
+ #include "coretypes.h"
+ #include "hash-set.h"
+@@ -75,7 +76,6 @@ extern "C" {
+ #include "tree-scalar-evolution.h"
+ #include "gimple-ssa.h"
+ #include "tree-into-ssa.h"
+-#include <map>
+ 
+ #ifdef HAVE_isl
+ #include "graphite-poly.h"
+--- gcc/system.h.orig	2015-01-05 12:33:28 UTC
++++ gcc/system.h
+@@ -217,6 +217,7 @@ extern int errno;
+ #ifdef __cplusplus
+ # include <algorithm>
+ # include <cstring>
++# include <new>
+ # include <utility>
+ #endif
+ 

Modified: head/lang/gcc/pkg-descr
==============================================================================
--- head/lang/gcc/pkg-descr	Sat Apr  1 13:29:14 2017	(r437436)
+++ head/lang/gcc/pkg-descr	Sat Apr  1 15:03:21 2017	(r437437)
@@ -1,9 +1,10 @@
 GCC, the GNU Compiler Collection, supports a number of languages.  This
-port installs the C, C++, Fortran and Java front ends as gcc49, g++49,
-gfortran49, and gcj49, respectively.
+port installs the C, C++, Fortran and Java front ends as gcc5, g++5,
+gfortran5, and gcj5, respectively.
 
-It can be used interchangibly with the lang/gcc49 port, which tracks
-GCC 4.9 releases, and will move to lang/gcc5 and later over time.
+It can be used (largely) interchangibly with the lang/gcc5 port, which
+tracks GCC 5 releases, or the lang/gcc5-devel port, which tracks GCC 5
+snapshots, and will move to GCC 6 and later over time.
 
 WWW: http://gcc.gnu.org/
 

Modified: head/lang/gcc/pkg-plist
==============================================================================
--- head/lang/gcc/pkg-plist	Sat Apr  1 13:29:14 2017	(r437436)
+++ head/lang/gcc/pkg-plist	Sat Apr  1 15:03:21 2017	(r437437)
@@ -16,6 +16,7 @@ bin/gcc-ar%%SUFFIX%%
 bin/gcc-nm%%SUFFIX%%
 bin/gcc-ranlib%%SUFFIX%%
 bin/gcov%%SUFFIX%%
+bin/gcov-tool%%SUFFIX%%
 bin/gfortran
 bin/gfortran%%SUFFIX%%
 @comment info/gcc%%SUFFIX%%/dir
@@ -29,6 +30,7 @@ man/man1/gfortran%%SUFFIX%%.1.gz
 share/gcc-%%GCC_VERSION%%/python/libstdcxx/__init__.py
 share/gcc-%%GCC_VERSION%%/python/libstdcxx/v6/__init__.py
 share/gcc-%%GCC_VERSION%%/python/libstdcxx/v6/printers.py
+share/gcc-%%GCC_VERSION%%/python/libstdcxx/v6/xmethods.py
 %%JAVA%%bin/%%GNU_HOST%%-gcj%%SUFFIX%%
 %%JAVA%%bin/aot-compile%%SUFFIX%%
 %%JAVA%%bin/gappletviewer%%SUFFIX%%
@@ -50,7 +52,7 @@ share/gcc-%%GCC_VERSION%%/python/libstdc
 %%JAVA%%bin/gtnameserv%%SUFFIX%%
 %%JAVA%%bin/jcf-dump%%SUFFIX%%
 %%JAVA%%bin/jv-convert%%SUFFIX%%
-%%JAVA%%libdata/pkgconfig/libgcj-4.9.pc
+%%JAVA%%libdata/pkgconfig/libgcj-5.pc
 %%JAVA%%man/man1/aot-compile%%SUFFIX%%.1.gz
 %%JAVA%%man/man1/gappletviewer%%SUFFIX%%.1.gz
 %%JAVA%%man/man1/gc-analyze%%SUFFIX%%.1.gz

Modified: head/lang/gcc49/Makefile
==============================================================================
--- head/lang/gcc49/Makefile	Sat Apr  1 13:29:14 2017	(r437436)
+++ head/lang/gcc49/Makefile	Sat Apr  1 15:03:21 2017	(r437437)
@@ -24,7 +24,6 @@ RUN_DEPENDS+=	${LOCALBASE}/bin/as:devel/
 BUILD_DEPENDS+=	runtest:misc/dejagnu
 .endif
 
-CONFLICTS=	gcc-4.9.*
 CPE_VENDOR=	gnu
 
 # GCC_VERSION and SUFFIX relate to names of executables and directories

Modified: head/lang/gcc5-devel/Makefile
==============================================================================
--- head/lang/gcc5-devel/Makefile	Sat Apr  1 13:29:14 2017	(r437436)
+++ head/lang/gcc5-devel/Makefile	Sat Apr  1 15:03:21 2017	(r437437)
@@ -23,6 +23,7 @@ RUN_DEPENDS+=	${LOCALBASE}/bin/as:devel/
 BUILD_DEPENDS+=	runtest:misc/dejagnu
 .endif
 
+CONFLICTS=	gcc-5.*
 CPE_VENDOR=	gnu
 CPE_VERSION=	${GCC_VERSION}
 

Modified: head/lang/gcc5/Makefile
==============================================================================
--- head/lang/gcc5/Makefile	Sat Apr  1 13:29:14 2017	(r437436)
+++ head/lang/gcc5/Makefile	Sat Apr  1 15:03:21 2017	(r437437)
@@ -23,6 +23,7 @@ RUN_DEPENDS+=	${LOCALBASE}/bin/as:devel/
 BUILD_DEPENDS+=	runtest:misc/dejagnu
 .endif
 
+CONFLICTS=	gcc-5.*
 CPE_VENDOR=	gnu
 
 GCC_VERSION=	${PORTVERSION}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704011503.v31F3LQh000527>