package/clang: default linker to GNU
PATCH 1/1 package/clang: default linker to GNU
By default clang is assuming the system linker /usr/bin/ld. This patchset updates the default to point at the cross toolchain ld.
Previously clang had been used on target only, this update is required for host clang/clang++ to be used as a frontend for cross-compiling.
--- package/clang/clang.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
package/clang/clang.mk +2 -1
@@ -42,7 +42,8 @@ CLANG_CONF_OPTS += -DCLANG_BUILD_TOOLS=ON HOST_CLANG_CONF_OPTS += \ -DCLANG_BUILD_EXAMPLES=OFF \ -DCLANG_INCLUDE_DOCS=OFF \ - -DCLANG_INCLUDE_TESTS=OFF + -DCLANG_INCLUDE_TESTS=OFF \ + -DCLANG_DEFAULT_LINKER=$(TARGET_LD) CLANG_CONF_OPTS += \ -DCLANG_BUILD_EXAMPLES=OFF \
Signature · 1 line
1.9.1
PATCH 1/1 package/clang: default linker to GNU
Hi Matt,
Adding Valentin in Cc.
Le 21/10/2018 ? 11:09, Matt Weber a ?crit?:
Quoted 6 lines
By default clang is assuming the system linker
/usr/bin/ld. This patchset updates the default to point at the cross toolchain ld.Previously clang had been used on target only, this update is required for host clang/clang++ to be used as a frontend for cross-compiling.
As we discuss during the meeting, we should probably wrap clang and clang++ in order to pass the path to the sysroot like we do in the toolchain wrapper for gcc (and other options when needed).
Quoted 11 lines
Signed-off-by Matthew Weber <[email protected]>--- package/clang/clang.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)package/clang/clang.mk +0
-0
package/clang/clang.mk CLANG_CONF_OPTS += -DCLANG_BUILD_TOOLS=ON · line 46
Quoted 6 lines
package/clang/clang.mk +2
-1@@ -42,7 +42,8 @@ CLANG_CONF_OPTS += -DCLANG_BUILD_TOOLS=ON HOST_CLANG_CONF_OPTS += \ -DCLANG_BUILD_EXAMPLES=OFF \ -DCLANG_INCLUDE_DOCS=OFF \ - -DCLANG_INCLUDE_TESTS=OFF + -DCLANG_INCLUDE_TESTS=OFF \ + -DCLANG_DEFAULT_LINKER=$(TARGET_LD)
I would put it with this line:HOST_CLANG_CONF_OPTS += -DLLVM_CONFIG:FILEPATH=$(HOST_DIR)/bin/llvm-config
Otherwise:
Best regards,
Romain
Quoted 4 lines
package/clang/clang.mk +0
-0CLANG_CONF_OPTS += \ -DCLANG_BUILD_EXAMPLES=OFF \
PATCH 1/1 package/clang: default linker to GNU
Romain, Valentin,
Quoted 9 lines · Romain Naour
Hi Matt,
Adding Valentin in Cc.
Le 21/10/2018 ? 11:09, Matt Weber a ?crit :
Quoted 3 lines
By default clang is assuming the system linker
/usr/bin/ld. This patchset updates the default to point at the cross toolchain ld.
Quoted 7 lines
Quoted 3 lines
Previously clang had been used on target only, this update is required for host clang/clang++ to be used as a frontend for cross-compiling.
As we discuss during the meeting, we should probably wrap clang and clang++ in order to pass the path to the sysroot like we do in the toolchain wrapper for gcc (and other options when needed).
Since there isn't a package yet that has the need for this wrapper, would it be something that we could add to toolchain/helpers.mk? For this patch, maybe I just updated the commit message with and example of how you'd call clang w/o the wrapper?
Quoted 7 lines
Quoted 7 lines
Signed-off-by Matthew Weber <[email protected]>--- package/clang/clang.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 15 lines
package/clang/clang.mk CLANG_CONF_OPTS += -DCLANG_BUILD_TOOLS=ON · line 46
Quoted 11 lines
package/clang/clang.mk +2
-1@@ -42,7 +42,8 @@ CLANG_CONF_OPTS += -DCLANG_BUILD_TOOLS=ON HOST_CLANG_CONF_OPTS += \ -DCLANG_BUILD_EXAMPLES=OFF \ -DCLANG_INCLUDE_DOCS=OFF \ - -DCLANG_INCLUDE_TESTS=OFF + -DCLANG_INCLUDE_TESTS=OFF \ + -DCLANG_DEFAULT_LINKER=$(TARGET_LD)I would put it with this line:
HOST_CLANG_CONF_OPTS+= -DLLVM_CONFIG:FILEPATH=$(HOST_DIR)/bin/llvm-config
Sounds good.
Quoted 11 lines
Otherwise:
Reviewed-by Romain Naour <[email protected]>Best regards,
RomainQuoted 4 lines
package/clang/clang.mk +0
-0CLANG_CONF_OPTS += \ -DCLANG_BUILD_EXAMPLES=OFF \
Signature · 8 lines
Matthew L Weber / Pr Software Engineer Airborne Information Systems / RC Linux Secure Platforms MS 131-100, C Ave NE, Cedar Rapids, IA, 52498, USA www.rockwellcollins.com Note: Any Export License Required Information and License Restricted Third Party Intellectual Property (TPIP) content must be encrypted and sent to matthew.weber at corp.rockwellcollins.com.
PATCH 1/1 package/clang: default linker to GNU
Le 21/10/2018 ? 13:53, Matthew Weber a ?crit?:
Quoted 16 lines
Romain, Valentin,
Quoted 13 lines · Romain Naour
Hi Matt,
Adding Valentin in Cc.
Le 21/10/2018 ? 11:09, Matt Weber a ?crit :
Quoted 6 lines
By default clang is assuming the system linker
/usr/bin/ld. This patchset updates the default to point at the cross toolchain ld.Previously clang had been used on target only, this update is required for host clang/clang++ to be used as a frontend for cross-compiling.
Quoted 8 lines
Quoted 3 lines
As we discuss during the meeting, we should probably wrap clang and clang++ in order to pass the path to the sysroot like we do in the toolchain wrapper for gcc (and other options when needed).
Since there isn't a package yet that has the need for this wrapper, would it be something that we could add to
toolchain/helpers.mk? For this patch, maybe I just updated the commit message with and example of how you'd call clang w/o the wrapper?
Ok, It's fine for me.
Best regards,
Romain
Quoted 39 lines
Quoted 8 lines
Quoted 8 lines
Signed-off-by Matthew Weber <[email protected]>--- package/clang/clang.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)Quoted 15 lines
package/clang/clang.mk CLANG_CONF_OPTS += -DCLANG_BUILD_TOOLS=ON · line 46
Quoted 11 lines
package/clang/clang.mk +2
-1@@ -42,7 +42,8 @@ CLANG_CONF_OPTS += -DCLANG_BUILD_TOOLS=ON HOST_CLANG_CONF_OPTS += \ -DCLANG_BUILD_EXAMPLES=OFF \ -DCLANG_INCLUDE_DOCS=OFF \ - -DCLANG_INCLUDE_TESTS=OFF + -DCLANG_INCLUDE_TESTS=OFF \ + -DCLANG_DEFAULT_LINKER=$(TARGET_LD)I would put it with this line:
HOST_CLANG_CONF_OPTS+= -DLLVM_CONFIG:FILEPATH=$(HOST_DIR)/bin/llvm-configSounds good.
Quoted 11 lines
Otherwise:
Reviewed-by Romain Naour <[email protected]>Best regards,
RomainQuoted 4 lines
package/clang/clang.mk +0
-0CLANG_CONF_OPTS += \ -DCLANG_BUILD_EXAMPLES=OFF \