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
This commit is contained in:
Nathan Whitehorn 2017-11-25 21:44:23 +00:00
parent 2c50bafef5
commit 5d85170026
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326202

View File

@ -172,11 +172,17 @@ 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
#
# For MIPS we also tell gcc to use floating point emulation