-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
llvm: fix target triple #30554
llvm: fix target triple #30554
Conversation
broken by their move to cmake causing a switch away from the standard --host/--build autoconf fix #28046
If this is a sufficiently critical fix, it could go into 1.1.0 instead of 1.1.1. |
No, it’s not a new regression, although it’s certainly good to have it fixed soon |
broken by their move to cmake causing a switch away from the standard --host/--build autoconf fix #28046
broken by their move to cmake causing a switch away from the standard --host/--build autoconf fix #28046
broken by their move to cmake causing a switch away from the standard --host/--build autoconf fix #28046
broken by their move to cmake causing a switch away from the standard --host/--build autoconf fix #28046
broken by their move to cmake causing a switch away from the standard --host/--build autoconf fix #28046
@@ -66,7 +66,7 @@ LLVM_CXXFLAGS += $(CXXFLAGS) | |||
LLVM_CPPFLAGS += $(CPPFLAGS) | |||
LLVM_LDFLAGS += $(LDFLAGS) | |||
LLVM_CMAKE += -DLLVM_TARGETS_TO_BUILD:STRING="$(LLVM_TARGETS)" -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="$(LLVM_EXPERIMENTAL_TARGETS)" -DCMAKE_BUILD_TYPE="$(LLVM_CMAKE_BUILDTYPE)" | |||
LLVM_CMAKE += -DLLVM_ENABLE_ZLIB=OFF -DLLVM_ENABLE_LIBXML2=OFF | |||
LLVM_CMAKE += -DLLVM_ENABLE_ZLIB=OFF -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_HOST_TRIPLE="$(or $(XC_HOST),$(BUILD_MACHINE))" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This creates problems on Fedora armv7hl. Indeed, there BUILD_MACHINE=armv7hl-redhat-linux-gnueabi
by default since that's what gcc -dumpmachine
returns. Before this PR, LLVM used armv7l-unknown-linux-gnueabihf
by default instead (as computed by deps/srccache/llvm-6.0.1/cmake/config.guess
).
I don't really understand why Fedora arm uses gnueabi
instead of gnueabihf
, since it uses hard float (which is specified e.g. in CFLAGS
via -mfloat-abi=hard
), but it seems to be a conscious choice. I couldn't find official GCC/LLVM docs about what these mean. What I can see at least is that LLVM's config.guess script branches on __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null | grep -q __ARM_PCS_VFP
to decide whether to return gnueabi
or gnueabihf
. I guess we should do the same to make this more reliable? EDIT: or just avoid passing -DLLVM_HOST_TRIPLE
when XC_HOST
is unset.
broken by their move to cmake causing a switch away from the standard --host/--build autoconf fix #28046
fix #28046