svn commit: r326202 - head/sys/conf

Nathan Whitehorn nwhitehorn at FreeBSD.org
Sat Nov 25 21:44:24 UTC 2017


Author: nwhitehorn
Date: Sat Nov 25 21:44:23 2017
New Revision: 326202
URL: https://svnweb.freebsd.org/changeset/base/326202

Log:
  Automatically use the ELFv2 ABI on powerpc64 if supported by the compiler.
  This has the same effects on DDB working as -mcall=aixdesc, but also is
  supported by clang and marginally improves kernel performance.
  
  MFC after:	2 weeks

Modified:
  head/sys/conf/kern.mk

Modified: head/sys/conf/kern.mk
==============================================================================
--- head/sys/conf/kern.mk	Sat Nov 25 21:29:07 2017	(r326201)
+++ head/sys/conf/kern.mk	Sat Nov 25 21:44:23 2017	(r326202)
@@ -172,10 +172,16 @@ CFLAGS.gcc+=	-mno-spe
 .endif
 
 #
-# Use dot symbols on powerpc64 to make ddb happy
+# Use dot symbols (or, better, the V2 ELF ABI) on powerpc64 to make
+# DDB happy. ELFv2, if available, has some other efficiency benefits.
 #
 .if ${MACHINE_ARCH} == "powerpc64"
+.if ${COMPILER_VERSION} >= 40900
+CFLAGS.gcc+=	-mabi=elfv2
+.else
 CFLAGS.gcc+=	-mcall-aixdesc
+.endif
+CFLAGS.clang+=	-mabi=elfv2
 .endif
 
 #


More information about the svn-src-head mailing list