summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authormarino <marino@pkgsrc.org>2013-07-07 09:06:23 +0000
committermarino <marino@pkgsrc.org>2013-07-07 09:06:23 +0000
commit86c822d400b081c66ab68b6aef9194179162de13 (patch)
treefa17eec5f334d52ad551ed70f767c233255c4aa9 /mk
parentb1a38021f3c3eb7abb67f4f7da6d123c8f4ebbd9 (diff)
downloadpkgsrc-86c822d400b081c66ab68b6aef9194179162de13.tar.gz
compiler.mk: Fix Ada packages when PKGSRC_COMPILER=clang
Only one compiler is used when "ada" is listed in LANGUAGES, and that is the one built by the lang/gcc-aux source package. When PKGSRC_COMPILER is defined as anything else other than "gcc", the Ada packages fail to build. This can be seen when clang is used with CLANGBASE=${LOCALBASE}. This straight-forward fix is to override the user specification of PKGSRC_COMPILER when Ada is specified and define it as "gcc" in all cases. Tested on NetBSD 6.1 amd64 with CLANGBASE=${LOCALBASE}
Diffstat (limited to 'mk')
-rw-r--r--mk/compiler.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/mk/compiler.mk b/mk/compiler.mk
index 65683280b29..7092199c0c3 100644
--- a/mk/compiler.mk
+++ b/mk/compiler.mk
@@ -1,4 +1,4 @@
-# $NetBSD: compiler.mk,v 1.80 2012/12/12 20:49:01 marino Exp $
+# $NetBSD: compiler.mk,v 1.81 2013/07/07 09:06:23 marino Exp $
#
# This Makefile fragment implements handling for supported C/C++/Fortran
# compilers.
@@ -99,6 +99,12 @@ _ACCEPTABLE_COMPILERS+= ${_compiler_}
_ACCEPTABLE_COMPILERS+= ${_COMPILERS}
.endif
+# Currently only gcc-based compilers support Ada
+# Override PKGSRC_COMPILER if Ada language specified
+.if !empty(USE_LANGUAGES:Mada)
+PKGSRC_COMPILER= gcc
+.endif
+
.if defined(_ACCEPTABLE_COMPILERS)
. for _acceptable_ in ${_ACCEPTABLE_COMPILERS}
. for _compiler_ in ${PKGSRC_COMPILER}