Skip to content

Commit acfae4d

Browse files
author
Jason Mobarak
authored
Layer on top of LD_LIBRARY_PATH for NixOS (#8)
1 parent 32ba7c1 commit acfae4d

File tree

5 files changed

+30
-11
lines changed

5 files changed

+30
-11
lines changed

bin/arm-linux-gnueabihf-clang

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Copyright (C) 2017 Swift Navigation Inc.
3+
# Copyright (C) 2017-2018 Swift Navigation Inc.
44
# Contact: Swift Navigation <dev@swiftnav.com>
55
#
66
# This source is subject to the license found in the file 'LICENSE' which must
@@ -13,7 +13,7 @@
1313
if [[ "${LLVM_OBF_USE_BR_TOOLCHAIN}" ]]; then
1414

1515
T=${HOST_DIR}/opt/ext-toolchain
16-
export LD_LIBRARY_PATH="${T}/lib/gcc/arm-linux-gnueabihf/6.2.1"
16+
export LD_LIBRARY_PATH="${T}/lib/gcc/arm-linux-gnueabihf/6.2.1:$LD_LIBRARY_PATH"
1717

1818
TOOLCHAIN_OPTS="\
1919
--sysroot=${T}/arm-linux-gnueabihf/libc \
@@ -31,11 +31,11 @@ else
3131
D=$( (cd `dirname $0`/../.. >/dev/null; pwd -P) )
3232
R=$D/sysroot
3333

34-
export LD_LIBRARY_PATH="${R}/usr/lib/x86_64-linux-gnu:${R}/usr/x86_64-linux-gnu/arm-linux-gnueabihf/lib:${R}/usr/arm-linux-gnueabihf/lib"
34+
export LD_LIBRARY_PATH="${R}/usr/lib/x86_64-linux-gnu:${R}/usr/x86_64-linux-gnu/arm-linux-gnueabihf/lib:${R}/usr/arm-linux-gnueabihf/lib:$LD_LIBRARY_PATH"
3535

3636
TOOLCHAIN_OPTS="\
3737
\
38-
-fuse-ld=${R}/usr/arm-linux-gnueabihf/bin/ld \
38+
-fuse-ld=${D}/wrappers/bin/arm-linux-gnueabihf-ld \
3939
--sysroot=${R} \
4040
\
4141
-B ${R}/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8 \

bin/arm-linux-gnueabihf-clang++

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Copyright (C) 2017 Swift Navigation Inc.
3+
# Copyright (C) 2017-2018 Swift Navigation Inc.
44
# Contact: Swift Navigation <dev@swiftnav.com>
55
#
66
# This source is subject to the license found in the file 'LICENSE' which must
@@ -34,11 +34,11 @@ else
3434
D=$( (cd `dirname $0`/../.. >/dev/null; pwd -P) )
3535
R=$D/sysroot
3636

37-
export LD_LIBRARY_PATH="${R}/usr/lib/x86_64-linux-gnu:${R}/usr/x86_64-linux-gnu/arm-linux-gnueabihf/lib:${R}/usr/arm-linux-gnueabihf/lib"
37+
export LD_LIBRARY_PATH="${R}/usr/lib/x86_64-linux-gnu:${R}/usr/x86_64-linux-gnu/arm-linux-gnueabihf/lib:${R}/usr/arm-linux-gnueabihf/lib:$LD_LIBRARY_PATH"
3838

3939
TOOLCHAIN_OPTS="\
4040
\
41-
-fuse-ld=${R}/usr/arm-linux-gnueabihf/bin/ld \
41+
-fuse-ld=${D}/wrappers/bin/arm-linux-gnueabihf-ld \
4242
--sysroot=${R} \
4343
\
4444
-B ${R}/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8 \

bin/arm-linux-gnueabihf-ld

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (C) 2017-2018 Swift Navigation Inc.
4+
# Contact: Swift Navigation <dev@swiftnav.com>
5+
#
6+
# This source is subject to the license found in the file 'LICENSE' which must
7+
# be be distributed together with this source. All other rights reserved.
8+
#
9+
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10+
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
11+
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12+
13+
D=$( (cd `dirname $0`/../.. >/dev/null; pwd -P) )
14+
R=$D/sysroot
15+
16+
export LD_LIBRARY_PATH="${R}/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
17+
18+
exec ${R}/usr/bin/arm-linux-gnueabihf-ld $@
19+

bin/arm-linux-gnueabihf-objcopy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Copyright (C) 2017 Swift Navigation Inc.
3+
# Copyright (C) 2017-2018 Swift Navigation Inc.
44
# Contact: Swift Navigation <dev@swiftnav.com>
55
#
66
# This source is subject to the license found in the file 'LICENSE' which must
@@ -13,7 +13,7 @@
1313
D=$( (cd `dirname $0`/../.. >/dev/null; pwd -P) )
1414
R=$D/sysroot
1515

16-
export LD_LIBRARY_PATH="${R}/usr/lib/x86_64-linux-gnu"
16+
export LD_LIBRARY_PATH="${R}/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
1717

1818
exec ${R}/usr/bin/arm-linux-gnueabihf-objcopy $@
1919

bin/arm-linux-gnueabihf-strip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Copyright (C) 2017 Swift Navigation Inc.
3+
# Copyright (C) 2017-2018 Swift Navigation Inc.
44
# Contact: Swift Navigation <dev@swiftnav.com>
55
#
66
# This source is subject to the license found in the file 'LICENSE' which must
@@ -13,6 +13,6 @@
1313
D=$( (cd `dirname $0`/../.. >/dev/null; pwd -P) )
1414
R=$D/sysroot
1515

16-
export LD_LIBRARY_PATH="${R}/usr/lib/x86_64-linux-gnu:${R}/usr/x86_64-linux-gnu/arm-linux-gnueabihf/lib"
16+
export LD_LIBRARY_PATH="${R}/usr/lib/x86_64-linux-gnu:${R}/usr/x86_64-linux-gnu/arm-linux-gnueabihf/lib:$LD_LIBRARY_PATH"
1717

1818
exec ${R}/usr/bin/arm-linux-gnueabihf-strip $@

0 commit comments

Comments
 (0)