2012-10-12 17:18:02 +02:00
|
|
|
# Created by: Gerald Pfeifer <gerald@FreeBSD.org>
|
1999-08-25 08:35:40 +02:00
|
|
|
# $FreeBSD$
|
1999-04-21 09:48:59 +02:00
|
|
|
|
2009-02-01 11:50:03 +01:00
|
|
|
PORTNAME= gcc
|
2015-07-17 10:45:45 +02:00
|
|
|
PORTVERSION= 4.8.5
|
2015-11-24 11:19:22 +01:00
|
|
|
PORTREVISION= 2
|
1999-08-05 18:21:08 +02:00
|
|
|
CATEGORIES= lang java
|
2015-05-01 20:54:47 +02:00
|
|
|
MASTER_SITES= GCC/releases/gcc-${DISTVERSION}
|
2005-03-02 09:46:01 +01:00
|
|
|
|
2009-02-01 11:50:03 +01:00
|
|
|
MAINTAINER= gerald@FreeBSD.org
|
2014-09-10 21:09:58 +02:00
|
|
|
COMMENT= GNU Compiler Collection 4.8
|
2003-06-17 23:17:12 +02:00
|
|
|
|
2014-02-22 13:27:20 +01:00
|
|
|
LICENSE= GPLv3 GPLv3RLE
|
|
|
|
LICENSE_COMB= multi
|
|
|
|
|
2016-04-01 16:08:37 +02:00
|
|
|
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
|
2005-03-02 09:46:01 +01:00
|
|
|
|
2009-03-14 22:19:39 +01:00
|
|
|
.if defined(MAINTAINER_MODE)
|
2016-04-01 16:08:37 +02:00
|
|
|
BUILD_DEPENDS+= runtest:misc/dejagnu
|
2009-03-14 22:19:39 +01:00
|
|
|
.endif
|
|
|
|
|
2014-09-10 21:09:58 +02:00
|
|
|
CONFLICTS= gcc48*
|
2015-03-22 02:44:19 +01:00
|
|
|
CPE_VENDOR= gnu
|
2011-09-26 02:54:37 +02:00
|
|
|
|
2013-08-25 14:30:09 +02:00
|
|
|
# DISTVERSION relates to downloads, GCC_VERSION and SUFFIX to names
|
2011-09-26 02:54:37 +02:00
|
|
|
# of executables and directories once installed.
|
2013-08-25 14:30:09 +02:00
|
|
|
DISTVERSION= ${PORTVERSION}
|
2011-09-26 02:54:37 +02:00
|
|
|
GCC_VERSION= ${PORTVERSION:C/(.+)\.[0-9]{8}/\1/}
|
2009-05-19 14:31:05 +02:00
|
|
|
SUFFIX= ${PORTVERSION:C/([0-9]+).([0-9]+).*/\1\2/}
|
2015-01-04 20:09:32 +01:00
|
|
|
ONLY_FOR_ARCHS= amd64 armv6 armv6hf i386 powerpc powerpc64 sparc64
|
2015-10-05 18:59:50 +02:00
|
|
|
USES= compiler cpe gmake iconv libtool makeinfo perl5 tar:bzip2
|
2010-09-27 23:45:10 +02:00
|
|
|
USE_BINUTILS= yes
|
2013-09-17 08:51:04 +02:00
|
|
|
USE_PERL5= build
|
2013-09-20 14:54:54 +02:00
|
|
|
SSP_UNSAFE= yes
|
1998-12-05 05:00:40 +01:00
|
|
|
|
2013-06-16 16:13:25 +02:00
|
|
|
OPTIONS_DEFINE= BOOTSTRAP
|
2012-09-01 22:46:57 +02:00
|
|
|
OPTIONS_DEFINE_i386= JAVA
|
|
|
|
OPTIONS_DEFINE_amd64= JAVA
|
|
|
|
OPTIONS_DEFAULT_i386= JAVA
|
|
|
|
OPTIONS_DEFAULT_amd64= JAVA
|
2015-03-26 21:43:08 +01:00
|
|
|
OPTIONS_EXCLUDE_DragonFly= JAVA
|
2013-06-16 16:13:25 +02:00
|
|
|
BOOTSTRAP_DESC= Build using a full bootstrap
|
2010-06-27 16:24:03 +02:00
|
|
|
|
Add a MULTILIB option to gcc{,48,49,5} for powerpc64
This change is the same as r400632, which updated gcc[56]-devel, but now
for gcc{,48,49,5}. This change is the second attempt at doing this: the
first attempt went in r401072 and was reverted in r401074 because the diff
was bogus and enabled the new MULTILIB option under all platforms instead
of just powerpc64.
This fixes the build of gcc{,48,49,5} under powerpc64 when the system
is built without the lib32 libraries.
More in detail:
If the system is built with lib32 support (WITH_LIB32, which is the default),
building gcc from ports results in a compiler that can target both 64-bit and
32-bit binaries on powerpc64. However, when lib32 support is disabled
(WITHOUT_LIB32), gcc should only be built with 64-bit support or otherwise
the build fails.
To fix this, explicitly disable 32-bit support when /usr/lib32 is not present
and add a MULTILIB option (which is only defined for powerpc64 when 32-bit
support is possible and defaults to yes to preserve the current behavior) to
allow the user to explicitly control this feature.
Approved by: gerald (maintainer), bdrewery (mentor), andreast
Differential Revision: https://reviews.freebsd.org/D3952
2015-11-22 22:06:54 +01:00
|
|
|
.if exists(/usr/lib32/libc.so)
|
|
|
|
OPTIONS_DEFINE_powerpc64= MULTILIB
|
|
|
|
OPTIONS_DEFAULT_powerpc64= MULTILIB
|
|
|
|
MULTILIB_DESC= Build support for 32-bit and 64-bit target types
|
|
|
|
MULTILIB_CONFIGURE_ENABLE= multilib
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-multilib
|
|
|
|
.endif
|
|
|
|
|
2000-09-05 18:59:15 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2004-02-19 23:12:30 +01:00
|
|
|
.if ${ARCH} == "amd64"
|
2014-05-05 11:45:36 +02:00
|
|
|
CONFIGURE_TARGET= x86_64-portbld-${OPSYS:tl}${OSREL}
|
2004-03-22 18:13:33 +01:00
|
|
|
.else
|
2014-05-05 11:45:36 +02:00
|
|
|
CONFIGURE_TARGET= ${ARCH}-portbld-${OPSYS:tl}${OSREL}
|
2004-02-19 23:12:30 +01:00
|
|
|
.endif
|
|
|
|
|
Update the default version of GCC used in the Ports Collection from
GCC 4.6.4 to GCC 4.7.3. This entails updating the lang/gcc port as
well as changing the default in Mk/bsd.default-versions.mk.
This adds powerpc64 as a supported architecture (and removes ia64,
though it can be supported by manually installing lang/gcc48).
New binaries %%GNU_HOST%%-gcc-ar47, %%GNU_HOST%%-gcc-nm47, and
%%GNU_HOST%%-gcc-ranlib47 are provided to support link-time
optimization (LTO) which scales significantly better.
And it adds support for indirect functions (IFUNCS), experimental
support for transactional memory in the compiler as well as a supporting
run-time library called libitm, a new string length optimization pass,
and support for atomic operations specifying the C++11/C11 memory model.
Version 3.1 of the OpenMP specification is now supported for the C,
C++, and Fortran compilers.
GCC accepts the options -std=c11 and -std=gnu11 for the C11 revision
of the ISO C standard which inlcude support for unicode strings,
nonreturning functions (_Noreturn and <stdnoreturn.h>), alignment
support (_Alignas, _Alignof, max_align_t, <stdalign.h>), and a
__builtin_complex built-in function.
The C++ frontend now accepts the -std=c++11, -std=gnu++11, and
-Wc++11-compat options and implements many C++11 features of the
language including extended friends syntax, explicit override
control, non-static data member initializers, user-defined literals,
alias declarations, delegating constructors, atomic classes, and more.
The C++ standard library and Fortran frontend have received many
improvements. See http://gcc.gnu.org/gcc-4.7/changes.html for an
extense list of changes; http://gcc.gnu.org/gcc-4.7/porting_to.html
for information on how to port to that new version.
PR: 182136
Supported by: Christoph Moench-Tegeder <cmt@burggraben.net> (fixing many ports)
Tested by: bdrewery (two -exp runs)
2014-03-10 21:41:10 +01:00
|
|
|
.if ${ARCH} == powerpc64
|
|
|
|
CONFIGURE_ENV+= UNAME_m="powerpc64"
|
|
|
|
.endif
|
|
|
|
|
2015-01-04 20:09:32 +01:00
|
|
|
.if ${ARCH} == "armv6" || ${ARCH} == "armv6hf"
|
2015-01-12 05:16:23 +01:00
|
|
|
# Override sys.mk including -O in CFLAGS which breaks libgomp building.
|
|
|
|
CFLAGS:= ${CFLAGS:S/-O/-O2/g}
|
2015-01-04 20:09:32 +01:00
|
|
|
. 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
|
|
|
|
|
2012-10-12 17:18:02 +02:00
|
|
|
LANGUAGES:= c,c++,objc,fortran
|
2009-05-18 12:01:29 +02:00
|
|
|
TARGLIB= ${PREFIX}/lib/gcc${SUFFIX}
|
|
|
|
LIBEXEC= ${PREFIX}/libexec/gcc${SUFFIX}
|
1998-01-10 22:40:10 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2016-04-13 12:40:58 +02:00
|
|
|
CONFIGURE_OUTSOURCE= yes
|
2013-06-16 16:13:25 +02:00
|
|
|
.if empty(PORT_OPTIONS:MBOOTSTRAP)
|
|
|
|
CONFIGURE_ARGS+=--disable-bootstrap
|
|
|
|
.else
|
2014-12-30 20:19:43 +01:00
|
|
|
CONFIGURE_ARGS+=--with-build-config=bootstrap-debug
|
2013-06-16 16:13:25 +02:00
|
|
|
ALL_TARGET= bootstrap-lean
|
|
|
|
.endif
|
|
|
|
CONFIGURE_ARGS+=--disable-nls \
|
Update the default version of GCC used in the Ports Collection from
GCC 4.6.4 to GCC 4.7.3. This entails updating the lang/gcc port as
well as changing the default in Mk/bsd.default-versions.mk.
This adds powerpc64 as a supported architecture (and removes ia64,
though it can be supported by manually installing lang/gcc48).
New binaries %%GNU_HOST%%-gcc-ar47, %%GNU_HOST%%-gcc-nm47, and
%%GNU_HOST%%-gcc-ranlib47 are provided to support link-time
optimization (LTO) which scales significantly better.
And it adds support for indirect functions (IFUNCS), experimental
support for transactional memory in the compiler as well as a supporting
run-time library called libitm, a new string length optimization pass,
and support for atomic operations specifying the C++11/C11 memory model.
Version 3.1 of the OpenMP specification is now supported for the C,
C++, and Fortran compilers.
GCC accepts the options -std=c11 and -std=gnu11 for the C11 revision
of the ISO C standard which inlcude support for unicode strings,
nonreturning functions (_Noreturn and <stdnoreturn.h>), alignment
support (_Alignas, _Alignof, max_align_t, <stdalign.h>), and a
__builtin_complex built-in function.
The C++ frontend now accepts the -std=c++11, -std=gnu++11, and
-Wc++11-compat options and implements many C++11 features of the
language including extended friends syntax, explicit override
control, non-static data member initializers, user-defined literals,
alias declarations, delegating constructors, atomic classes, and more.
The C++ standard library and Fortran frontend have received many
improvements. See http://gcc.gnu.org/gcc-4.7/changes.html for an
extense list of changes; http://gcc.gnu.org/gcc-4.7/porting_to.html
for information on how to port to that new version.
PR: 182136
Supported by: Christoph Moench-Tegeder <cmt@burggraben.net> (fixing many ports)
Tested by: bdrewery (two -exp runs)
2014-03-10 21:41:10 +01:00
|
|
|
--enable-gnu-indirect-function \
|
2005-06-26 13:44:16 +02:00
|
|
|
--libdir=${TARGLIB} \
|
2009-05-18 12:01:29 +02:00
|
|
|
--libexecdir=${LIBEXEC} \
|
2009-12-01 12:36:59 +01:00
|
|
|
--program-suffix=${SUFFIX} \
|
|
|
|
--with-as=${LOCALBASE}/bin/as \
|
|
|
|
--with-gmp=${LOCALBASE} \
|
|
|
|
--with-gxx-include-dir=${TARGLIB}/include/c++/ \
|
2010-01-17 15:14:28 +01:00
|
|
|
--with-ld=${LOCALBASE}/bin/ld \
|
2013-09-04 22:01:05 +02:00
|
|
|
${ICONV_CONFIGURE_ARG} \
|
2011-04-24 00:47:46 +02:00
|
|
|
--with-pkgversion="FreeBSD Ports Collection" \
|
2009-12-01 12:36:59 +01:00
|
|
|
--with-system-zlib
|
2002-10-11 01:19:05 +02:00
|
|
|
MAKE_ARGS+= MAKEINFOFLAGS="--no-split"
|
2006-06-18 08:39:28 +02:00
|
|
|
USE_LDCONFIG= ${TARGLIB}
|
2011-09-26 02:54:37 +02:00
|
|
|
PLIST_SUB= GCC_VERSION=${GCC_VERSION} \
|
2009-05-30 11:32:25 +02:00
|
|
|
GNU_HOST=${CONFIGURE_TARGET} \
|
2005-12-11 23:49:57 +01:00
|
|
|
SUFFIX=${SUFFIX}
|
2005-12-21 22:14:08 +01:00
|
|
|
INFO= gcc${SUFFIX}/cpp \
|
|
|
|
gcc${SUFFIX}/cppinternals \
|
|
|
|
gcc${SUFFIX}/gcc \
|
|
|
|
gcc${SUFFIX}/gccinstall \
|
2007-01-02 22:42:49 +01:00
|
|
|
gcc${SUFFIX}/gccint \
|
2009-01-05 21:36:33 +01:00
|
|
|
gcc${SUFFIX}/gfortran \
|
2011-02-10 02:44:23 +01:00
|
|
|
gcc${SUFFIX}/libgomp
|
2012-10-12 17:18:02 +02:00
|
|
|
# Release tarballs (as opposed to snapshots) always carry this.
|
2014-09-10 21:09:58 +02:00
|
|
|
#.if ${ARCH} == "i386" || ${ARCH} == "amd64"
|
Update the default version of GCC used in the Ports Collection from
GCC 4.6.4 to GCC 4.7.3. This entails updating the lang/gcc port as
well as changing the default in Mk/bsd.default-versions.mk.
This adds powerpc64 as a supported architecture (and removes ia64,
though it can be supported by manually installing lang/gcc48).
New binaries %%GNU_HOST%%-gcc-ar47, %%GNU_HOST%%-gcc-nm47, and
%%GNU_HOST%%-gcc-ranlib47 are provided to support link-time
optimization (LTO) which scales significantly better.
And it adds support for indirect functions (IFUNCS), experimental
support for transactional memory in the compiler as well as a supporting
run-time library called libitm, a new string length optimization pass,
and support for atomic operations specifying the C++11/C11 memory model.
Version 3.1 of the OpenMP specification is now supported for the C,
C++, and Fortran compilers.
GCC accepts the options -std=c11 and -std=gnu11 for the C11 revision
of the ISO C standard which inlcude support for unicode strings,
nonreturning functions (_Noreturn and <stdnoreturn.h>), alignment
support (_Alignas, _Alignof, max_align_t, <stdalign.h>), and a
__builtin_complex built-in function.
The C++ frontend now accepts the -std=c++11, -std=gnu++11, and
-Wc++11-compat options and implements many C++11 features of the
language including extended friends syntax, explicit override
control, non-static data member initializers, user-defined literals,
alias declarations, delegating constructors, atomic classes, and more.
The C++ standard library and Fortran frontend have received many
improvements. See http://gcc.gnu.org/gcc-4.7/changes.html for an
extense list of changes; http://gcc.gnu.org/gcc-4.7/porting_to.html
for information on how to port to that new version.
PR: 182136
Supported by: Christoph Moench-Tegeder <cmt@burggraben.net> (fixing many ports)
Tested by: bdrewery (two -exp runs)
2014-03-10 21:41:10 +01:00
|
|
|
INFO+= gcc${SUFFIX}/libquadmath \
|
|
|
|
gcc${SUFFIX}/libitm
|
2012-10-12 17:18:02 +02:00
|
|
|
#.endif
|
2014-04-30 01:53:07 +02:00
|
|
|
SUB_FILES= pkg-message
|
|
|
|
SUB_LIST+= TARGLIB=${TARGLIB}
|
2005-08-01 21:02:03 +02:00
|
|
|
|
2012-09-01 22:46:57 +02:00
|
|
|
.if ${PORT_OPTIONS:MJAVA}
|
2013-03-03 16:22:18 +01:00
|
|
|
ECJ_JAR= ${LOCALBASE}/share/java/ecj-4.5.jar
|
2016-04-01 16:08:37 +02:00
|
|
|
BUILD_DEPENDS+= ${ECJ_JAR}:lang/gcc-ecj45 \
|
|
|
|
zip:archivers/zip
|
|
|
|
RUN_DEPENDS+= ${ECJ_JAR}:lang/gcc-ecj45
|
2006-07-23 15:31:06 +02:00
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/java-patch-hier
|
2013-03-03 16:22:18 +01:00
|
|
|
CONFIGURE_ARGS+=--with-ecj-jar=${ECJ_JAR}
|
2012-10-12 17:18:02 +02:00
|
|
|
LANGUAGES:= ${LANGUAGES},java
|
2007-04-12 02:49:10 +02:00
|
|
|
INFO+= gcc${SUFFIX}/cp-tools \
|
|
|
|
gcc${SUFFIX}/gcj
|
2005-08-01 21:02:03 +02:00
|
|
|
PLIST_SUB+= JAVA=""
|
2007-04-21 09:41:04 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-libgcj
|
|
|
|
PLIST_SUB+= JAVA="@comment "
|
2004-12-16 10:32:21 +01:00
|
|
|
.endif
|
2012-10-12 17:18:02 +02:00
|
|
|
CONFIGURE_ARGS+=--enable-languages=${LANGUAGES}
|
2004-12-16 10:32:21 +01:00
|
|
|
|
2003-12-15 08:45:53 +01:00
|
|
|
pre-everything::
|
2012-10-12 17:18:02 +02:00
|
|
|
@${ECHO_MSG} "Making GCC ${PORTVERSION} for ${CONFIGURE_TARGET} [${LANGUAGES}]"
|
2003-12-15 08:45:53 +01:00
|
|
|
|
1998-08-11 10:22:46 +02:00
|
|
|
pre-configure:
|
2016-04-13 12:40:58 +02:00
|
|
|
cd ${WRKSRC} ; contrib/gcc_update --touch
|
|
|
|
@${RM} -f ${WRKSRC}/gcc/*/*.info*
|
2000-09-05 18:59:15 +02:00
|
|
|
|
2011-03-19 15:50:55 +01:00
|
|
|
.if defined(MAINTAINER_MODE)
|
2009-03-14 22:19:39 +01:00
|
|
|
full-regression-test: build
|
2016-04-13 12:40:58 +02:00
|
|
|
cd ${TEST_WRKSRC}; ${MAKE_CMD} -sk check \
|
|
|
|
; ${WRKSRC}/contrib/test_summary
|
2011-03-19 15:50:55 +01:00
|
|
|
.endif
|
2003-05-09 16:47:00 +02:00
|
|
|
|
2014-09-11 16:39:39 +02:00
|
|
|
post-stage:
|
2014-02-17 15:43:10 +01:00
|
|
|
${RM} -f ${STAGEDIR}${PREFIX}/man/man7/*
|
2014-04-30 01:53:07 +02:00
|
|
|
${RM} -f ${STAGEDIR}${PREFIX}/bin/rebuild-gcj-db${SUFFIX} \
|
|
|
|
${STAGEDIR}${PREFIX}/man/man1/rebuild-gcj-db${SUFFIX}.1
|
2005-05-16 23:52:09 +02:00
|
|
|
# Add target libraries and include files to packaging list.
|
2004-01-10 13:20:00 +01:00
|
|
|
${RM} -f ${WRKDIR}/PLIST.lib
|
2009-05-18 12:01:29 +02:00
|
|
|
.for d in ${TARGLIB:S/^${PREFIX}\///} ${LIBEXEC:S/^${PREFIX}\///} include/gcj include/gnu include/java include/javax
|
2013-11-03 00:20:14 +01:00
|
|
|
cd ${STAGEDIR}${PREFIX} ; if [ -d $d ]; then \
|
2004-01-22 12:58:14 +01:00
|
|
|
${FIND} $d -type f -o -type l >>${WRKDIR}/PLIST.lib ;\
|
|
|
|
fi
|
2003-12-04 17:20:50 +01:00
|
|
|
.endfor
|
2005-07-16 14:26:33 +02:00
|
|
|
cd ${WRKDIR} ; ${SED} -i -e "/PLIST.lib/ r PLIST.lib" ${TMPPLIST}
|
2015-11-24 11:19:22 +01:00
|
|
|
# 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
|
1998-01-10 22:40:10 +01:00
|
|
|
|
1998-11-13 08:34:57 +01:00
|
|
|
.include <bsd.port.post.mk>
|