public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] BaseTools/tools_def ARM: use softfloat target for CLANG3x
@ 2018-12-19 14:50 Ard Biesheuvel
  2018-12-20  6:51 ` Gao, Liming
  0 siblings, 1 reply; 3+ messages in thread
From: Ard Biesheuvel @ 2018-12-19 14:50 UTC (permalink / raw)
  To: edk2-devel; +Cc: leif.lindholm, liming.gao, bob.c.feng, Ard Biesheuvel

The target triplet we use for CLANG35 and CLANG38 specifies a
hardfloat target, and so the binaries that are emitted are
annotated as using VFP registers for passing floating point
arguments, even though no VFP is used anywhere in the code.

This works fine as long as we don't try to link against code
that uses software floating point, since combining object files
with different floating point calling conventions is not permitted.

So switch to the softfloat arm-linux-gnueabi triplet instead.
Unfortunately, this requires all CLANG3x/ARM users to install
another cross toolchain.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 BaseTools/Conf/tools_def.template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 2ba833e1fb06..f82bc72327d8 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -5231,7 +5231,7 @@ RELEASE_GCC5_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
 *_CLANG35_*_DLINK_PATH           = ENV(CLANG35_BIN)clang
 *_CLANG35_*_ASLDLINK_PATH        = ENV(CLANG35_BIN)clang
 
-DEFINE CLANG35_ARM_TARGET        = -target arm-linux-gnueabihf
+DEFINE CLANG35_ARM_TARGET        = -target arm-linux-gnueabi
 DEFINE CLANG35_AARCH64_TARGET    = -target aarch64-linux-gnu
 
 DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unknown-warning-option
@@ -5384,7 +5384,7 @@ NOOPT_CLANG38_X64_DLINK2_FLAGS     = DEF(GCC5_X64_DLINK2_FLAGS) -O0
 ##################
 # CLANG38 ARM definitions
 ##################
-DEFINE CLANG38_ARM_TARGET        = -target arm-linux-gnueabihf
+DEFINE CLANG38_ARM_TARGET        = -target arm-linux-gnueabi
 DEFINE CLANG38_ARM_CC_FLAGS      = DEF(GCC_ARM_CC_FLAGS) DEF(CLANG38_ARM_TARGET) DEF(CLANG38_WARNING_OVERRIDES) -mno-movt
 DEFINE CLANG38_ARM_DLINK_FLAGS   = DEF(CLANG38_ARM_TARGET) DEF(GCC_ARM_DLINK_FLAGS)
 
-- 
2.19.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-20  8:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-19 14:50 [PATCH] BaseTools/tools_def ARM: use softfloat target for CLANG3x Ard Biesheuvel
2018-12-20  6:51 ` Gao, Liming
2018-12-20  8:14   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox