diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-06-06 22:08:10 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-09-07 09:42:39 +0200 |
commit | 0cfaf3a959cf45406423279f285da7c9453478ca (patch) | |
tree | 03228f4dbe3ddce2138017c8a315565e3d282d39 /scripts/lib | |
parent | d5ee00c09b826bbafe9bec2227d5aca7bf3a24bd (diff) | |
download | ptxdist-0cfaf3a959cf45406423279f285da7c9453478ca.tar.gz ptxdist-0cfaf3a959cf45406423279f285da7c9453478ca.tar.xz |
wrapper: add support for clang with OSELAS.Toolchain
This is a bit complex:
Clang does not have default CPU features that can be specified at
build-time. Instead the some features are derived from the compiler name
(e.g. via a symlink with target triple). Others must be specified on the
command-line (e.g. -mfpu=...).
The toolchain provides wrapper scripts with the target triple to do this.
However, using those is incompatible with icecc, because this only works if
the actuall binary is called.
So we let the toolchain provide the extra options and call clang directly.
And fall back to just the target triple if necessary.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/ptxd_make_00-init.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_00-init.sh b/scripts/lib/ptxd_make_00-init.sh index ca10831ad..4f13e104c 100644 --- a/scripts/lib/ptxd_make_00-init.sh +++ b/scripts/lib/ptxd_make_00-init.sh @@ -211,7 +211,7 @@ ptxd_init_cross_env() { # add "-L<DIR>/lib -Wl,-rpath-link -Wl,<DIR>" local -a ldflags ldflags=( "${prefix[@]/%//${lib_dir}}" ) - ldflags=( "${ldflags[@]/#/-B}" "${ldflags[@]/#/-Wl,-rpath-link -Wl,}" ) + ldflags=( "${ldflags[@]/#/-B}" "${ldflags[@]/#/-L}" "${ldflags[@]/#/-Wl,-rpath-link -Wl,}" ) export \ PTXDIST_CROSS_CPPFLAGS="${cppflags[*]}" \ @@ -302,7 +302,9 @@ ptxd_init_save_wrapper_env() { PTXDIST_HOST_CPPFLAGS="${PTXDIST_HOST_CPPFLAGS}" PTXDIST_HOST_LDFLAGS="${PTXDIST_HOST_LDFLAGS}" PTXDIST_PLATFORMDIR="${PTXDIST_PLATFORMDIR}" + PTXDIST_SYSROOT_TOOLCHAIN="${PTXDIST_SYSROOT_TOOLCHAIN}" PTXDIST_ICECC_REMOTE_CPP="${PTXDIST_ICECC_REMOTE_CPP}" + PTXDIST_ICECC_CLANG="${PTXDIST_ICECC_CLANG}" EOF } |