Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Nov 2017 21:44:23 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326202 - head/sys/conf
Message-ID:  <201711252144.vAPLiNAI051613@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
 
 #



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