From 7e4113e2e19e0b0463626ec3e276ef3c8b0f1a3c Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 21 Feb 2014 19:58:45 +0000 Subject: [PATCH] In case source files are compiled with -g, tell clang not to emit .cfi directives, since on sparc64 we must still GNU as, which does not support those directives. Note there are several programs and libraries in our tree, which are always compiled with -g, even if DEBUG_FLAGS is not set by the user! --- share/mk/bsd.sys.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 5ba2d5162bb9..adee6cff7347 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -120,6 +120,10 @@ CLANG_NO_IAS= -no-integrated-as CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ -mllvm -enable-load-pre=false -mllvm -simplifycfg-dup-ret CFLAGS+= -Qunused-arguments +.if ${MACHINE_CPUARCH} == "sparc64" +# Don't emit .cfi directives, since we must use GNU as on sparc64, for now. +CFLAGS+= -fno-dwarf2-cfi-asm +.endif # SPARC64 CFLAGS+= ${CFLAGS.clang} CXXFLAGS+= ${CXXFLAGS.clang} .else # !CLANG