diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-04-17 15:53:22 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-04-17 15:53:22 +0000 |
commit | b9def0189fc9221a7d09ec42107ca30e7b53c424 (patch) | |
tree | c10f7a1323a40f91fa8e8b1f1fc2fa3fafa59b08 /gnu/usr.bin | |
parent | 8faa79c5c2c2a36de7af6bdbb76da3392e7c51c7 (diff) |
Change build infrastructure to allow building both gcc and clang. This
doesn't actually flip the switch yet, so aarch64 continues to be the only
architecture for which we build clang.
ok jsg@, deraadt@
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r-- | gnu/usr.bin/Makefile | 10 | ||||
-rw-r--r-- | gnu/usr.bin/clang/Makefile.inc | 7 |
2 files changed, 12 insertions, 5 deletions
diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile index fc125c08c8e..1806c279241 100644 --- a/gnu/usr.bin/Makefile +++ b/gnu/usr.bin/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.58 2017/02/20 01:00:26 jsg Exp $ +# $OpenBSD: Makefile,v 1.59 2017/04/17 15:53:21 kettenis Exp $ # $NetBSD: Makefile,v 1.35 1996/04/03 21:20:52 chuck Exp $ .include <bsd.own.mk> @@ -6,11 +6,13 @@ .if make(obj) SUBDIR+= cc clang gcc .else -. if ${COMPILER_VERSION:L} == "gcc3" +. if ${BUILD_GCC3:L} == "yes" SUBDIR+= gcc -. elif ${COMPILER_VERSION:L} == "gcc4" +. endif +. if ${BUILD_GCC4:L} == "yes" SUBDIR+= cc -. elif ${COMPILER_VERSION:L} == "clang" +. endif +. if ${BUILD_CLANG:L} == "yes" SUBDIR+= clang . endif .endif diff --git a/gnu/usr.bin/clang/Makefile.inc b/gnu/usr.bin/clang/Makefile.inc index 1229abfe8f7..27678e1d38b 100644 --- a/gnu/usr.bin/clang/Makefile.inc +++ b/gnu/usr.bin/clang/Makefile.inc @@ -1,7 +1,12 @@ -# $OpenBSD: Makefile.inc,v 1.4 2017/02/16 02:08:42 jsg Exp $ +# $OpenBSD: Makefile.inc,v 1.5 2017/04/17 15:53:21 kettenis Exp $ LLVM_SRCS?= ${.CURDIR}/../../../llvm +.if ${COMPILER_VERSION:L} != "clang" +CC= clang +CXX= clang++ +.endif + BOOTSTRAP_CLANG?=no .if ${BOOTSTRAP_CLANG} == "yes" CC= egcc |