package/llvm: set the path to llvm-config
PATCH 1/1 package/llvm: set the path to llvm-config
While building llvm for the target (x86_64), the build failded due to path poisoning (-I/usr/include/libxml2) while building NATIVE tools (i.e for the host). The llvm package try to build a tool for the host with the cross-compiler which doesn't work when the paranoid toolchain wrapper (BR2_COMPILER_PARANOID_UNSAFE_PATH) is enabled.
We know that llvm (target) needs llvm-tablegen and llvm-config build by host-llvm, but only LLVM_TABLEGEN is provided by llvm.mk. Adding LLVM_CONFIG_PATH=$(HOST_DIR)/bin/llvm-config for llvm (target) fixes the path poisoining issue since llvm doesn't build the NATIVE variant.
---
Valentin, I'm not sure why we don't set LLVM_CONFIG_PATH in llvm.mk for the target variant? We provide it for clang and libclc, why not for llvm ?
--- package/llvm/llvm.mk | 3 +++ 1 file changed, 3 insertions(+)
package/llvm/llvm.mk +3 -0
@@ -57,6 +57,9 @@ endif # Use native llvm-tblgen from host-llvm (needed for cross-compilation) LLVM_CONF_OPTS += -DLLVM_TABLEGEN=$(HOST_DIR)/bin/llvm-tblgen +# Use native llvm-config from host-llvm (needed for cross-compilation) +LLVM_CONF_OPTS += -DLLVM_CONFIG_PATH=$(HOST_DIR)/bin/llvm-config + # BUILD_SHARED_LIBS has a misleading name. It is in fact an option for # LLVM developers to build all LLVM libraries as separate shared libraries. # For normal use of LLVM, it is recommended to build a single
Signature · 1 line
2.20.1
PATCH 1/1 package/llvm: set the path to llvm-config
Romain,
Quoted 13 lines · Romain Naour
While building llvm for the target (
x86_64), the build failded due to path poisoning (-I/usr/include/libxml2) while building NATIVE tools (i.e for the host). The llvm package try to build a tool for the host with the cross-compiler which doesn't work when the paranoid toolchain wrapper (BR2_COMPILER_PARANOID_UNSAFE_PATH) is enabled.We know that llvm (target) needs llvm-tablegen and llvm-config build by host-llvm, but only
LLVM_TABLEGENis provided by llvm.mk. Adding LLVM_CONFIG_PATH=$(HOST_DIR)/bin/llvm-config for llvm (target) fixes the path poisoining issue since llvm doesn't build the NATIVE variant.
Quoted 3 lines
Signed-off-by Romain Naour <[email protected]>Cc Valentin Korenblit <[email protected]>Cc Matthew Weber <[email protected]>
Quoted 4 lines
---
Valentin, I'm not sure why we don't setLLVM_CONFIG_PATHin llvm.mk for the target variant? We provide it for clang and libclc, why not for llvm ?
I'm not sure.
package/llvm/llvm.mk endif · line 60
Quoted 13 lines
--- package/llvm/llvm.mk | 3 +++ 1 file changed, 3 insertions(+)package/llvm/llvm.mk +1
-0@@ -57,6 +57,9 @@ endif # Use native llvm-tblgen from host-llvm (needed for cross-compilation) LLVM_CONF_OPTS += -DLLVM_TABLEGEN=$(HOST_DIR)/bin/llvm-tblgen +# Use native llvm-config from host-llvm (needed for cross-compilation)
The goal is not to use this as a compiler for applications but for building of the compiler-rt tools which have advanced fuzzing and address sanitizing debug/analysis features.
Quoted 8 lines
package/llvm/llvm.mk +2
-1+LLVM_CONF_OPTS += -DLLVM_CONFIG_PATH=$(HOST_DIR)/bin/llvm-config + # BUILD_SHARED_LIBS has a misleading name. It is in fact an option for # LLVM developers to build all LLVM libraries as separate shared libraries. # For normal use of LLVM, it is recommended to build a single --2.20.1
PATCH 1/1 package/llvm: set the path to llvm-config
In reply to Romain NaourQuoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Romain" == Romain Naour <[email protected]> writes:
While building llvm for the target (
x86_64), the build failded due to path poisoning (-I/usr/include/libxml2) while building NATIVE tools (i.e for the host). The llvm package try to build a tool for the host with the cross-compiler which doesn't work when the paranoid toolchain wrapper (BR2_COMPILER_PARANOID_UNSAFE_PATH) is enabled.We know that llvm (target) needs llvm-tablegen and llvm-config build by host-llvm, but only
LLVM_TABLEGENis provided by llvm.mk. Adding LLVM_CONFIG_PATH=$(HOST_DIR)/bin/llvm-config for llvm (target) fixes the path poisoining issue since llvm doesn't build the NATIVE variant.
Quoted 3 lines
Signed-off-by Romain Naour <[email protected]>Cc Valentin Korenblit <[email protected]>Cc Matthew Weber <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 package/llvm: set the path to llvm-config
In reply to Romain NaourRomain,
Quoted 12 lines
While building llvm for the target (
x86_64), the build failded due to path poisoning (-I/usr/include/libxml2) while building NATIVE tools (i.e for the host). The llvm package try to build a tool for the host with the cross-compiler which doesn't work when the paranoid toolchain wrapper (BR2_COMPILER_PARANOID_UNSAFE_PATH) is enabled.We know that llvm (target) needs llvm-tablegen and llvm-config build by host-llvm, but only
LLVM_TABLEGENis provided by llvm.mk. Adding LLVM_CONFIG_PATH=$(HOST_DIR)/bin/llvm-config for llvm (target) fixes the path poisoining issue since llvm doesn't build the NATIVE variant.
Quoted 7 lines
Signed-off-by Romain Naour <[email protected]>Cc Valentin Korenblit <[email protected]>Cc Matthew Weber <[email protected]>---
Valentin, I'm not sure why we don't setLLVM_CONFIG_PATHin llvm.mk for the target variant? We provide it for clang and libclc, why not for llvm ?
It was not set because the only necessary tool to build target llvm was llvm-tblgen.
Valentin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190117/59eab66c/attachment.html>
PATCH 1/1 package/llvm: set the path to llvm-config
In reply to Romain NaourQuoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Romain" == Romain Naour <[email protected]> writes:
While building llvm for the target (
x86_64), the build failded due to path poisoning (-I/usr/include/libxml2) while building NATIVE tools (i.e for the host). The llvm package try to build a tool for the host with the cross-compiler which doesn't work when the paranoid toolchain wrapper (BR2_COMPILER_PARANOID_UNSAFE_PATH) is enabled.We know that llvm (target) needs llvm-tablegen and llvm-config build by host-llvm, but only
LLVM_TABLEGENis provided by llvm.mk. Adding LLVM_CONFIG_PATH=$(HOST_DIR)/bin/llvm-config for llvm (target) fixes the path poisoining issue since llvm doesn't build the NATIVE variant.
Quoted 7 lines
Signed-off-by Romain Naour <[email protected]>Cc Valentin Korenblit <[email protected]>Cc Matthew Weber <[email protected]>---
Valentin, I'm not sure why we don't setLLVM_CONFIG_PATHin llvm.mk for the target variant? We provide it for clang and libclc, why not for llvm ?
Committed to 2018.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard