From de36f3976f5b987b5b5836c1ce0d9e76ae63d2d5 Mon Sep 17 00:00:00 2001 From: sbd Date: Sun, 22 Apr 2012 08:14:22 +0000 Subject: Change the way that ${MULTILIB_SUPPORTED} is used. Three situations need it be handled: 1) Multilib support is unknowen, i.e. there is nothing in the options.mk file to appropriately set ${MULTILIB_SUPPORTED} (currently all platforms except Linux/x86_64). In this situation nothing should be done. 2) Multilib _is_ supported, in this situation the 'gcc-multilib' option should be made available and the CONFIGURE_ARGS modified accordingly. 3) Multilib _is not_ supported, in this situation CONFIGURE_ARGS need to be modified. --- lang/gcc47/options.mk | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'lang/gcc47') diff --git a/lang/gcc47/options.mk b/lang/gcc47/options.mk index a985d47a892..b8135e1a002 100644 --- a/lang/gcc47/options.mk +++ b/lang/gcc47/options.mk @@ -1,4 +1,4 @@ -# $NetBSD: options.mk,v 1.2 2012/04/18 07:10:40 obache Exp $ +# $NetBSD: options.mk,v 1.3 2012/04/22 08:14:22 sbd Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.${GCC_PKGNAME} PKG_SUPPORTED_OPTIONS= nls gcc-inplace-math gcc-c++ gcc-fortran gcc-java \ @@ -16,13 +16,16 @@ PKG_SUGGESTED_OPTIONS+= gcc-java ### ### Determine if multilib is avalible. ### -MULTILIB_SUPPORTED?= Yes -.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) && \ - exists(/usr/include/gnu/stubs-64.h) && \ - !exists(/usr/include/gnu/stubs-32.h) +MULTILIB_SUPPORTED?= unknowen +.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) +. if exists(/usr/include/gnu/stubs-64.h) && \ + !exists(/usr/include/gnu/stubs-32.h) MULTILIB_SUPPORTED=No +. else +MULTILIB_SUPPORTED=Yes +. endif .endif -.if empty(MULTILIB_SUPPORTED:M[Nn][Oo]) +.if !empty(MULTILIB_SUPPORTED:M[Yy][Ee][Ss]) PKG_SUPPORTED_OPTIONS+= gcc-multilib PKG_SUGGESTED_OPTIONS+= gcc-multilib .endif @@ -46,7 +49,9 @@ CONFIGURE_ARGS+= --disable-nls ### ### Multilib Support ### -.if empty(PKG_OPTIONS:Mgcc-multilib) +.if (!empty(MULTILIB_SUPPORTED:M[Yy][Ee][Ss]) && \ + empty(PKG_OPTIONS:Mgcc-multilib) ) || \ + !empty(MULTILIB_SUPPORTED:M[Nn][Oo]) CONFIGURE_ARGS+= --disable-multilib .endif -- cgit v1.2.3