Skip to content

Commit

Permalink
Add BR2_SYSROOT_BASE (#10)
Browse files Browse the repository at this point in the history
* Set HOST_DIR when BR2_TOOLCHAIN_PATH is non-empty

* Add BR2_SYSROOT_BASE for llvm
  • Loading branch information
Jason Mobarak authored May 13, 2018
1 parent 474b6c1 commit 5a68636
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion bin/arm-linux-gnueabihf-clang
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ else
T=${BR2_TOOLCHAIN_PATH}
fi

if [[ -z "${BR2_SYSROOT_BASE:-}" ]]; then
BR2_SYSROOT_BASE=${T}
fi

toolchain_prefix="arm-buildroot-linux-gnueabihf"
toolchain_version="6.4.0"

TOOLCHAIN_OPTS="\
--sysroot=${T}/${toolchain_prefix}/sysroot \
--sysroot=${BR2_SYSROOT_BASE}/${toolchain_prefix}/sysroot \
-L ${T}/${toolchain_prefix}/lib \
-L ${HOST_DIR}/${toolchain_prefix}/sysroot/lib \
-L ${HOST_DIR}/${toolchain_prefix}/sysroot/usr/lib \
Expand Down
6 changes: 5 additions & 1 deletion bin/arm-linux-gnueabihf-clang++
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ else
T=${BR2_TOOLCHAIN_PATH}
fi

if [[ -z "${BR2_SYSROOT_BASE:-}" ]]; then
BR2_SYSROOT_BASE=${T}
fi

export LD_LIBRARY_PATH="${T}/lib:$LD_LIBRARY_PATH"

toolchain_prefix="arm-buildroot-linux-gnueabihf"
toolchain_version="6.4.0"

TOOLCHAIN_OPTS="\
--sysroot=${T}/${toolchain_prefix}/sysroot \
--sysroot=${BR2_SYSROOT_BASE}/${toolchain_prefix}/sysroot \
-I ${T}/${toolchain_prefix}/include/c++/${toolchain_version}/ \
-I ${T}/${toolchain_prefix}/include/c++/${toolchain_version}/${toolchain_prefix} \
-L ${T}/${toolchain_prefix}/lib \
Expand Down

0 comments on commit 5a68636

Please sign in to comment.