pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk compiler.mk: Fix Ada packages when PKGSRC_COMPILER=...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/297c2b8d2e4b
branches:  trunk
changeset: 621300:297c2b8d2e4b
user:      marino <marino%pkgsrc.org@localhost>
date:      Sun Jul 07 09:06:23 2013 +0000

description:
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:

 mk/compiler.mk |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r f97d4cde1bca -r 297c2b8d2e4b mk/compiler.mk
--- a/mk/compiler.mk    Sun Jul 07 08:57:03 2013 +0000
+++ b/mk/compiler.mk    Sun Jul 07 09:06:23 2013 +0000
@@ -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+=        ${_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}



Home | Main Index | Thread Index | Old Index