diff options
author | dim <dim@FreeBSD.org> | 2013-12-30 20:15:46 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-12-30 20:15:46 +0000 |
commit | 5fce04bd49f3f5cc0cdad8752ecca4dd5682a21b (patch) | |
tree | 0dad04d1ac565d14d7c55b2a8173f9128cc6509e /sys/conf | |
parent | 8a773bc13424e791cea0f4c0136a48f9667e87c5 (diff) | |
download | FreeBSD-src-5fce04bd49f3f5cc0cdad8752ecca4dd5682a21b.zip FreeBSD-src-5fce04bd49f3f5cc0cdad8752ecca4dd5682a21b.tar.gz |
MFC r257532 (by adrian):
Fix this build for clang.
MFC r259730:
To avoid having to explicitly test COMPILER_TYPE for setting
clang-specific or gcc-specific flags, introduce the following new
variables for use in Makefiles:
CFLAGS.clang
CFLAGS.gcc
CXXFLAGS.clang
CXXFLAGS.gcc
In bsd.sys.mk, these get appended to the regular CFLAGS or CXXFLAGS for
the right compiler.
MFC r259913:
For libstand and sys/boot, split off gcc-only flags into CFLAGS.gcc.
MFC r259927:
Fix pc98 build, by also forcing COMPILER_TYPE in sys/boot/pc98/boot2's
Makefile.
Pointy hat to: dim
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/Makefile.arm | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/conf/Makefile.arm b/sys/conf/Makefile.arm index c13272b..5bacbe3 100644 --- a/sys/conf/Makefile.arm +++ b/sys/conf/Makefile.arm @@ -39,20 +39,16 @@ SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/ldscript.$M=ldscript.$M} STRIP_FLAGS = -S .endif -.if ${COMPILER_TYPE} != "clang" -CFLAGS += -mno-thumb-interwork -.endif +CFLAGS.gcc += -mno-thumb-interwork .if empty(DDB_ENABLED) -.if defined(WITHOUT_ARM_EABI) && ${COMPILER_TYPE} != "clang" -CFLAGS += -mno-apcs-frame +.if defined(WITHOUT_ARM_EABI) +CFLAGS.gcc += -mno-apcs-frame .endif .elif !defined(WITHOUT_ARM_EABI) CFLAGS += -funwind-tables -.if ${COMPILER_TYPE} == "clang" # clang requires us to tell it to emit assembly with unwind information -CFLAGS += -mllvm -arm-enable-ehabi -.endif +CFLAGS.clang += -mllvm -arm-enable-ehabi .endif SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader ${LDFLAGS} \ |