From c859a75e85888964fad1fa2d4443c09ff6bdb1b6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 7 Nov 2012 22:15:28 +0000 Subject: [PATCH] For kernel builds with PROFLEVEL >= 1, such as LINT, don't attempt to use the -falign-functions option if the compiler is clang, as the flag is not supported. MFC after: 1 week --- sys/conf/kern.pre.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 7e6e20a08e0..cfcaa3b950f 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -102,7 +102,10 @@ CLANG_NO_IAS= -no-integrated-as .endif .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 -CFLAGS+= -DGPROF -falign-functions=16 +CFLAGS+= -DGPROF +.if ${COMPILER_TYPE} != "clang" +CFLAGS+= -falign-functions=16 +.endif .if ${PROFLEVEL} >= 2 CFLAGS+= -DGPROF4 -DGUPROF PROF= -pg -mprofiler-epilogue