Index: head/Mk/bsd.default-versions.mk =================================================================== --- head/Mk/bsd.default-versions.mk (revision 426564) +++ head/Mk/bsd.default-versions.mk (revision 426565) @@ -1,139 +1,139 @@ # $FreeBSD$ # # MAINTAINER: ports@FreeBSD.org # # Provide default versions for ports with multiple versions selectable # by the user. # # Users who want to override these defaults can easily do so by defining # DEFAULT_VERSIONS in their make.conf as follows: # # DEFAULT_VERSIONS= perl5=5.18 ruby=2.0 .if !defined(_INCLUDE_BSD_DEFAULT_VERSIONS_MK) _INCLUDE_BSD_DEFAULT_VERSIONS_MK= yes LOCALBASE?= /usr/local .for lang in APACHE BDB FIREBIRD FPC GCC GHOSTSCRIPT LINUX LUA MYSQL PERL5 \ PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY SSL TCLTK .if defined(${lang}_DEFAULT) WARNING+= "The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf" WARNING+= "This behaviour has never been supported and will be removed on 2017-01-31" .endif #.undef ${lang}_DEFAULT .endfor .for lang in ${DEFAULT_VERSIONS} _l= ${lang:C/=.*//g} ${_l:tu}_DEFAULT= ${lang:C/.*=//g} .endfor # Possible values: 2.2, 2.4 APACHE_DEFAULT?= 2.4 # Possible values: 48, 5, 6 BDB_DEFAULT?= 5 # Possible values: 2.5 FIREBIRD_DEFAULT?= 2.5 # Possible values: 3.0.0 FPC_DEFAULT?= 3.0.0 # Possible values: 4.6, 4.7, 4.8, 4.9, 5 -GCC_DEFAULT?= 4.8 +GCC_DEFAULT?= 4.9 # Possible values: 7, 8, 9, agpl GHOSTSCRIPT_DEFAULT?= agpl # Possible values: f10, c6, c6_64, c7, c7_64 LINUX_DEFAULT?= c6 .if defined(OVERRIDE_LINUX_BASE_PORT) LINUX_DEFAULT:= ${OVERRIDE_LINUX_BASE_PORT} WARNING+= "OVERRIDE_LINUX_BASE_PORT is deprecated, please use DEFAULT_VERSIONS+=linux=${OVERRIDE_LINUX_BASE_PORT}." .endif # Possible values: 5.1, 5.2, 5.3 LUA_DEFAULT?= 5.2 # Possible values: 5.1, 5.5, 5.6, 5.7, 5.5m, 10.0m, 10.1m, 5.5p, 5.6p MYSQL_DEFAULT?= 5.6 # Possible values: 5.18, 5.20, 5.22, devel .if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \ defined(PACKAGE_BUILDING)) PERL5_DEFAULT?= 5.24 .elif !defined(PERL5_DEFAULT) # There's no need to replace development versions, like "5.23" with "devel" # because 1) nobody is supposed to use it outside of poudriere, and 2) it must # be set manually in /etc/make.conf in the first place, and we're never getting # in here. .if !defined(_PERL5_FROM_BIN) _PERL5_FROM_BIN!= perl -e 'printf "%vd\n", $$^V;' .endif _EXPORTED_VARS+= _PERL5_FROM_BIN PERL5_DEFAULT:= ${_PERL5_FROM_BIN:R} .endif # Possible values: 9.2, 9.3, 9.4, 9.5, 9.6 PGSQL_DEFAULT?= 9.3 # Possible values: 5.6, 7.0 PHP_DEFAULT?= 5.6 # Possible values: 2.7, 3.3, 3.4, 3.5 PYTHON_DEFAULT?= 2.7 # Possible values: 2.7 PYTHON2_DEFAULT?= 2.7 # Possible values: 3.3, 3.4, 3.5 PYTHON3_DEFAULT?= 3.5 # Possible values: 2.0, 2.1, 2.2, 2.3 RUBY_DEFAULT?= 2.2 # Possible values: base, openssl, openssl-devel, libressl, libressl-devel .if !defined(SSL_DEFAULT) # If no preference was set, check for an installed base version # but give an installed port preference over it. . if defined(WITH_OPENSSL_PORT) . if defined(OPENSSL_PORT) SSL_DEFAULT:=${OPENSSL_PORT:T} WARNING+= "Using WITH_OPENSSL_PORT and OPENSSL_PORT in make.conf is deprecated, replace them with DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT} in your make.conf" . else SSL_DEFAULT=openssl WARNING+= "Using WITH_OPENSSL_PORT in make.conf is deprecated, replace it with DEFAULT_VERSIONS+=ssl=openssl in your make.conf" . endif . elif defined(WITH_OPENSSL_BASE) SSL_DEFAULT=base WARNING+= "Using WITH_OPENSSL_BASE in make.conf is deprecated, replace it with DEFAULT_VERSIONS+=ssl=base in your make.conf" . elif !defined(WITH_OPENSSL_BASE) && \ !defined(WITH_OPENSSL_PORT) && \ !defined(SSL_DEFAULT) && \ !exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) && \ exists(${DESTDIR}/usr/include/openssl/opensslv.h) SSL_DEFAULT= base . else . if exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) . if defined(PKG_BIN) # find installed port and use it for dependency . if !defined(OPENSSL_INSTALLED) . if defined(DESTDIR) PKGARGS= -c ${DESTDIR} . else PKGARGS= . endif OPENSSL_INSTALLED!= ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libcrypto.so || : . endif . if defined(OPENSSL_INSTALLED) && !empty(OPENSSL_INSTALLED) SSL_DEFAULT:= ${OPENSSL_INSTALLED:T} WARNING+= "You have ${OPENSSL_INSTALLED} installed but do not have DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT} set in your make.conf" . endif . else check-makevars:: @${ECHO_MSG} "You have a ${LOCALBASE}/lib/libcrypto.so file installed, but the framework is unable" @${ECHO_MSG} "to determine what port it comes from." @${ECHO_MSG} "Add DEFAULT_VERSIONS+=ssl= to your /etc/make.conf and try again." @${FALSE} . endif . endif . endif # Make sure we have a default in the end SSL_DEFAULT?= base .endif # Possible values: 8.4, 8.5, 8.6 TCLTK_DEFAULT?= 8.6 # Possible values: 4, 5 VARNISH_DEFAULT?= 4 # Version of lang/gcc. Do not override! -LANG_GCC_IS= 4.8 +LANG_GCC_IS= 4.9 .endif Index: head/lang/gcc/Makefile =================================================================== --- head/lang/gcc/Makefile (revision 426564) +++ head/lang/gcc/Makefile (revision 426565) @@ -1,174 +1,174 @@ # Created by: Gerald Pfeifer # $FreeBSD$ PORTNAME= gcc -PORTVERSION= 4.8.5 -PORTREVISION= 2 +PORTVERSION= 4.9.4 CATEGORIES= lang java MASTER_SITES= GCC/releases/gcc-${DISTVERSION} MAINTAINER= gerald@FreeBSD.org -COMMENT= GNU Compiler Collection 4.8 +COMMENT= GNU Compiler Collection 4.9 LICENSE= GPLv3 GPLv3RLE LICENSE_COMB= multi LIB_DEPENDS= libgmp.so:math/gmp \ libmpfr.so:math/mpfr \ libmpc.so:math/mpc BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils RUN_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils .if defined(MAINTAINER_MODE) BUILD_DEPENDS+= runtest:misc/dejagnu .endif -CONFLICTS= gcc48* +CONFLICTS= gcc49* CPE_VENDOR= gnu # DISTVERSION relates to downloads, GCC_VERSION and SUFFIX to names # of executables and directories once installed. DISTVERSION= ${PORTVERSION} GCC_VERSION= ${PORTVERSION:C/(.+)\.[0-9]{8}/\1/} SUFFIX= ${PORTVERSION:C/([0-9]+).([0-9]+).*/\1\2/} ONLY_FOR_ARCHS= amd64 armv6 armv6hf 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_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 .if exists(/usr/lib32/libc.so) OPTIONS_DEFINE_powerpc64+= MULTILIB OPTIONS_DEFAULT_powerpc64+= MULTILIB MULTILIB_DESC= Build support for 32-bit and 64-bit targets MULTILIB_CONFIGURE_ENABLE= multilib .else CONFIGURE_ARGS+= --disable-multilib .endif .include .if ${ARCH} == "amd64" CONFIGURE_TARGET= x86_64-portbld-${OPSYS:tl}${OSREL} .endif .if ${ARCH} == powerpc64 CONFIGURE_ENV+= UNAME_m="powerpc64" .endif .if ${ARCH} == "armv6" || ${ARCH} == "armv6hf" # 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 . else MAKE_ARGS+=STAGE1_CXXFLAGS=-fbracket-depth=512 . endif . endif .endif LANGUAGES:= c,c++,objc,fortran TARGLIB= ${PREFIX}/lib/gcc${SUFFIX} LIBEXEC= ${PREFIX}/libexec/gcc${SUFFIX} GNU_CONFIGURE= yes CONFIGURE_OUTSOURCE= yes .if empty(PORT_OPTIONS:MBOOTSTRAP) CONFIGURE_ARGS+=--disable-bootstrap .else CONFIGURE_ARGS+=--with-build-config=bootstrap-debug ALL_TARGET= bootstrap-lean .endif CONFIGURE_ARGS+=--disable-nls \ --enable-gnu-indirect-function \ --libdir=${TARGLIB} \ --libexecdir=${LIBEXEC} \ --program-suffix=${SUFFIX} \ --with-as=${LOCALBASE}/bin/as \ --with-gmp=${LOCALBASE} \ --with-gxx-include-dir=${TARGLIB}/include/c++/ \ --with-ld=${LOCALBASE}/bin/ld \ ${ICONV_CONFIGURE_ARG} \ --with-pkgversion="FreeBSD Ports Collection" \ --with-system-zlib # On FreeBSD 11 and above AWK uses the locale's collating order which # runs into a bug in GCC (PR 211742). MAKE_ARGS+= MAKEINFOFLAGS="--no-split" \ AWK="${SETENV} LC_ALL=C ${AWK:Q}" USE_LDCONFIG= ${TARGLIB} PLIST_SUB= GCC_VERSION=${GCC_VERSION} \ GNU_HOST=${CONFIGURE_TARGET} \ SUFFIX=${SUFFIX} INFO= gcc${SUFFIX}/cpp \ gcc${SUFFIX}/cppinternals \ gcc${SUFFIX}/gcc \ gcc${SUFFIX}/gccinstall \ gcc${SUFFIX}/gccint \ gcc${SUFFIX}/gfortran \ gcc${SUFFIX}/libgomp # Release tarballs (as opposed to snapshots) always carry this. #.if ${ARCH} == "i386" || ${ARCH} == "amd64" INFO+= gcc${SUFFIX}/libquadmath \ gcc${SUFFIX}/libitm #.endif SUB_FILES= pkg-message SUB_LIST+= TARGLIB=${TARGLIB} .if ${PORT_OPTIONS:MJAVA} ECJ_JAR= ${LOCALBASE}/share/java/ecj-4.5.jar BUILD_DEPENDS+= ${ECJ_JAR}:lang/gcc-ecj45 \ zip:archivers/zip RUN_DEPENDS+= ${ECJ_JAR}:lang/gcc-ecj45 EXTRA_PATCHES+= ${FILESDIR}/java-patch-hier CONFIGURE_ARGS+=--with-ecj-jar=${ECJ_JAR} LANGUAGES:= ${LANGUAGES},java INFO+= gcc${SUFFIX}/cp-tools \ gcc${SUFFIX}/gcj PLIST_SUB+= JAVA="" .else CONFIGURE_ARGS+=--disable-libgcj PLIST_SUB+= JAVA="@comment " .endif CONFIGURE_ARGS+=--enable-languages=${LANGUAGES} pre-everything:: @${ECHO_MSG} "Making GCC ${PORTVERSION} for ${CONFIGURE_TARGET} [${LANGUAGES}]" pre-configure: cd ${WRKSRC} ; contrib/gcc_update --touch @${RM} ${WRKSRC}/gcc/*/*.info* .if defined(MAINTAINER_MODE) full-regression-test: build cd ${TEST_WRKSRC}; ${MAKE_CMD} -sk check \ ; ${WRKSRC}/contrib/test_summary .endif post-stage: ${RM} ${STAGEDIR}${PREFIX}/man/man7/* ${RM} ${STAGEDIR}${PREFIX}/bin/rebuild-gcj-db${SUFFIX} \ ${STAGEDIR}${PREFIX}/man/man1/rebuild-gcj-db${SUFFIX}.1 # Add target libraries and include files to packaging list. ${RM} ${WRKDIR}/PLIST.lib .for d in ${TARGLIB:S/^${PREFIX}\///} ${LIBEXEC:S/^${PREFIX}\///} include/gcj include/gnu include/java include/javax cd ${STAGEDIR}${PREFIX} ; if [ -d $d ]; then \ ${FIND} $d -type f -o -type l >>${WRKDIR}/PLIST.lib ;\ fi .endfor cd ${WRKDIR} ; ${SED} -i -e "/PLIST.lib/ r PLIST.lib" ${TMPPLIST} # This is the canonical GCC port, so add key commands without # version numbers as part of their names. for c in gfortran g++ gcc; do \ ${LN} -s ${PREFIX}/bin/"$$c"${SUFFIX} ${STAGEDIR}${PREFIX}/bin/$$c ; \ done .include Index: head/lang/gcc/distinfo =================================================================== --- head/lang/gcc/distinfo (revision 426564) +++ head/lang/gcc/distinfo (revision 426565) @@ -1,3 +1,3 @@ -TIMESTAMP = 1471124229 -SHA256 (gcc-4.8.5.tar.bz2) = 22fb1e7e0f68a63cee631d85b20461d1ea6bda162f03096350e38c8d427ecf23 -SIZE (gcc-4.8.5.tar.bz2) = 86165587 +TIMESTAMP = 1478034530 +SHA256 (gcc-4.9.4.tar.bz2) = 6c11d292cd01b294f9f84c9a59c230d80e9e4a47e5c6355f046bb36d4f358092 +SIZE (gcc-4.9.4.tar.bz2) = 90097606 Index: head/lang/gcc/files/patch-stackprotector-gcc =================================================================== --- head/lang/gcc/files/patch-stackprotector-gcc (revision 426564) +++ head/lang/gcc/files/patch-stackprotector-gcc (nonexistent) @@ -1,157 +0,0 @@ ---- gcc/cfgexpand.c.orig -+++ gcc/cfgexpand.c -@@ -1291,6 +1291,12 @@ - clear_tree_used (t); - } - -+ enum { -+ SPCT_FLAG_DEFAULT = 1, -+ SPCT_FLAG_ALL = 2, -+ SPCT_FLAG_STRONG = 3 -+ }; -+ - /* Examine TYPE and determine a bit mask of the following features. */ - - #define SPCT_HAS_LARGE_CHAR_ARRAY 1 -@@ -1360,7 +1366,8 @@ - if (bits & SPCT_HAS_SMALL_CHAR_ARRAY) - has_short_buffer = true; - -- if (flag_stack_protect == 2) -+ if (flag_stack_protect == SPCT_FLAG_ALL -+ || flag_stack_protect == SPCT_FLAG_STRONG) - { - if ((bits & (SPCT_HAS_SMALL_CHAR_ARRAY | SPCT_HAS_LARGE_CHAR_ARRAY)) - && !(bits & SPCT_HAS_AGGREGATE)) -@@ -1514,6 +1521,27 @@ - return size; - } - -+/* Helper routine to check if a record or union contains an array field. */ -+ -+static int -+record_or_union_type_has_array_p (const_tree tree_type) -+{ -+ tree fields = TYPE_FIELDS (tree_type); -+ tree f; -+ -+ for (f = fields; f; f = DECL_CHAIN (f)) -+ if (TREE_CODE (f) == FIELD_DECL) -+ { -+ tree field_type = TREE_TYPE (f); -+ if (RECORD_OR_UNION_TYPE_P (field_type) -+ && record_or_union_type_has_array_p (field_type)) -+ return 1; -+ if (TREE_CODE (field_type) == ARRAY_TYPE) -+ return 1; -+ } -+ return 0; -+} -+ - /* Expand all variables used in the function. */ - - static rtx -@@ -1525,6 +1553,7 @@ - struct pointer_map_t *ssa_name_decls; - unsigned i; - unsigned len; -+ bool gen_stack_protect_signal = false; - - /* Compute the phase of the stack frame for this function. */ - { -@@ -1575,6 +1604,24 @@ - } - } - pointer_map_destroy (ssa_name_decls); -+ -+ if (flag_stack_protect == SPCT_FLAG_STRONG) -+ FOR_EACH_LOCAL_DECL (cfun, i, var) -+ if (!is_global_var (var)) -+ { -+ tree var_type = TREE_TYPE (var); -+ /* Examine local referenced variables that have their addresses taken, -+ contain an array, or are arrays. */ -+ if (TREE_CODE (var) == VAR_DECL -+ && (TREE_CODE (var_type) == ARRAY_TYPE -+ || TREE_ADDRESSABLE (var) -+ || (RECORD_OR_UNION_TYPE_P (var_type) -+ && record_or_union_type_has_array_p (var_type)))) -+ { -+ gen_stack_protect_signal = true; -+ break; -+ } -+ } - - /* At this point all variables on the local_decls with TREE_USED - set are not associated with any block scope. Lay them out. */ -@@ -1662,12 +1709,32 @@ - dump_stack_var_partition (); - } - -- /* There are several conditions under which we should create a -- stack guard: protect-all, alloca used, protected decls present. */ -- if (flag_stack_protect == 2 -- || (flag_stack_protect -- && (cfun->calls_alloca || has_protected_decls))) -- create_stack_guard (); -+ /* Create stack guard, if -+ a) "-fstack-protector-all" - always; -+ b) "-fstack-protector-strong" - if there are arrays, memory -+ references to local variables, alloca used, or protected decls present; -+ c) "-fstack-protector" - if alloca used, or protected decls present */ -+ -+ switch (flag_stack_protect) -+ { -+ case SPCT_FLAG_ALL: -+ create_stack_guard (); -+ break; -+ -+ case SPCT_FLAG_STRONG: -+ if (gen_stack_protect_signal -+ || cfun->calls_alloca || has_protected_decls) -+ create_stack_guard (); -+ break; -+ -+ case SPCT_FLAG_DEFAULT: -+ if (cfun->calls_alloca || has_protected_decls) -+ create_stack_guard (); -+ break; -+ -+ default: -+ ; -+ } - - /* Assign rtl to each variable based on these partitions. */ - if (stack_vars_num > 0) -@@ -1688,7 +1755,7 @@ - expand_stack_vars (stack_protect_decl_phase_1, &data); - - /* Phase 2 contains other kinds of arrays. */ -- if (flag_stack_protect == 2) -+ if (flag_stack_protect == SPCT_FLAG_ALL) - expand_stack_vars (stack_protect_decl_phase_2, &data); - } - ---- gcc/common.opt.orig -+++ gcc/common.opt -@@ -1942,6 +1942,10 @@ fstack-protector-all - Common Report RejectNegative Var(flag_stack_protect, 2) - Use a stack protection method for every function - -+fstack-protector-strong -+Common Report RejectNegative Var(flag_stack_protect, 3) -+Use a smart stack protection method for certain functions -+ - fstack-usage - Common RejectNegative Var(flag_stack_usage) - Output stack usage information on a per-function basis ---- gcc/gcc.c.orig -+++ gcc/gcc.c -@@ -655,7 +655,7 @@ proper position among the other output files. */ - #ifdef TARGET_LIBC_PROVIDES_SSP - #define LINK_SSP_SPEC "%{fstack-protector:}" - #else --#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}" -+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-strong|fstack-protector-all:-lssp_nonshared -lssp}" - #endif - #endif Property changes on: head/lang/gcc/files/patch-stackprotector-gcc ___________________________________________________________________ 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 Index: head/lang/gcc/files/patch-stackprotector-gcc_c-family =================================================================== --- head/lang/gcc/files/patch-stackprotector-gcc_c-family (revision 426564) +++ head/lang/gcc/files/patch-stackprotector-gcc_c-family (nonexistent) @@ -1,11 +0,0 @@ ---- gcc/c-family/c-cppbuiltin.c.orig -+++ gcc/c-family/c-cppbuiltin.c -@@ -888,6 +888,8 @@ c_cpp_builtins (cpp_reader *pfile) - /* Make the choice of the stack protector runtime visible to source code. - The macro names and values here were chosen for compatibility with an - earlier implementation, i.e. ProPolice. */ -+ if (flag_stack_protect == 3) -+ cpp_define (pfile, "__SSP_STRONG__=3"); - if (flag_stack_protect == 2) - cpp_define (pfile, "__SSP_ALL__=2"); - else if (flag_stack_protect == 1) Property changes on: head/lang/gcc/files/patch-stackprotector-gcc_c-family ___________________________________________________________________ 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 Index: head/lang/gcc/files/patch-stackprotector-gcc_doc =================================================================== --- head/lang/gcc/files/patch-stackprotector-gcc_doc (revision 426564) +++ head/lang/gcc/files/patch-stackprotector-gcc_doc (nonexistent) @@ -1,39 +0,0 @@ ---- gcc/doc/cpp.texi.orig -+++ gcc/doc/cpp.texi -@@ -2349,6 +2349,10 @@ use. - This macro is defined, with value 2, when @option{-fstack-protector-all} is - in use. - -+@item __SSP_STRONG__ -+This macro is defined, with value 3, when @option{-fstack-protector-strong} is -+in use. -+ - @item __SANITIZE_ADDRESS__ - This macro is defined, with value 1, when @option{-fsanitize=address} is - in use. ---- gcc/doc/invoke.texi.orig -+++ gcc/doc/invoke.texi -@@ -407,8 +407,8 @@ Objective-C and Objective-C++ Dialects}. - -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops @gol - -fshrink-wrap -fsignaling-nans -fsingle-precision-constant @gol - -fsplit-ivs-in-unroller -fsplit-wide-types -fstack-protector @gol ---fstack-protector-all -fstrict-aliasing -fstrict-overflow @gol ---fthread-jumps -ftracer -ftree-bit-ccp @gol -+-fstack-protector-all -fstack-protector-strong -fstrict-aliasing @gol -+-fstrict-overflow -fthread-jumps -ftracer -ftree-bit-ccp @gol - -ftree-builtin-call-dce -ftree-ccp -ftree-ch @gol - -ftree-coalesce-inline-vars -ftree-coalesce-vars -ftree-copy-prop @gol - -ftree-copyrename -ftree-dce -ftree-dominator-opts -ftree-dse @gol -@@ -8957,6 +8957,12 @@ If a guard check fails, an error message is printed and the program exits. - @opindex fstack-protector-all - Like @option{-fstack-protector} except that all functions are protected. - -+@item -fstack-protector-strong -+@opindex fstack-protector-strong -+Like @option{-fstack-protector} but includes additional functions to -+be protected --- those that have local array definitions, or have -+references to local frame addresses. -+ - @item -fsection-anchors - @opindex fsection-anchors - Try to reduce the number of symbolic address calculations by using Property changes on: head/lang/gcc/files/patch-stackprotector-gcc_doc ___________________________________________________________________ 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 Index: head/lang/gcc/files/patch-stackprotector-gcc_testsuite =================================================================== --- head/lang/gcc/files/patch-stackprotector-gcc_testsuite (revision 426564) +++ head/lang/gcc/files/patch-stackprotector-gcc_testsuite (nonexistent) @@ -1,176 +0,0 @@ ---- /dev/null -+++ gcc/testsuite/g++.dg/fstack-protector-strong.C -@@ -0,0 +1,35 @@ -+/* Test that stack protection is done on chosen functions. */ -+ -+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ -+/* { dg-options "-O2 -fstack-protector-strong" } */ -+ -+class A -+{ -+public: -+ A() {} -+ ~A() {} -+ void method(); -+ int state; -+}; -+ -+/* Frame address exposed to A::method via "this". */ -+int -+foo1 () -+{ -+ A a; -+ a.method (); -+ return a.state; -+} -+ -+/* Possible destroying foo2's stack via &a. */ -+int -+global_func (A& a); -+ -+/* Frame address exposed to global_func. */ -+int foo2 () -+{ -+ A a; -+ return global_func (a); -+} -+ -+/* { dg-final { scan-assembler-times "stack_chk_fail" 2 } } */ ---- /dev/null -+++ gcc/testsuite/gcc.dg/fstack-protector-strong.c -@@ -0,0 +1,135 @@ -+/* Test that stack protection is done on chosen functions. */ -+ -+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ -+/* { dg-options "-O2 -fstack-protector-strong" } */ -+ -+#include -+#include -+ -+extern int g0; -+extern int* pg0; -+int -+goo (int *); -+int -+hoo (int); -+ -+/* Function frame address escaped function call. */ -+int -+foo1 () -+{ -+ int i; -+ return goo (&i); -+} -+ -+struct ArrayStruct -+{ -+ int a; -+ int array[10]; -+}; -+ -+struct AA -+{ -+ int b; -+ struct ArrayStruct as; -+}; -+ -+/* Function frame contains array. */ -+int -+foo2 () -+{ -+ struct AA aa; -+ int i; -+ for (i = 0; i < 10; ++i) -+ { -+ aa.as.array[i] = i * (i-1) + i / 2; -+ } -+ return aa.as.array[5]; -+} -+ -+/* Address computation based on a function frame address. */ -+int -+foo3 () -+{ -+ int a; -+ int *p; -+ p = &a + 5; -+ return goo (p); -+} -+ -+/* Address cast based on a function frame address. */ -+int -+foo4 () -+{ -+ int a; -+ return goo (g0 << 2 ? (int *)(3 * (long)(void *)(&a)) : 0); -+} -+ -+/* Address cast based on a local array. */ -+int -+foo5 () -+{ -+ short array[10]; -+ return goo ((int *)(array + 5)); -+} -+ -+struct BB -+{ -+ int one; -+ int two; -+ int three; -+}; -+ -+/* Address computaton based on a function frame address.*/ -+int -+foo6 () -+{ -+ struct BB bb; -+ return goo (&bb.one + sizeof(int)); -+} -+ -+/* Function frame address escaped via global variable. */ -+int -+foo7 () -+{ -+ int a; -+ pg0 = &a; -+ goo (pg0); -+ return *pg0; -+} -+ -+/* Check that this covers -fstack-protector. */ -+int -+foo8 () -+{ -+ char base[100]; -+ memcpy ((void *)base, (const void *)pg0, 105); -+ return (int)(base[32]); -+} -+ -+/* Check that this covers -fstack-protector. */ -+int -+foo9 () -+{ -+ char* p = alloca (100); -+ return goo ((int *)(p + 50)); -+} -+ -+int -+global2 (struct BB* pbb); -+ -+/* Address taken on struct. */ -+int -+foo10 () -+{ -+ struct BB bb; -+ int i; -+ bb.one = global2 (&bb); -+ for (i = 0; i < 10; ++i) -+ { -+ bb.two = bb.one + bb.two; -+ bb.three = bb.one + bb.two + bb.three; -+ } -+ return bb.three; -+} -+ -+/* { dg-final { scan-assembler-times "stack_chk_fail" 10 } } */ Property changes on: head/lang/gcc/files/patch-stackprotector-gcc_testsuite ___________________________________________________________________ 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 Index: head/lang/gcc/files/patch-arm-libcpp =================================================================== --- head/lang/gcc/files/patch-arm-libcpp (revision 426564) +++ head/lang/gcc/files/patch-arm-libcpp (nonexistent) @@ -1,24 +0,0 @@ -Index: libcpp/configure -=================================================================== ---- libcpp/configure (revision 218760) -+++ libcpp/configure (working copy) -@@ -7153,6 +7153,7 @@ - aarch64*-*-* | \ - alpha*-*-* | \ - arm*-*-*eabi* | \ -+ arm*-*-freebsd* | \ - arm*-*-rtems* | \ - arm*-*-symbianelf* | \ - x86_64-*-* | \ -Index: libcpp/configure.ac -=================================================================== ---- libcpp/configure.ac (revision 218760) -+++ libcpp/configure.ac (working copy) -@@ -185,6 +185,7 @@ - aarch64*-*-* | \ - alpha*-*-* | \ - arm*-*-*eabi* | \ -+ arm*-*-freebsd* | \ - arm*-*-rtems* | \ - arm*-*-symbianelf* | \ - x86_64-*-* | \ Property changes on: head/lang/gcc/files/patch-arm-libcpp ___________________________________________________________________ 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 Index: head/lang/gcc/files/java-patch-hier =================================================================== --- head/lang/gcc/files/java-patch-hier (revision 426564) +++ head/lang/gcc/files/java-patch-hier (revision 426565) @@ -1,13 +1,12 @@ -Index: libjava/Makefile.in -=================================================================== ---- libjava/Makefile.in (revision 117734) -+++ libjava/Makefile.in (working copy) -@@ -712,7 +712,7 @@ - $(am__append_2) $(am__append_3) - toolexecmainlib_DATA = libgcj.spec +--- UTC +--- libjava/Makefile.in 2013-05-26 22:33:07.000000000 +0000 ++++ libjava/Makefile.in 2013-05-31 21:19:23.000000000 +0000 +@@ -941,7 +941,7 @@ + @BUILD_SUBLIBS_FALSE@LIBJAVA_CORE_EXTRA = + @BUILD_SUBLIBS_TRUE@LIBJAVA_CORE_EXTRA = @LIBGCJ_SUBLIB_CORE_EXTRA_DEPS@ dbexec_LTLIBRARIES = libjvm.la --pkgconfigdir = $(libdir)/pkgconfig +-pkgconfigdir = $(toolexeclibdir)/pkgconfig +pkgconfigdir = $(prefix)/libdata/pkgconfig jardir = $(datadir)/java - jar_DATA = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar - @JAVA_HOME_SET_FALSE@JAVA_HOME_DIR = $(prefix) + jar_DATA = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar \ + $(am__append_5) Index: head/lang/gcc/files/patch-x86-64-fix-m16 =================================================================== --- head/lang/gcc/files/patch-x86-64-fix-m16 (nonexistent) +++ head/lang/gcc/files/patch-x86-64-fix-m16 (revision 426565) @@ -0,0 +1,25 @@ +At the moment the -m16 option only passes the "--32" parameter to the +assembler on glibc OSes, while on other OSes the assembler is called +without any specific flag. This is wrong and causes the assembler to +fail. Fix it by adding support for the -m16 option to x86-64.h. + +2016-07-06 Roger Pau Monné + + * x86-64.h: append --32 to the assembler options when -m16 is used + even on non-glibc OSes. + +This should be backported to all stable branches up to 4.9 (when -m16 was +introduced). + +--- UTC +--- gcc/config/i386/x86-64.h ++++ gcc/config/i386/x86-64.h +@@ -49,7 +49,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define WCHAR_TYPE_SIZE 32 + + #undef ASM_SPEC +-#define ASM_SPEC "%{m32:--32} %{m64:--64} %{mx32:--x32}" ++#define ASM_SPEC "%{m16|m32:--32} %{m64:--64} %{mx32:--x32}" + + #undef ASM_OUTPUT_ALIGNED_BSS + #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ Property changes on: head/lang/gcc/files/patch-x86-64-fix-m16 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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: head/lang/gcc/pkg-descr =================================================================== --- head/lang/gcc/pkg-descr (revision 426564) +++ head/lang/gcc/pkg-descr (revision 426565) @@ -1,12 +1,10 @@ GCC, the GNU Compiler Collection, supports a number of languages. This -port installs the C, C++, Fortran and Java front ends as gcc48, g++48, -gfortran48, and gcj48, respectively. +port installs the C, C++, Fortran and Java front ends as gcc49, g++49, +gfortran49, and gcj49, respectively. -It can be used interchangibly with the lang/gcc48 port which tracks -weekly upstream snapshots whereas this port will be updated less -frequently, mostly in sync with upstream releases, and will move to -lang/gcc49 and later over time. +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. WWW: http://gcc.gnu.org/ Gerald Pfeifer Index: head/lang/gcc/pkg-plist =================================================================== --- head/lang/gcc/pkg-plist (revision 426564) +++ head/lang/gcc/pkg-plist (revision 426565) @@ -1,79 +1,79 @@ bin/%%GNU_HOST%%-c++%%SUFFIX%% bin/%%GNU_HOST%%-g++%%SUFFIX%% bin/%%GNU_HOST%%-gcc%%SUFFIX%% bin/%%GNU_HOST%%-gcc-%%GCC_VERSION%% bin/%%GNU_HOST%%-gcc-ar%%SUFFIX%% bin/%%GNU_HOST%%-gcc-nm%%SUFFIX%% bin/%%GNU_HOST%%-gcc-ranlib%%SUFFIX%% bin/%%GNU_HOST%%-gfortran%%SUFFIX%% bin/c++%%SUFFIX%% bin/cpp%%SUFFIX%% bin/g++ bin/g++%%SUFFIX%% bin/gcc bin/gcc%%SUFFIX%% bin/gcc-ar%%SUFFIX%% bin/gcc-nm%%SUFFIX%% bin/gcc-ranlib%%SUFFIX%% bin/gcov%%SUFFIX%% bin/gfortran bin/gfortran%%SUFFIX%% @comment info/gcc%%SUFFIX%%/dir man/man1/cpp%%SUFFIX%%.1.gz man/man1/g++%%SUFFIX%%.1.gz man/man1/gcc%%SUFFIX%%.1.gz man/man1/gcov%%SUFFIX%%.1.gz man/man1/gfortran%%SUFFIX%%.1.gz %%JAVA%%share/gcc-%%GCC_VERSION%%/python/libjava/aotcompile.py %%JAVA%%share/gcc-%%GCC_VERSION%%/python/libjava/classfile.py 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 %%JAVA%%bin/%%GNU_HOST%%-gcj%%SUFFIX%% %%JAVA%%bin/aot-compile%%SUFFIX%% %%JAVA%%bin/gappletviewer%%SUFFIX%% %%JAVA%%bin/gc-analyze%%SUFFIX%% %%JAVA%%bin/gcj%%SUFFIX%% %%JAVA%%bin/gcj-dbtool%%SUFFIX%% %%JAVA%%bin/gcjh%%SUFFIX%% %%JAVA%%bin/gij%%SUFFIX%% %%JAVA%%bin/gjar%%SUFFIX%% %%JAVA%%bin/gjarsigner%%SUFFIX%% %%JAVA%%bin/gjavah%%SUFFIX%% %%JAVA%%bin/gkeytool%%SUFFIX%% %%JAVA%%bin/gnative2ascii%%SUFFIX%% %%JAVA%%bin/gorbd%%SUFFIX%% %%JAVA%%bin/grmic%%SUFFIX%% %%JAVA%%bin/grmid%%SUFFIX%% %%JAVA%%bin/grmiregistry%%SUFFIX%% %%JAVA%%bin/gserialver%%SUFFIX%% %%JAVA%%bin/gtnameserv%%SUFFIX%% %%JAVA%%bin/jcf-dump%%SUFFIX%% %%JAVA%%bin/jv-convert%%SUFFIX%% -%%JAVA%%libdata/pkgconfig/libgcj-4.8.pc +%%JAVA%%libdata/pkgconfig/libgcj-4.9.pc %%JAVA%%man/man1/aot-compile%%SUFFIX%%.1.gz %%JAVA%%man/man1/gappletviewer%%SUFFIX%%.1.gz %%JAVA%%man/man1/gc-analyze%%SUFFIX%%.1.gz %%JAVA%%man/man1/gcj%%SUFFIX%%.1.gz %%JAVA%%man/man1/gcj-dbtool%%SUFFIX%%.1.gz %%JAVA%%man/man1/gcjh%%SUFFIX%%.1.gz %%JAVA%%man/man1/gij%%SUFFIX%%.1.gz %%JAVA%%man/man1/gjar%%SUFFIX%%.1.gz %%JAVA%%man/man1/gjarsigner%%SUFFIX%%.1.gz %%JAVA%%man/man1/gjavah%%SUFFIX%%.1.gz %%JAVA%%man/man1/gjdoc%%SUFFIX%%.1.gz %%JAVA%%man/man1/gkeytool%%SUFFIX%%.1.gz %%JAVA%%man/man1/gnative2ascii%%SUFFIX%%.1.gz %%JAVA%%man/man1/gorbd%%SUFFIX%%.1.gz %%JAVA%%man/man1/grmic%%SUFFIX%%.1.gz %%JAVA%%man/man1/grmid%%SUFFIX%%.1.gz %%JAVA%%man/man1/grmiregistry%%SUFFIX%%.1.gz %%JAVA%%man/man1/gserialver%%SUFFIX%%.1.gz %%JAVA%%man/man1/gtnameserv%%SUFFIX%%.1.gz %%JAVA%%man/man1/jcf-dump%%SUFFIX%%.1.gz %%JAVA%%man/man1/jv-convert%%SUFFIX%%.1.gz %%JAVA%%share/java/libgcj-%%GCC_VERSION%%.jar %%JAVA%%share/java/libgcj-tools-%%GCC_VERSION%%.jar @postexec if type ccache-update-links >/dev/null 2>&1; then ccache-update-links -v; fi @postunexec if type ccache-update-links >/dev/null 2>&1; then ccache-update-links -v; fi @comment Insert PLIST.lib here