summaryrefslogtreecommitdiff
path: root/lang/gcc47
diff options
context:
space:
mode:
authorsbd <sbd>2012-04-22 08:14:22 +0000
committersbd <sbd>2012-04-22 08:14:22 +0000
commit5eba30287baf74d537851a1e525b1c7209b297a2 (patch)
tree4a45d11d6be91da3950fbaa87e3727f94f9e7c74 /lang/gcc47
parentdfb3889ff109e2fbdcb5ad5724d7ba61ebfd0a7c (diff)
downloadpkgsrc-5eba30287baf74d537851a1e525b1c7209b297a2.tar.gz
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.
Diffstat (limited to 'lang/gcc47')
-rw-r--r--lang/gcc47/options.mk19
1 files changed, 12 insertions, 7 deletions
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