Skip to content

Commit 5a68636

Browse files
author
Jason Mobarak
authored
Add BR2_SYSROOT_BASE (#10)
* Set HOST_DIR when BR2_TOOLCHAIN_PATH is non-empty * Add BR2_SYSROOT_BASE for llvm
1 parent 474b6c1 commit 5a68636

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

bin/arm-linux-gnueabihf-clang

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@ else
2424
T=${BR2_TOOLCHAIN_PATH}
2525
fi
2626

27+
if [[ -z "${BR2_SYSROOT_BASE:-}" ]]; then
28+
BR2_SYSROOT_BASE=${T}
29+
fi
30+
2731
toolchain_prefix="arm-buildroot-linux-gnueabihf"
2832
toolchain_version="6.4.0"
2933

3034
TOOLCHAIN_OPTS="\
31-
--sysroot=${T}/${toolchain_prefix}/sysroot \
35+
--sysroot=${BR2_SYSROOT_BASE}/${toolchain_prefix}/sysroot \
3236
-L ${T}/${toolchain_prefix}/lib \
3337
-L ${HOST_DIR}/${toolchain_prefix}/sysroot/lib \
3438
-L ${HOST_DIR}/${toolchain_prefix}/sysroot/usr/lib \

bin/arm-linux-gnueabihf-clang++

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,17 @@ else
2424
T=${BR2_TOOLCHAIN_PATH}
2525
fi
2626

27+
if [[ -z "${BR2_SYSROOT_BASE:-}" ]]; then
28+
BR2_SYSROOT_BASE=${T}
29+
fi
30+
2731
export LD_LIBRARY_PATH="${T}/lib:$LD_LIBRARY_PATH"
2832

2933
toolchain_prefix="arm-buildroot-linux-gnueabihf"
3034
toolchain_version="6.4.0"
3135

3236
TOOLCHAIN_OPTS="\
33-
--sysroot=${T}/${toolchain_prefix}/sysroot \
37+
--sysroot=${BR2_SYSROOT_BASE}/${toolchain_prefix}/sysroot \
3438
-I ${T}/${toolchain_prefix}/include/c++/${toolchain_version}/ \
3539
-I ${T}/${toolchain_prefix}/include/c++/${toolchain_version}/${toolchain_prefix} \
3640
-L ${T}/${toolchain_prefix}/lib \

0 commit comments

Comments
 (0)