Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Mar 2013 03:52:36 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r248126 - head/sys/conf
Message-ID:  <201303100352.r2A3qaJN035932@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Sun Mar 10 03:52:35 2013
New Revision: 248126
URL: http://svnweb.freebsd.org/changeset/base/248126

Log:
  - 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.

Modified:
  head/sys/conf/Makefile.arm

Modified: head/sys/conf/Makefile.arm
==============================================================================
--- head/sys/conf/Makefile.arm	Sun Mar 10 02:44:06 2013	(r248125)
+++ head/sys/conf/Makefile.arm	Sun Mar 10 03:52:35 2013	(r248126)
@@ -39,12 +39,18 @@ SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/ldscri
 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} \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303100352.r2A3qaJN035932>