From 8c75bd8764b110a0c52e0107f5d605cc7bdabd13 Mon Sep 17 00:00:00 2001 From: marino Date: Sun, 7 Jul 2013 09:06:23 +0000 Subject: 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} --- mk/compiler.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mk/compiler.mk') 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} -- cgit v1.2.3