diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2011-07-04 23:37:33 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2011-07-04 23:37:33 +0000 |
commit | b45a74913182c71a5df8a0e53fcb49511da57703 (patch) | |
tree | 63f0f1bbb118687023d4e82f00a6e2042f61f9a1 /share/mk | |
parent | 9c09c2a414dbd0601897559ec634f69332b5a5c3 (diff) |
Simplfy GCC decision by making the list of archs instead a huge
list if ${MACHINE_ARCH} == "xx" tests
ok deraadt@ pirofti@ (with fixes mentioned from kettenis)
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/bsd.own.mk | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 5f5508e3dac..13d6c332e39 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.own.mk,v 1.105 2011/06/23 22:46:12 schwarze Exp $ +# $OpenBSD: bsd.own.mk,v 1.106 2011/07/04 23:37:32 drahn Exp $ # $NetBSD: bsd.own.mk,v 1.24 1996/04/13 02:08:09 thorpej Exp $ # Host-specific overrides @@ -31,19 +31,20 @@ ELF_TOOLCHAIN?= no ELF_TOOLCHAIN?= yes .endif -# gcc3 -.if ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "m88k" || \ - ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "vax" +GCC2_ARCH=m68k m88k sparc vax +GCC4_ARCH=amd64 hppa i386 mips64* powerpc sparc64 + +.for _arch in ${MACHINE_ARCH} +.if !empty(GCC2_ARCH:M${_arch}) USE_GCC3?=no COMPILER_VERSION?=gcc2 -.elif ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "hppa" || \ - ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH:Mmips64*} || \ - ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" +.elif !empty(GCC4_ARCH:M${_arch}) COMPILER_VERSION?=gcc4 .else USE_GCC3?=yes COMPILER_VERSION?=gcc3 .endif +.endfor # where the system object and source trees are kept; can be configurable # by the user in case they want them in ~/foosrc and ~/fooobj, for example |