summaryrefslogtreecommitdiff
path: root/lang/gnat-gcc34
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2006-12-16 22:03:19 +0000
committerMartin Wilke <miwi@FreeBSD.org>2006-12-16 22:03:19 +0000
commitab32c3d3d2faeb95a3e87d0a2e26292b6923984b (patch)
treef3a618d5929414bd5d88d9195d48f0b36e1c97f4 /lang/gnat-gcc34
parent- Fix build on 64-bit architectures (diff)
- Require specified binary compiler for bootstrapping
- Some aesthetic changes in the Makefile - Bump PORTVERSION PR: ports/106655 Submitted by: Karel Miklav <karel@lovetemple.net> (maintainer)
Notes
Notes: svn path=/head/; revision=179983
Diffstat (limited to 'lang/gnat-gcc34')
-rw-r--r--lang/gnat-gcc34/Makefile94
1 files changed, 30 insertions, 64 deletions
diff --git a/lang/gnat-gcc34/Makefile b/lang/gnat-gcc34/Makefile
index 76b6cdb572bf..18cc31e19b56 100644
--- a/lang/gnat-gcc34/Makefile
+++ b/lang/gnat-gcc34/Makefile
@@ -8,30 +8,33 @@
PORTNAME= gnat-gcc
PORTVERSION= 3.4.6
-PORTREVISION= 2
-CATEGORIES= lang
-MASTER_SITES= ${MASTER_SITE_GCC}
-MASTER_SITE_SUBDIR= releases/gcc-${PORTVERSION}
-DISTFILES= gcc-core-${PORTVERSION}.tar.gz \
- gcc-ada-${PORTVERSION}.tar.gz
-
-MAINTAINER= karel@lovetemple.net
-COMMENT= The GNU Ada Compiler system
+PORTREVISION= 3
+CATEGORIES= lang
+MASTER_SITES= ${MASTER_SITE_GCC} \
+ ${MASTER_SITE_LOCAL}:boot
+MASTER_SITE_SUBDIR= releases/gcc-${PORTVERSION} \
+ deischen/gcc/:boot
+DISTFILES= gcc-core-${PORTVERSION}.tar.gz \
+ gcc-ada-${PORTVERSION}.tar.gz \
+ gnat-3.15p-boot.tar.gz:boot
+
+MAINTAINER= karel@lovetemple.net
+COMMENT= The GNU Ada Compiler system
ONLY_FOR_ARCHS= i386
USE_GMAKE= yes
-USE_PERL5= yes
+USE_PERL5= yes # Needed? Builds on 6.1 and bootstrapps the 4.1 without Perl.
USE_BISON= yes
CONFLICTS= gcc-3.4.*
WRKSRC= ${WRKDIR}/gcc-${PORTVERSION}
MAN1= cpp${gcc_suffix}.1 \
- gcc${gcc_suffix}.1 \
- gcov${gcc_suffix}.1
+ gcc${gcc_suffix}.1 \
+ gcov${gcc_suffix}.1
MAN7= ${fsf_mans:S/$/${fsf_suffix}.7/}
-NOMANCOMPRESS= yes # too hard to deal with differences on 5-cur and releng4
+NOMANCOMPRESS= yes # Too hard to deal with differences on 5-cur and releng4?
INFO= gcc${gcc_suffix}/cpp \
gcc${gcc_suffix}/cppinternals \
gcc${gcc_suffix}/gcc \
@@ -75,74 +78,37 @@ PLIST_SUB= GCC_VER=${PORTVERSION} \
USE_LDCONFIG= ${targlib}
-# You need a compiler who calls an existing GNAT compiler (3.15 or greater).
-# By default, we'll look for one in the path. If we can't find one, we'll
-# fetch a distfile containing a minimum (still pretty large) compiler toolset
-# and use that to build.
-gnat_gcc!= if ${WHICH} adagcc > /dev/null 2>&1; then \
- ${ECHO_CMD} "`${WHICH} adagcc`"; \
- else \
- ${ECHO_CMD} ""; \
- fi
-gnat_bind!= if ${WHICH} gnatbind > /dev/null 2>&1; then \
- ${ECHO_CMD} "`${WHICH} gnatbind`"; \
- else \
- ${ECHO_CMD} ""; \
- fi
-.if empty(gnat_gcc)
-gnat_gcc!= if ${WHICH} gnatgcc > /dev/null 2>&1; then \
- ${ECHO_CMD} "`${WHICH} gnatgcc`"; \
- else \
- ${ECHO_CMD} ""; \
- fi
-.endif
-
-.if !empty(gnat_gcc) && !empty(gnat_bind)
-build_path!= if [ -x ${gnat_gcc} -a -x ${gnat_bind} ]; then \
- ${ECHO_CMD} "$$PATH"; \
- else \
- ${ECHO_CMD} ""; \
- fi
-.else
-build_path=
-.endif
-
-.if empty(build_path)
-DISTFILES+= gnat-3.15p-boot.tar.gz:boot
-MASTER_SITES+= ${MASTER_SITE_LOCAL}:boot
-MASTER_SITE_SUBDIR+= deischen/gcc/:boot
+# An ancient binary distribution of GNAT is used for bootstrapping.
.if ${OSVERSION} >= 500000
BUILD_DEPENDS+= ${LOCALBASE}/lib/compat/libc.so.4:${PORTSDIR}/misc/compat4x
.endif
# Warning! You need the trailing slash on GCC_EXEC_PREFIX.
-compiler_data= GCC_EXEC_PREFIX=${WRKDIR}/adaboot/lib/gcc-lib/ \
+compiler_defs= GCC_EXEC_PREFIX=${WRKDIR}/adaboot/lib/gcc-lib/ \
ADA_INCLUDE_PATH=${WRKDIR}/adaboot/lib/gcc-lib/adainclude \
ADA_OBJECTS_PATH=${WRKDIR}/adaboot/lib/gcc-lib/adalib
bootstrap_path= ${WRKDIR}/adaboot/bin
build_path= ${bootstrap_path}:${PATH}
-gnat_gcc= adagcc
-.endif
# Make sure we use the Ada-aware gcc compiler.
-CC= ${gnat_gcc}
+CC= adagcc
# C compiler from GNAT 3.15 doesn't understand modern flags.
CFLAGS=
-CONFIGURE_ENV+= ${compiler_data} PATH=${build_path}
-MAKE_ENV+= ${compiler_data} PATH=${build_path} PTHREAD_LIBS=${PTHREAD_LIBS} CC=${CC}
+CONFIGURE_ENV+= ${compiler_defs} PATH=${build_path} CC=${CC}
+MAKE_ENV+= ${compiler_defs} PATH=${build_path} CC=${CC} PTHREAD_LIBS=${PTHREAD_LIBS}
pre-everything::
@${ECHO_MSG} "Making GCC ${DISTNAME:S/^gcc-//} for ${OPSYS} ${OSREL} target=${CONFIGURE_TARGET}"
# Append ' [FreeBSD]' to gcc version string.
post-patch:
- @${REINPLACE_CMD} -e 's|\(const char version_string.*\)";|\1 [FreeBSD]";|' \
+ ${REINPLACE_CMD} -e 's|\(const char version_string.*\)";|\1 [FreeBSD]";|' \
${WRKSRC}/gcc/version.c
pre-configure:
cd ${WRKSRC}; contrib/gcc_update --touch
- @${RM} -f ${WRKSRC}/gcc/*/*.info*
- @${MKDIR} ${CONFIGURE_WRKSRC}
- # Ada and C compilers should be the same.
+ ${RM} -f ${WRKSRC}/gcc/*/*.info*
+ ${MKDIR} ${CONFIGURE_WRKSRC}
+ @# Ada and C compilers should be the same.
if [ -d ${bootstrap_path} ]; then \
${LN} -s ${bootstrap_path}/adagcc ${bootstrap_path}/cc; \
fi
@@ -158,16 +124,16 @@ do-build:
post-install:
${LN} -s ${PREFIX}/bin/gcc${gcc_suffix}/gcc${gcc_suffix} \
${PREFIX}/bin/gcc${gcc_suffix}/gcc
- # Man pages can only be generated if Perl >= 5.6 is installed; fake them otherwise.
+ @# Man pages can only be generated if Perl >= 5.6 is installed; fake them otherwise.
for mp in ${_MANPAGES}; do \
${TEST} -e $${mp} || ${TOUCH} ${TOUCH_FLAGS} $${mp}; \
done
- # Version FSF funding and licensing manuals.
+ @# Version FSF funding and licensing manuals.
for mp in ${fsf_mans}; do \
${MV} -f ${PREFIX}/man/man7/$${mp}.7 \
${PREFIX}/man/man7/$${mp}${fsf_suffix}.7; \
done
- # Prepare a temporary list of installed libraries and include files.
+ @# Prepare a temporary list of installed libraries and include files.
${RM} -f ${WRKDIR}/PLIST.lib
for d in ${targlib:S/^${PREFIX}\///} ${targlib:S/^${PREFIX}\///:S/lib/libexec/}; do \
cd ${PREFIX}; \
@@ -176,12 +142,12 @@ post-install:
${FIND} $${d} -type d | ${SORT} -r | ${SED} -e 's/^/@dirrm /g' >>${WRKDIR}/PLIST.lib; \
fi; \
done
- # Following directories should be removed on deinstal if empty. Add them to the temporary list.
+ @# Following directories should be removed on deinstal if empty. Add them to the temporary list.
${ECHO_CMD} "@unexec ${RMDIR} %D/lib/gcc/${CONFIGURE_TARGET} 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
${ECHO_CMD} "@unexec ${RMDIR} %D/lib/gcc 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
${ECHO_CMD} "@unexec ${RMDIR} %D/libexec/gcc/${CONFIGURE_TARGET} 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
${ECHO_CMD} "@unexec ${RMDIR} %D/libexec/gcc 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
- # Insert the temporary list in the packing list.
+ @# Insert the temporary list in the packing list.
cd ${WRKDIR}; ${SED} -i -e "/PLIST.lib/ r PLIST.lib" ${TMPPLIST}
.include <bsd.port.post.mk>