2013-07-12 15:40:50 +02:00
|
|
|
# Created by: John Marino <marino@FreeBSD.org>
|
2011-02-15 08:32:50 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= gnat-aux
|
|
|
|
PORTVERSION= ${SNAPSHOT}
|
Update to libmpc version 1.0.1 which brings the following fixes:
- Switched to automake 1.11.6, see CVE-2012-3386.
- #14669: Fixed extraction of CC from gmp.h.
- Fixed case of intermediate zero real or imaginary part in mpc_fma,
found by hydra with GMP_CHECK_RANDOMIZE=1346362345.
This is on top of the following changes from version 1.0
- Licence change towards LGPLv3+ for the code and GFDLv1.3+ (with no
invariant sections) for the documentation.
- 100% of all lines are covered by tests
- Renamed functions
. mpc_mul_2exp to mpc_mul_2ui
. mpc_div_2exp to mpc_div_2ui
- 0^0, which returned (NaN,NaN) previously, now returns (1,+0).
- Removed compatibility with K&R compilers, which was untestable due
to lack of such compilers.
- New functions
. mpc_log10
. mpc_mul_2si, mpc_div_2si
- Speed-ups
. mpc_fma
- Bug fixes
. mpc_div and mpc_norm now return a value indicating the effective
rounding direction, as the other functions.
. mpc_mul, mpc_sqr and mpc_norm now return correct results even if
there are over- or underflows during the computation.
. mpc_asin, mpc_proj, mpc_sqr: Wrong result when input variable has
infinite part and equals output variable is corrected.
. mpc_fr_sub: Wrong return value for imaginary part is corrected.
Convert to the new LIB_DEPENDS standard and remove hard-coded
.so versions from a couple of dependent ports.
Bump PORTREVISIONS of all dependent ports.
PR: 183141
Approved by: portmgr (bdrewery)
2013-10-26 02:52:33 +02:00
|
|
|
PORTREVISION= 1
|
2011-02-15 08:32:50 +01:00
|
|
|
CATEGORIES= lang
|
2012-01-12 15:24:37 +01:00
|
|
|
MASTER_SITES= http://downloads.dragonlace.net/src/:boot \
|
|
|
|
${MASTER_SITE_GCC}
|
|
|
|
MASTER_SITE_SUBDIR= releases/gcc-${GCC_VERSION}
|
|
|
|
DISTFILES= gcc-core-${GCC_VERSION}.tar.bz2
|
2011-02-15 08:32:50 +01:00
|
|
|
|
2013-07-12 15:40:50 +02:00
|
|
|
MAINTAINER= marino@FreeBSD.org
|
2011-02-15 08:32:50 +01:00
|
|
|
COMMENT= GNAT Ada compiler based on GCC ${GCC_BRANCH}
|
|
|
|
|
2013-11-09 23:26:45 +01:00
|
|
|
LICENSE= GPLv3
|
|
|
|
|
2012-04-09 13:28:22 +02:00
|
|
|
.include "${.CURDIR}/Makefile.common"
|
|
|
|
|
2011-04-27 13:15:39 +02:00
|
|
|
LANGS= c
|
2012-01-12 15:24:37 +01:00
|
|
|
APPLY_DIFFS= core
|
2011-02-15 08:32:50 +01:00
|
|
|
INTENDED_COMPILER= NATIVE
|
|
|
|
BOOTSTRAP_COMPILER= NOT_REQUIRED
|
|
|
|
BOOTSTRAP_TRIPLET= NOT_SET
|
|
|
|
FULL_GNATGCC= NOT_SET
|
2013-04-30 14:38:52 +02:00
|
|
|
GARCH= ${ARCH:S/amd64/x86_64/}
|
|
|
|
OS_LABEL4VERS= [${OPSYS}${GARCH:C,^.*(64),\1,}]
|
2013-11-09 23:26:45 +01:00
|
|
|
NO_LICENSES_INSTALL= yes
|
|
|
|
NO_MTREE= yes
|
2013-04-30 14:38:52 +02:00
|
|
|
|
|
|
|
OPTIONS_DEFINE= ADA CXX FORT OBJC TESTSUITE
|
|
|
|
OPTIONS_DEFAULT= ADA CXX FORT OBJC
|
|
|
|
NO_OPTIONS_SORT= yes
|
|
|
|
|
|
|
|
ADA_DESC= Build Ada language
|
|
|
|
CXX_DESC= Build C++ language
|
|
|
|
FORT_DESC= Build Fortran language
|
|
|
|
OBJC_DESC= Build Objective-C language
|
|
|
|
TESTSUITE_DESC= Activate test support
|
2011-02-15 08:32:50 +01:00
|
|
|
|
2011-04-27 13:15:39 +02:00
|
|
|
.include <bsd.port.options.mk>
|
2011-02-15 08:32:50 +01:00
|
|
|
|
2013-04-30 14:38:52 +02:00
|
|
|
.if ${OPSYS} == FreeBSD
|
|
|
|
. if ${GARCH} == x86_64
|
2011-02-15 08:32:50 +01:00
|
|
|
BOOTSTRAP_TRIPLET= x86_64-bootstrap-freebsd8.1/4.6.0
|
2013-04-30 14:38:52 +02:00
|
|
|
. else
|
2011-02-15 08:32:50 +01:00
|
|
|
BOOTSTRAP_TRIPLET= i386-bootstrap-freebsd8.0/4.6.0
|
2013-04-30 14:38:52 +02:00
|
|
|
. endif
|
2011-02-15 08:32:50 +01:00
|
|
|
.endif
|
2013-04-30 14:38:52 +02:00
|
|
|
.if ${OPSYS} == DragonFly
|
|
|
|
BOOTSTRAP_TRIPLET= ${GARCH}-bootstrap-dragonfly2.8/4.6.0
|
|
|
|
.endif
|
|
|
|
BLD_TARGET= ${GARCH}-aux-${OPSYS:L}${OSREL}
|
|
|
|
BOOTSTRAP_COMPILER= gnat-bootstrap.${GARCH}.${OPSYS:L}.tar.bz2
|
2011-02-15 08:32:50 +01:00
|
|
|
|
2012-01-12 15:24:37 +01:00
|
|
|
WRKSRC= ${WRKDIR}/gcc-${GCC_VERSION}
|
2011-09-12 19:16:58 +02:00
|
|
|
BUILDDIR= ${WRKDIR}/build
|
|
|
|
CFG_SCRIPT= ${WRKSRC}/configure
|
|
|
|
REVFILE= ${WRKSRC}/gcc/REVISION
|
2011-02-15 08:32:50 +01:00
|
|
|
BOOTSTRAP_PREFIX= ${WRKDIR}/bootstrap
|
|
|
|
PKG_PREFIX= ${PREFIX}
|
2013-11-09 23:26:45 +01:00
|
|
|
AWKMANPAGE= '{if ($$0 ~ /^man\/man[1-9]\/.+[1-9]$$/) print $$0 ".gz"; else print $$0}'
|
2011-02-15 08:32:50 +01:00
|
|
|
|
|
|
|
# If we find gnatgcc and friends in standard location, then we'll use this
|
|
|
|
# compiler instead of downloading the bootstrap.
|
|
|
|
.if exists (${PREFIX}/bin/gnatgcc)
|
|
|
|
.if exists (${PREFIX}/bin/gnatbind)
|
|
|
|
.if exists (${PREFIX}/bin/gnatlink)
|
|
|
|
.if exists (${PREFIX}/bin/gnatmake)
|
|
|
|
FULL_GNATGCC=${PREFIX}/bin/gnatgcc
|
|
|
|
FULL_PATH=/sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/bin
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# If FULL_GNATGCC is not set, we'll request the bootstrap compiler
|
2013-04-30 14:38:52 +02:00
|
|
|
.if ${FULL_GNATGCC} == NOT_SET
|
2011-02-15 08:32:50 +01:00
|
|
|
INTENDED_COMPILER=BOOTSTRAP
|
|
|
|
FULL_GNATGCC=${BOOTSTRAP_PREFIX}/bin/gnatgcc
|
|
|
|
FULL_PATH=${BOOTSTRAP_PREFIX}/bin:/sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/bin
|
2012-01-12 15:24:37 +01:00
|
|
|
DISTFILES+= ${BOOTSTRAP_COMPILER}:boot
|
2011-02-15 08:32:50 +01:00
|
|
|
.endif
|
|
|
|
|
2011-04-27 13:15:39 +02:00
|
|
|
###########
|
|
|
|
## Ada ##
|
|
|
|
###########
|
|
|
|
|
2013-04-30 14:38:52 +02:00
|
|
|
.if ${PORT_OPTIONS:MADA}
|
2011-04-27 13:15:39 +02:00
|
|
|
LANGS+= ada
|
2012-01-12 15:24:37 +01:00
|
|
|
APPLY_DIFFS+= ada
|
|
|
|
DISTFILES+= gcc-ada-${GCC_VERSION}.tar.bz2
|
2011-04-27 13:15:39 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
###########
|
|
|
|
## C++ ##
|
|
|
|
###########
|
|
|
|
|
2013-04-30 14:38:52 +02:00
|
|
|
.if ${PORT_OPTIONS:MCXX}
|
2011-04-27 13:15:39 +02:00
|
|
|
LANGS+= c++
|
2012-01-12 15:24:37 +01:00
|
|
|
APPLY_DIFFS+= cxx
|
|
|
|
DISTFILES+= gcc-g++-${GCC_VERSION}.tar.bz2
|
2011-04-27 13:15:39 +02:00
|
|
|
.endif
|
|
|
|
|
2012-01-12 15:24:37 +01:00
|
|
|
###############
|
|
|
|
## Fortran ##
|
|
|
|
###############
|
|
|
|
|
2013-04-30 14:38:52 +02:00
|
|
|
.if ${PORT_OPTIONS:MFORT}
|
2012-01-12 15:24:37 +01:00
|
|
|
LANGS+= fortran
|
|
|
|
APPLY_DIFFS+= fortran
|
|
|
|
DISTFILES+= gcc-fortran-${GCC_VERSION}.tar.bz2
|
|
|
|
QUADOPT= --enable-libquadmath
|
|
|
|
.else
|
|
|
|
QUADOPT= --disable-libquadmath
|
|
|
|
.endif
|
|
|
|
|
|
|
|
###################
|
|
|
|
## Objective-C ##
|
|
|
|
###################
|
|
|
|
|
2013-04-30 14:38:52 +02:00
|
|
|
.if ${PORT_OPTIONS:MOBJC}
|
2012-01-12 15:24:37 +01:00
|
|
|
LANGS+= objc
|
|
|
|
DISTFILES+= gcc-objc-${GCC_VERSION}.tar.bz2
|
|
|
|
.endif
|
|
|
|
|
2011-04-27 13:15:39 +02:00
|
|
|
##################
|
|
|
|
## Testsuites ##
|
|
|
|
##################
|
|
|
|
|
2013-04-30 14:38:52 +02:00
|
|
|
.if ${PORT_OPTIONS:MTESTSUITE}
|
2011-04-27 13:15:39 +02:00
|
|
|
BUILD_DEPENDS= dejagnu>=1.4:${PORTSDIR}/misc/dejagnu
|
2012-01-12 15:24:37 +01:00
|
|
|
DISTFILES+= gcc-testsuite-${GCC_VERSION}.tar.bz2
|
|
|
|
APPLY_DIFFS+= ada-testsuite
|
|
|
|
APPLY_DIFFS+= cxx-testsuite
|
2013-04-30 14:38:52 +02:00
|
|
|
APPLY_DIFFS+= fortran-testsuite
|
2012-01-12 15:24:37 +01:00
|
|
|
APPLY_DIFFS+= gcc-testsuite
|
|
|
|
.endif
|
2011-04-27 13:15:39 +02:00
|
|
|
|
2013-04-30 14:38:52 +02:00
|
|
|
# for port maintenance, uncomment to invoke "make makesum PLUS_BOOTSTRAPS=1"
|
|
|
|
.if defined(PLUS_BOOTSTRAPS)
|
|
|
|
DISTFILES= \
|
|
|
|
gcc-core-${GCC_VERSION}.tar.bz2\
|
|
|
|
gcc-ada-${GCC_VERSION}.tar.bz2 \
|
|
|
|
gcc-g++-${GCC_VERSION}.tar.bz2 \
|
|
|
|
gcc-fortran-${GCC_VERSION}.tar.bz2 \
|
|
|
|
gcc-objc-${GCC_VERSION}.tar.bz2 \
|
|
|
|
gcc-testsuite-${GCC_VERSION}.tar.bz2 \
|
|
|
|
gnat-bootstrap.x86_64.dragonfly.tar.bz2:boot \
|
|
|
|
gnat-bootstrap.i386.dragonfly.tar.bz2:boot \
|
|
|
|
gnat-bootstrap.x86_64.freebsd.tar.bz2:boot \
|
|
|
|
gnat-bootstrap.i386.freebsd.tar.bz2:boot
|
|
|
|
.endif
|
2011-02-15 08:32:50 +01:00
|
|
|
|
|
|
|
# Establish Ada-aware compiler for use
|
2011-04-27 13:15:39 +02:00
|
|
|
ADA_CONFIGURE_ENV= CC=${FULL_GNATGCC}
|
|
|
|
ADA_CONFIGURE_ENV+= PATH=${FULL_PATH}
|
|
|
|
ADA_CONFIGURE_ENV+= CONFIG_SHELL=${SH}
|
2011-02-15 08:32:50 +01:00
|
|
|
ADA_MAKE_ENV= PATH=${FULL_PATH}
|
2011-09-12 19:16:58 +02:00
|
|
|
ADA_MAKE_ENV+= LD_LIBRARY_PATH=${BUILDDIR}/gcc
|
2011-02-15 08:32:50 +01:00
|
|
|
|
|
|
|
# The standard configuration options
|
2011-04-27 13:15:39 +02:00
|
|
|
CONFIGURE_ARGS= --enable-languages=${LANGS:Q}
|
2011-02-15 08:32:50 +01:00
|
|
|
CONFIGURE_ARGS+= --build=${BLD_TARGET}
|
|
|
|
CONFIGURE_ARGS+= --program-prefix=gnat
|
|
|
|
CONFIGURE_ARGS+= --prefix=${PREFIX}
|
|
|
|
CONFIGURE_ARGS+= --with-system-zlib
|
|
|
|
CONFIGURE_ARGS+= --with-gmp=${PKG_PREFIX}
|
|
|
|
CONFIGURE_ARGS+= --with-mpfr=${PKG_PREFIX}
|
|
|
|
CONFIGURE_ARGS+= --with-mpc=${PKG_PREFIX}
|
2013-09-04 22:01:05 +02:00
|
|
|
CONFIGURE_ARGS+= ${ICONV_CONFIGURE_ARG}
|
2011-02-15 08:32:50 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-shared
|
2012-01-12 15:24:37 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-threads=posix
|
2011-02-15 08:32:50 +01:00
|
|
|
CONFIGURE_ARGS+= --disable-bootstrap
|
2012-01-12 15:24:37 +01:00
|
|
|
CONFIGURE_ARGS+= ${QUADOPT}
|
2011-02-15 08:32:50 +01:00
|
|
|
CONFIGURE_ARGS+= --disable-libmudflap
|
|
|
|
CONFIGURE_ARGS+= --disable-libgomp
|
|
|
|
CONFIGURE_ARGS+= --disable-libssp
|
|
|
|
CONFIGURE_ARGS+= --disable-nls
|
|
|
|
|
|
|
|
post-extract:
|
|
|
|
# Personalize GNAT for each different machine
|
|
|
|
@${ECHO} "-=> GNAT AUX ${OS_LABEL4VERS}" > ${REVFILE}
|
|
|
|
|
2012-01-12 15:24:37 +01:00
|
|
|
# Create new directories in preparation of applying diff files
|
2013-05-02 14:34:13 +02:00
|
|
|
.if ${PORT_OPTIONS:MCXX}
|
2012-01-12 15:24:37 +01:00
|
|
|
${MKDIR} ${WRKSRC}/libstdc++-v3/config/locale/dragonfly
|
|
|
|
${MKDIR} ${WRKSRC}/libstdc++-v3/config/os/bsd/dragonfly
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Apply required composite diff files
|
|
|
|
.for suffix in ${APPLY_DIFFS}
|
|
|
|
@${ECHO} "Applying composite patch diff-${suffix}"
|
|
|
|
@${PATCH} -d ${WRKSRC} -s -E < ${FILESDIR}/diff-${suffix}
|
|
|
|
.endfor
|
|
|
|
|
2013-04-30 14:38:52 +02:00
|
|
|
.if ${INTENDED_COMPILER} == BOOTSTRAP
|
2011-02-15 08:32:50 +01:00
|
|
|
${MKDIR} ${BOOTSTRAP_PREFIX}
|
|
|
|
${MV} ${BOOTSTRAP_PREFIX}/../bin ${BOOTSTRAP_PREFIX}
|
|
|
|
${MV} ${BOOTSTRAP_PREFIX}/../lib ${BOOTSTRAP_PREFIX}
|
|
|
|
${MV} ${BOOTSTRAP_PREFIX}/../libexec ${BOOTSTRAP_PREFIX}
|
|
|
|
|
|
|
|
# Bootstrap compiler has statically linked z, gmp, mpc, mpfr and iconv
|
|
|
|
# The only shared lib is libc.so.7, so it should work for a long time.
|
2011-07-24 12:52:53 +02:00
|
|
|
|
|
|
|
${RM} -rf ${BOOTSTRAP_PREFIX}/lib/gcc/${BOOTSTRAP_TRIPLET}/include-fixed
|
|
|
|
.endif
|
2011-02-15 08:32:50 +01:00
|
|
|
|
|
|
|
do-configure:
|
2011-09-12 19:16:58 +02:00
|
|
|
${MKDIR} ${BUILDDIR}
|
|
|
|
cd ${BUILDDIR} && ${SETENV} ${ADA_CONFIGURE_ENV} \
|
|
|
|
${CFG_SCRIPT} ${CONFIGURE_ARGS}
|
2011-02-15 08:32:50 +01:00
|
|
|
|
|
|
|
do-build:
|
2013-11-09 23:26:45 +01:00
|
|
|
cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -j${MAKE_JOBS_NUMBER} all
|
2011-02-15 08:32:50 +01:00
|
|
|
|
2013-04-30 14:38:52 +02:00
|
|
|
test: build test-ada test-fortran test-objc test-cxx test-c
|
|
|
|
|
|
|
|
test-ada:
|
2013-05-02 15:20:36 +02:00
|
|
|
.if ${PORT_OPTIONS:MADA} && ${PORT_OPTIONS:MTESTSUITE}
|
2011-09-12 19:16:58 +02:00
|
|
|
cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-ada
|
2011-04-27 13:15:39 +02:00
|
|
|
.endif
|
2013-04-30 14:38:52 +02:00
|
|
|
|
|
|
|
test-fortran:
|
2013-05-02 15:20:36 +02:00
|
|
|
.if ${PORT_OPTIONS:MFORT} && ${PORT_OPTIONS:MTESTSUITE}
|
2012-01-12 15:24:37 +01:00
|
|
|
cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-fortran
|
|
|
|
.endif
|
2013-04-30 14:38:52 +02:00
|
|
|
|
|
|
|
test-objc:
|
2013-05-02 15:20:36 +02:00
|
|
|
.if ${PORT_OPTIONS:MOBJC} && ${PORT_OPTIONS:MTESTSUITE}
|
2012-01-12 15:24:37 +01:00
|
|
|
cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-objc
|
|
|
|
.endif
|
2013-04-30 14:38:52 +02:00
|
|
|
|
|
|
|
test-cxx:
|
2013-05-02 15:20:36 +02:00
|
|
|
.if ${PORT_OPTIONS:MCXX} && ${PORT_OPTIONS:MTESTSUITE}
|
2012-01-12 15:24:37 +01:00
|
|
|
# libstdc++ testsuite will break every time, TRUE used to force continuation
|
|
|
|
cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-c++ || true
|
2011-04-27 13:15:39 +02:00
|
|
|
.endif
|
2013-04-30 14:38:52 +02:00
|
|
|
|
|
|
|
test-c:
|
|
|
|
.if ${PORT_OPTIONS:MTESTSUITE}
|
2011-09-12 19:16:58 +02:00
|
|
|
cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-c
|
2011-04-27 13:15:39 +02:00
|
|
|
.endif
|
2011-02-15 08:32:50 +01:00
|
|
|
|
|
|
|
do-install:
|
2013-11-09 23:26:45 +01:00
|
|
|
cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} install-strip DESTDIR=${STAGEDIR}
|
|
|
|
${RM} ${STAGEDIR}${PREFIX}/lib/libiberty.a
|
2011-02-15 08:32:50 +01:00
|
|
|
|
2011-04-27 13:15:39 +02:00
|
|
|
post-install:
|
2013-11-09 23:26:45 +01:00
|
|
|
${MV} ${STAGEDIR}${PREFIX}/share/man ${STAGEDIR}/${PREFIX}
|
|
|
|
cd ${STAGEDIR}${PREFIX}; ${FIND} * -type d -empty | \
|
|
|
|
${SORT} -dr | ${XARGS} ${RMDIR}
|
|
|
|
cd ${STAGEDIR}${PREFIX}; ${FIND} * \( -type f -or -type l \) | \
|
|
|
|
${AWK} ${AWKMANPAGE} | ${SORT} >> ${TMPPLIST}
|
|
|
|
cd ${STAGEDIR}${PREFIX}; ${FIND} * -type d | ${SORT} -r | \
|
|
|
|
${SED} -E -e '/^(bin|sbin|lib|libexec|share|man|include)$$/d' \
|
|
|
|
-e '/^man\/man[1-9]$$/d' -e 's/^/@dirrm /g' >> ${TMPPLIST}
|
2011-02-15 08:32:50 +01:00
|
|
|
|
2013-04-30 14:38:52 +02:00
|
|
|
.include <bsd.port.mk>
|