Index: head/lang/gcc5/Makefile =================================================================== --- head/lang/gcc5/Makefile (revision 434236) +++ head/lang/gcc5/Makefile (revision 434237) @@ -1,167 +1,167 @@ # Created by: Gerald Pfeifer # $FreeBSD$ PORTNAME= gcc PORTVERSION= 5.4.0 CATEGORIES= lang java MASTER_SITES= GCC/releases/gcc-${DISTVERSION} PKGNAMESUFFIX= ${SUFFIX} MAINTAINER= gerald@FreeBSD.org COMMENT= GNU Compiler Collection 5 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 CPE_VENDOR= gnu GCC_VERSION= ${PORTVERSION} SUFFIX= ${PORTVERSION:C/([0-9]+).*/\1/} -ONLY_FOR_ARCHS= amd64 arm armv6 i386 powerpc powerpc64 sparc64 +ONLY_FOR_ARCHS= aarch64 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 GRAPHITE OPTIONS_DEFINE_i386= JAVA OPTIONS_DEFINE_amd64= JAVA OPTIONS_DEFAULT= BOOTSTRAP OPTIONS_DEFAULT_i386= JAVA OPTIONS_DEFAULT_amd64= JAVA 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 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" +.if ${ARCH} == "armv6" || ${ARCH} == "aarch64" . 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 BROKEN_sparc64= Does not build: bootstrap comparison failure 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 MAKE_ARGS+= MAKEINFOFLAGS="--no-split" 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: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 \ 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} .include Index: head/lang/gcc5/files/patch-aarch64-support =================================================================== --- head/lang/gcc5/files/patch-aarch64-support (nonexistent) +++ head/lang/gcc5/files/patch-aarch64-support (revision 434237) @@ -0,0 +1,186 @@ +---UTC +Index: configure +=================================================================== +--- configure (revision 240731) ++++ configure (working copy) +@@ -3455,6 +3455,9 @@ + *-*-vxworks*) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; ++ aarch64*-*-freebsd*) ++ noconfigdirs="$noconfigdirs ${libgcj}" ++ ;; + alpha*-*-*vms*) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; +Index: configure.ac +=================================================================== +--- configure.ac (revision 240731) ++++ configure.ac (working copy) +@@ -802,6 +802,9 @@ + *-*-vxworks*) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; ++ aarch64*-*-freebsd*) ++ noconfigdirs="$noconfigdirs ${libgcj}" ++ ;; + alpha*-*-*vms*) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; +Index: gcc/config/aarch64/aarch64-freebsd.h +=================================================================== +--- gcc/config/aarch64/aarch64-freebsd.h (nonexistent) ++++ gcc/config/aarch64/aarch64-freebsd.h (working copy) +@@ -0,0 +1,94 @@ ++/* 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 ++ . */ ++ ++#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 ++ ++#endif /* GCC_AARCH64_FREEBSD_H */ +Index: gcc/config/aarch64/t-aarch64-freebsd +=================================================================== +--- gcc/config/aarch64/t-aarch64-freebsd (nonexistent) ++++ gcc/config/aarch64/t-aarch64-freebsd (working copy) +@@ -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 ++# . ++ ++LIB1ASMSRC = aarch64/lib1funcs.asm ++LIB1ASMFUNCS = _aarch64_sync_cache_range +Index: gcc/config.gcc +=================================================================== +--- gcc/config.gcc (revision 240731) ++++ gcc/config.gcc (working copy) +@@ -914,6 +914,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" +Index: libgcc/config.host +=================================================================== +--- libgcc/config.host (revision 240731) ++++ libgcc/config.host (working copy) +@@ -328,6 +328,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 Property changes on: head/lang/gcc5/files/patch-aarch64-support ___________________________________________________________________ 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