From 640a8700c82b4331498f4f5c16e240ff365c3210 Mon Sep 17 00:00:00 2001 From: marino Date: Mon, 16 Mar 2015 01:04:14 +0000 Subject: Mk/Uses/ada.mk: Add gcc5-based Ada compiler support A new argument has been added to USES=ada, "5", which will select the gcc5-aux compiler (gcc 5) instead of the gcc-aux compiler (gcc 4.9). Additionally, it will check if ADA_DEFAULT is defined and equal to "5". If that is the case, gcc5-aux will be used by default, even if no arguments are defined. The use case is to define it in make.conf so that all Ada ports are built with same compiler. This capability will be used to confirm all Ada ports build correctly with gcc5-aux before the default compiler is switched. --- Mk/Uses/ada.mk | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'Mk/Uses') diff --git a/Mk/Uses/ada.mk b/Mk/Uses/ada.mk index 5a6a1fb20f05..fcbbb47791df 100644 --- a/Mk/Uses/ada.mk +++ b/Mk/Uses/ada.mk @@ -1,10 +1,12 @@ # $FreeBSD$ # # Establish Ada-capable compiler as a build dependency +# To change default compiler, define ADA_DEFAULT in make.conf to 5 +# Note that gcc47-aux is being removed soon, so 47 is not a legal default # # Feature: ada # Usage: USES=ada -# Valid ARGS: 47 +# Valid ARGS: 47, 5 # # MAINTAINER: marino@FreeBSD.org @@ -13,17 +15,22 @@ _INCLUDE_USES_ADA_MK= yes CC= ada -. if ${ada_ARGS} == 47 -BUILD_DEPENDS+= ${LOCALBASE}/gcc47-aux/bin/ada:${PORTSDIR}/lang/gcc47-aux -MAKE_ENV+= PATH=${LOCALBASE}/gcc47-aux/bin:${PATH} -CONFIGURE_ENV+= PATH=${LOCALBASE}/gcc47-aux/bin:${PATH} +. if ${ada_ARGS:M47} +ADAXX= gcc47 +. elif ${ada_ARGS:M5} +ADAXX= gcc5 . else -BUILD_DEPENDS+= ${LOCALBASE}/gcc-aux/bin/ada:${PORTSDIR}/lang/gcc-aux -MAKE_ENV+= PATH=${LOCALBASE}/gcc-aux/bin:${PATH} -CONFIGURE_ENV+= PATH=${LOCALBASE}/gcc-aux/bin:${PATH} +. if defined(ADA_DEFAULT) && ${ADA_DEFAULT} == 5 +ADAXX= gcc5 +. else +ADAXX= gcc +. endif . endif -MAKE_ENV+= ADA_PROJECT_PATH=${LOCALBASE}/lib/gnat -CONFIGURE_ENV+= ADA_PROJECT_PATH=${LOCALBASE}/lib/gnat +BUILD_DEPENDS+= ${LOCALBASE}/gcc47-aux/bin/ada:${PORTSDIR}/lang/${ADAXX}-aux +MAKE_ENV+= PATH=${LOCALBASE}/${ADAXX}-aux/bin:${PATH} \ + ADA_PROJECT_PATH=${LOCALBASE}/lib/gnat +CONFIGURE_ENV+= PATH=${LOCALBASE}/${ADAXX}-aux/bin:${PATH} \ + ADA_PROJECT_PATH=${LOCALBASE}/lib/gnat .endif -- cgit