diff options
author | andrew <andrew@FreeBSD.org> | 2013-03-10 03:52:35 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2013-03-10 03:52:35 +0000 |
commit | b1fd5c3055731d65a6e8773ae29571682c0d9578 (patch) | |
tree | 9a02d8be0aaee00c7354bc94f0445c955a00da47 /sys/conf | |
parent | df298b8642a61bc80c747977ab811ff298566f90 (diff) | |
download | FreeBSD-src-b1fd5c3055731d65a6e8773ae29571682c0d9578.zip FreeBSD-src-b1fd5c3055731d65a6e8773ae29571682c0d9578.tar.gz |
- Clang doesn't understand the -mno-thumb-interwork. Only use it with gcc.
- We need to add "-mllvm -arm-enable-ehabi" to clangs CFLAGS when
generating the unwind tables to tell it to add the required directives to
the assembly it generates.
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/Makefile.arm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/conf/Makefile.arm b/sys/conf/Makefile.arm index 63b451d..8e3b82e 100644 --- a/sys/conf/Makefile.arm +++ b/sys/conf/Makefile.arm @@ -39,12 +39,18 @@ SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/ldscript.$M=ldscript.$M} STRIP_FLAGS = -S .endif +.if ${COMPILER_TYPE} != "clang" CFLAGS += -mno-thumb-interwork +.endif .if empty(DDB_ENABLED) CFLAGS += -mno-apcs-frame .elif defined(WITH_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 .endif SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader ${LDFLAGS} \ |