diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2016-05-01 19:49:32 -0400 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2016-05-17 09:51:14 +0200 |
commit | 9c4064223be75ee9d8cf318110e15ce290ccae1b (patch) | |
tree | a3d4d56afc0d13b829644c2ec7442574863a3113 | |
parent | 73f1cc8d8b0787eb68b2e3c9df6eb82ccd5ecdaa (diff) |
llvm: Set LLVM_HOST_TRIPLE when building for i386 or arm
When configuring llvm it will detect the host arch as the build
arch even when the host arch is a 64bit arch and the whole sysroot
you are building in is 32bit (i.e. when building i686 binaries
on x86_64 or when building armv7a binaries on an aarch64 host).
This patch forces the generated llvm to use the 32bit target
arch as it's default - in turn this causes clang to successfully
compile in the target 32bit sysroot.
https://bugs.freedesktop.org/show_bug.cgi?id=95442
-rw-r--r-- | org.freedesktop.Sdk.json.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/org.freedesktop.Sdk.json.in b/org.freedesktop.Sdk.json.in index f51e376..197dd91 100644 --- a/org.freedesktop.Sdk.json.in +++ b/org.freedesktop.Sdk.json.in @@ -1004,6 +1004,20 @@ "cxxflags": "-O2 -g1" }, "cleanup-platform": ["/bin/llvm-*"], + "build-options" : { + "arch" : { + "i386" : { + "config-opts" : [ + "-DLLVM_HOST_TRIPLE:STRING=i586-unknown-linux-gnu" + ] + }, + "arm" : { + "config-opts" : [ + "-DLLVM_HOST_TRIPLE:STRING=arm-unknown-linux-gnueabihf" + ] + } + } + }, "config-opts": [ "-DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG", "-DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG", |