2015-10-20 12:26:40 +02:00
|
|
|
# $NetBSD: Makefile,v 1.44 2015/10/20 10:26:40 jperkin Exp $
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
DISTNAME= gcc-${GCC_VERSION}
|
|
|
|
PKGNAME= gcc44-${GCC_VERSION}
|
2014-05-30 01:35:13 +02:00
|
|
|
PKGREVISION= 6
|
2009-09-18 13:24:50 +02:00
|
|
|
CATEGORIES= lang
|
|
|
|
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC_VERSION}/}
|
|
|
|
EXTRACT_SUFX= .tar.bz2
|
|
|
|
|
2012-03-15 07:45:26 +01:00
|
|
|
MAINTAINER= sbd@NetBSD.org
|
2009-09-18 13:24:50 +02:00
|
|
|
HOMEPAGE= http://gcc.gnu.org/
|
2009-09-18 14:29:14 +02:00
|
|
|
COMMENT= GNU Compiler Collection 4.4
|
2009-09-24 14:23:44 +02:00
|
|
|
LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3
|
|
|
|
|
2011-07-14 14:52:35 +02:00
|
|
|
USE_TOOLS+= awk:run bash:run chmod gmake:run makeinfo sed:run
|
2009-09-18 13:24:50 +02:00
|
|
|
|
2012-03-15 08:43:30 +01:00
|
|
|
GCC_VERSION= 4.4.7
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
GCC_SUBPREFIX= gcc44
|
2009-09-25 04:48:08 +02:00
|
|
|
GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX}
|
2010-03-15 09:27:06 +01:00
|
|
|
FILES_SUBST+= PKGNAME=${PKGNAME}
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
# To avoid GNU surprises
|
|
|
|
CONFIG_SHELL= ${TOOLS_PATH.bash}
|
|
|
|
|
2011-11-29 20:14:53 +01:00
|
|
|
NOT_FOR_PLATFORM= Interix-*-* DragonFly-*-*
|
2009-09-18 13:24:50 +02:00
|
|
|
UNLIMIT_RESOURCES+= datasize
|
2011-03-16 18:44:23 +01:00
|
|
|
UNLIMIT_RESOURCES+= stacksize
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
2009-10-24 22:15:05 +02:00
|
|
|
.include "options.mk"
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
# Determine whether to use binutils
|
2011-04-14 21:31:35 +02:00
|
|
|
.if ${OPSYS} == "SunOS"
|
2011-10-12 17:48:40 +02:00
|
|
|
CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump
|
2011-10-04 16:06:47 +02:00
|
|
|
CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld
|
|
|
|
. if !exists(/usr/sfw/bin/gas)
|
|
|
|
CONFIGURE_ARGS+= --without-gnu-as --with-as=/usr/ccs/bin/as
|
2011-04-14 21:31:35 +02:00
|
|
|
. else
|
2011-10-04 16:06:47 +02:00
|
|
|
CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/sfw/bin/gas
|
2011-04-14 21:31:35 +02:00
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
# REPLACE_AWK+= gcc/testsuite/gcc.test-framework/test-framework.awk \
|
|
|
|
# gcc/mkmap-symver.awk \
|
|
|
|
# gcc/optc-gen.awk \
|
|
|
|
# gcc/mkmap-flat.awk \
|
|
|
|
# gcc/opt-gather.awk \
|
|
|
|
# gcc/opth-gen.awk \
|
|
|
|
# gcc/opt-functions.awk
|
|
|
|
|
2009-09-24 13:50:56 +02:00
|
|
|
REPLACE_BASH+= contrib/dg-cmp-results.sh
|
|
|
|
REPLACE_BASH+= contrib/reghunt/bin/gcc-svn-patchlist
|
|
|
|
REPLACE_BASH+= contrib/reghunt/bin/gcc-svn-update
|
|
|
|
REPLACE_BASH+= contrib/reghunt/bin/gcc-svn-update-fix
|
|
|
|
REPLACE_BASH+= contrib/reghunt/bin/reg-hunt
|
|
|
|
REPLACE_BASH+= contrib/reghunt/bin/reg-test
|
|
|
|
REPLACE_BASH+= contrib/reghunt/date_based/reg_periodic
|
|
|
|
REPLACE_BASH+= contrib/reghunt/date_based/reg_search
|
|
|
|
REPLACE_BASH+= gcc/dbgcnt.def
|
|
|
|
REPLACE_BASH+= gcc/testsuite/gcc.test-framework/gen_directive_tests
|
|
|
|
REPLACE_BASH+= libstdc++-v3/scripts/run_doxygen
|
|
|
|
|
2009-09-18 13:24:50 +02:00
|
|
|
CONFIGURE_ARGS+= --prefix=${GCC_PREFIX:Q}
|
|
|
|
CONFIGURE_ARGS+= --enable-languages=${LANGS:Q}
|
|
|
|
CONFIGURE_ARGS+= --enable-shared
|
|
|
|
CONFIGURE_ARGS+= --enable-long-long
|
|
|
|
CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q}
|
|
|
|
CONFIGURE_ARGS+= --disable-libssp
|
|
|
|
CONFIGURE_ARGS+= --enable-threads=posix
|
2014-05-16 00:53:46 +02:00
|
|
|
.if ${OPSYS} == "Darwin"
|
|
|
|
# See ${WRKSRC}/libgcc/config/t-slibgcc-darwin: It uses strip(1) to
|
|
|
|
# create a stub library, not just to remove symbols, so we must not
|
|
|
|
# let strip(1) be a no-op regardless of ${INSTALL_UNSTRIPPED} or the
|
|
|
|
# build fails for missing files.
|
|
|
|
CONFIGURE_ARGS+= STRIP_FOR_TARGET=${TOOLS_PLATFORM.strip}
|
|
|
|
.endif
|
2009-09-18 13:24:50 +02:00
|
|
|
|
2010-03-15 09:27:06 +01:00
|
|
|
CONFIGURE_ENV+= CONFIG_SHELL=${CONFIG_SHELL}
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
MAKE_ENV+= SHELL=${CONFIG_SHELL}
|
2010-03-15 09:27:06 +01:00
|
|
|
MAKE_ENV+= ac_cv_path_ac_cv_prog_chmod=${TOOLS_CHMOD}
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
# ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into
|
|
|
|
# a binary so we need to make sure we give it the installed sed and not
|
|
|
|
# the tool wrapped one.
|
2010-03-15 09:27:06 +01:00
|
|
|
MAKE_ENV+= lt_cv_path_SED=${TOOLS_SED}
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
CPPFLAGS+= -I${BUILDLINK_DIR}/include
|
|
|
|
CFLAGS+= -I${BUILDLINK_DIR}/include
|
|
|
|
|
|
|
|
# Somone should fix this so it will match the NetBSD system compiler
|
|
|
|
#.if ${OPSYS} == "NetBSD"
|
|
|
|
#GCC_PLATFORM= ${LOWER_ARCH}--${LOWER_OPSYS}${APPEND_ELF}
|
|
|
|
#CONFIGURE_ARGS+= --host=${GCC_PLATFORM:Q}
|
|
|
|
#MAKE_ENV+= AR=/usr/bin/ar
|
|
|
|
#.endif # NetBSD
|
|
|
|
|
2014-08-12 10:33:31 +02:00
|
|
|
.if ${OPSYS} == "NetBSD"
|
|
|
|
.if !empty(OS_VERSION:M5.*)
|
|
|
|
MAKE_ENV+= ac_cv_func_gethostbyname_r=no
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2009-09-24 13:58:35 +02:00
|
|
|
LIBS.SunOS+= -lgmp
|
|
|
|
|
2015-10-20 12:26:40 +02:00
|
|
|
# Ignore missing rpaths in "fake" library.
|
|
|
|
CHECK_SHLIBS_SKIP+= ${GCC_PKGNAME}/lib*/libgcj_bc.so*
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
do-configure:
|
|
|
|
${MKDIR} ${WRKDIR}/obj
|
|
|
|
cd ${WRKDIR}/obj; ${SETENV} ${CONFIGURE_ENV} ${CONFIG_SHELL} ${WRKSRC}/configure ${CONFIGURE_ARGS}
|
|
|
|
|
|
|
|
do-build:
|
2010-03-15 09:27:06 +01:00
|
|
|
(${_ULIMIT_CMD} cd ${WRKDIR}/obj && ${SETENV} ${MAKE_ENV} ${GMAKE} -j${MAKE_JOBS:U1:Q} )
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
do-test:
|
2011-03-16 18:48:22 +01:00
|
|
|
#.if (${MACHINE_GNU_ARCH} == "x86_64")
|
|
|
|
# (cd ${FILESDIR} && ${CP} netbsd64macro.dfs ${WRKSRC}/gcc/testsuite/ada/acats/support/macro.dfs)
|
|
|
|
#.endif
|
2009-09-18 13:24:50 +02:00
|
|
|
(cd ${WRKDIR}/obj && ${GMAKE} -k check)
|
|
|
|
|
|
|
|
do-install:
|
2010-03-15 09:27:06 +01:00
|
|
|
(cd ${WRKDIR}/obj && ${SETENV} ${MAKE_ENV} ${GMAKE} install DESTDIR=${DESTDIR} \
|
2009-09-25 04:48:08 +02:00
|
|
|
&& ${TEST} -f ${DESTDIR}${GCC_PREFIX}/bin/cc || ${LN} -f ${DESTDIR}${GCC_PREFIX}/bin/gcc ${DESTDIR}${GCC_PREFIX}/bin/cc)
|
2009-09-18 13:24:50 +02:00
|
|
|
|
2011-10-12 18:10:48 +02:00
|
|
|
.if ${OPSYS} == "SunOS" && ${OS_VERSION} != "5.11" && !empty(MACHINE_ARCH:M*86*)
|
|
|
|
post-install:
|
|
|
|
-${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m32
|
|
|
|
-${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m64
|
|
|
|
.endif
|
|
|
|
|
2009-09-18 13:24:50 +02:00
|
|
|
GENERATE_PLIST+= \
|
2009-09-25 04:48:08 +02:00
|
|
|
cd ${DESTDIR}${PREFIX} && ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print \
|
|
|
|
| ${SORT} ;
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|