summaryrefslogtreecommitdiff
path: root/lang/gcc3-ada/Makefile
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2003-08-21 18:28:17 +0000
committerdrochner <drochner@pkgsrc.org>2003-08-21 18:28:17 +0000
commitae78fbdb8459e45daf1fb0db11b187bbbd766870 (patch)
tree60611c7411eed59e2f46d35a2622ec54dff9720f /lang/gcc3-ada/Makefile
parent8f1aedda6a9dba83fb1c07ee5c5aa7861fdccedc (diff)
downloadpkgsrc-ae78fbdb8459e45daf1fb0db11b187bbbd766870.tar.gz
simplify the bootstrap stuff to require only a minimum of initial ADA
support; in particular don't use the C compiler within the bootstrap ADA installation (gcc installs "fixinclude" headers which are not portable across OS versions) fixes PR pkg/22470 by John R. Shannon
Diffstat (limited to 'lang/gcc3-ada/Makefile')
-rw-r--r--lang/gcc3-ada/Makefile44
1 files changed, 13 insertions, 31 deletions
diff --git a/lang/gcc3-ada/Makefile b/lang/gcc3-ada/Makefile
index 55c9a420572..e395e638842 100644
--- a/lang/gcc3-ada/Makefile
+++ b/lang/gcc3-ada/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2003/08/11 14:15:58 drochner Exp $
+# $NetBSD: Makefile,v 1.7 2003/08/21 18:28:17 drochner Exp $
#
PKGNAME= gcc3${GCC3_PKGMODIF}-ada-${GCC_VERSION}
@@ -16,62 +16,44 @@ CONFIGURE_ARGS+= --enable-languages="ada"
#
# To make things more interesting, we need a gcc with ada support to build
# ada support.
-# The ADA_BOOT definition is used if the system compiler is not sufficient.
-# For pkg bootstrap, the ada capable gcc (probably cross-compiled)
-# can be anywhere.
-# GNATGCC_PREFIX assumes a standard gcc install tree layout.
-#GNATGCC_PREFIX= /usr/pkg/gcc3
-
+# A gcc tree with compiler driver and gnatbind should be in ADA_BOOT_PATH.
+#ADA_BOOT_PATH= /path/to/adagcc
# Use this if a special compiler driver is needed to compile ada programs
# (as seen in linux installations).
#GNATGCC_ADA_DRIVER= gnatgcc
-.if defined(GNATGCC_PREFIX)
-ADA_BOOT= yes
-ADA_BOOT_CC= ${GNATGCC_PREFIX}/bin/gcc
-ADA_BOOT_CPP= ${GNATGCC_PREFIX}/bin/gcc -E
+.if defined(ADA_BOOT_PATH)
+
.if defined(GNATGCC_ADA_DRIVER)
-ADA_BOOT_ADAC= ${GNATGCC_PREFIX}/bin/${GNATGCC_ADA_DRIVER}
+ADA_BOOT_ADAC= ${ADA_BOOT_PATH}/bin/${GNATGCC_ADA_DRIVER}
.else
-ADA_BOOT_ADAC= ${GNATGCC_PREFIX}/bin/gcc
+ADA_BOOT_ADAC= ${ADA_BOOT_PATH}/bin/gcc
.endif
-ADA_BOOT_PATH= ${GNATGCC_PREFIX}/bin
-.endif
-
-.if defined(ADA_BOOT)
-# probably some overkill here...
+ADA_BOOT_GNATBIND= ${ADA_BOOT_PATH}/bin/gnatbind
-CC= ${ADA_BOOT_CC}
-CPP= ${ADA_BOOT_CPP}
-PATH:= ${ADA_BOOT_PATH}:${PATH}
-
-EXTRA_ENV= CC=${ADA_BOOT_CC:Q}
-EXTRA_ENV= CC_FOR_BUILD=${ADA_BOOT_CC:Q}
-EXTRA_ENV+= CPP=${ADA_BOOT_CPP:Q}
EXTRA_ENV+= ADAC=${ADA_BOOT_ADAC:Q}
-EXTRA_ENV+= PATH=${ADA_BOOT_PATH}:${PATH}
-
CONFIGURE_ENV+= ${EXTRA_ENV}
MAKE_ENV+= ${EXTRA_ENV}
-.else # !ADA_BOOT
+.else # !ADA_BOOT_PATH
# XXX No known system has ada in the main tree.
ONLY_FOR_PLATFORM= sorry_need_ada_compiler
-.endif # ADA_BOOT
+.endif # ADA_BOOT_PATH
#
# End of bootstrap section
#
+post-buildlink:
+ ${LN} -sf ${ADA_BOOT_GNATBIND} ${BUILDLINK_DIR}/bin
+
post-configure:
${TEST} -f ${WRKSRC}/gcc/ada/Makefile \
|| ${FALSE} # no ada bootstrap found by configure
-.if defined(ADA_BOOT) # ??? see install notes
(cd ${WRKSRC}/gcc/ada && ${TOUCH} treeprs.ads [es]info.h nmake.ad[bs])
-.endif
do-build:
(cd ${WRKSRC}/gcc && ${SETENV} ${MAKE_ENV} ${GMAKE} ada)