Use the downloaded clang when building for armhf-debian
This makes it work on a barebones Stretch installation.
Also add building for this CPU to the CI script so we know it keeps
working, which means marking everything that's supposed to work
appropriately.
Change-Id: Ic050ce20eae45c6b23e0e42dddb24db3ebc70b84
diff --git a/tools/BUILD b/tools/BUILD
index bab0b6e..3f3d4b2 100644
--- a/tools/BUILD
+++ b/tools/BUILD
@@ -1,51 +1,71 @@
-package(default_visibility = ['//visibility:public'])
+package(default_visibility = ["//visibility:public"])
-exports_files(['test_sharding_compliant'])
+exports_files(["test_sharding_compliant"])
# Don't use these directly! Use //tools/build_rules/*.bzl instead.
config_setting(
- name = 'compiler_clang',
- values = {'compiler': 'clang'}
+ name = "compiler_clang",
+ values = {"compiler": "clang"},
)
+
config_setting(
- name = 'compiler_gcc',
- values = {'compiler': 'gcc'}
+ name = "compiler_gcc",
+ values = {"compiler": "gcc"},
)
+
config_setting(
- name = 'cpu_k8',
- values = {'cpu': 'k8'},
+ name = "cpu_k8",
+ values = {"cpu": "k8"},
)
+
config_setting(
- name = 'cpu_roborio',
- values = {'cpu': 'roborio'},
+ name = "cpu_roborio",
+ values = {"cpu": "roborio"},
)
+
config_setting(
- name = 'cpu_cortex_m4f',
- values = {'cpu': 'cortex-m4f'},
+ name = "cpu_cortex_m4f",
+ values = {"cpu": "cortex-m4f"},
)
+
config_setting(
- name = 'cpu_armhf',
- values = {'cpu': 'armhf-debian'},
+ name = "cpu_armhf",
+ values = {"cpu": "armhf-debian"},
)
+
config_setting(
- name = 'has_asan',
- values = {'define': 'have_asan=true'},
+ name = "has_asan",
+ values = {"define": "have_asan=true"},
)
+
config_setting(
- name = 'has_tsan',
- values = {'define': 'have_tsan=true'},
+ name = "has_tsan",
+ values = {"define": "have_tsan=true"},
)
+
config_setting(
- name = 'has_ubsan',
- values = {'define': 'have_ubsan=true'},
+ name = "has_ubsan",
+ values = {"define": "have_ubsan=true"},
)
environment(name = "k8")
+
environment(name = "armhf-debian")
+
environment(name = "roborio")
+
environment(name = "cortex-m4f")
+
environment_group(
name = "cpus",
- environments = [":k8", ":roborio", ":armhf-debian", ":cortex-m4f"],
- defaults = [":k8", ":roborio", ":armhf-debian"],
+ defaults = [
+ ":k8",
+ ":roborio",
+ ],
+ environments = [
+ ":k8",
+ ":roborio",
+ ":armhf-debian",
+ ":cortex-m4f",
+ ],
)
diff --git a/tools/build_rules/protobuf.bzl b/tools/build_rules/protobuf.bzl
index 11753c2..9c92158 100644
--- a/tools/build_rules/protobuf.bzl
+++ b/tools/build_rules/protobuf.bzl
@@ -38,28 +38,30 @@
}
_do_proto_cc_library = rule(
- implementation = _do_proto_cc_library_impl,
- attrs = {
- 'src': attr.label(
- allow_files = FileType(['.proto']),
- mandatory = True,
- single_file = True,
- ),
- 'deps': attr.label_list(providers = ["proto"]),
- '_protoc': attr.label(
- default = Label('//third_party/protobuf:protoc'),
- executable = True,
- cfg = 'host',
- ),
- '_well_known_protos': attr.label(
- default = Label('//third_party/protobuf:well_known_protos'),
- ),
- },
- outputs = _do_proto_cc_library_outputs,
- output_to_genfiles = True,
+ attrs = {
+ "src": attr.label(
+ allow_files = FileType([".proto"]),
+ mandatory = True,
+ single_file = True,
+ ),
+ "deps": attr.label_list(providers = ["proto"]),
+ "_protoc": attr.label(
+ default = Label("//third_party/protobuf:protoc"),
+ executable = True,
+ cfg = "host",
+ ),
+ "_well_known_protos": attr.label(
+ default = Label("//third_party/protobuf:well_known_protos"),
+ ),
+ },
+ output_to_genfiles = True,
+ outputs = _do_proto_cc_library_outputs,
+ implementation = _do_proto_cc_library_impl,
)
-def proto_cc_library(name, src, deps = [], visibility = None):
+def proto_cc_library(name, src, deps = [],
+ compatible_with = None, restricted_to = None,
+ visibility = None):
'''Generates a cc_library from a single .proto file. Does not support
dependencies on any .proto files except the well-known ones protobuf comes
with (which are unconditionally depended on).
@@ -73,6 +75,8 @@
src = src,
deps = [('%s__proto_srcs' % o_name) for o_name in deps],
visibility = visibility,
+ compatible_with = compatible_with,
+ restricted_to = restricted_to,
)
basename = src[:-len('.proto')]
native.cc_library(
@@ -81,4 +85,6 @@
hdrs = [ '%s.pb.h' % basename ],
deps = [ '//third_party/protobuf' ] + deps,
visibility = visibility,
+ compatible_with = compatible_with,
+ restricted_to = restricted_to,
)
diff --git a/tools/build_rules/select.bzl b/tools/build_rules/select.bzl
index 994e775..2d0bce5 100644
--- a/tools/build_rules/select.bzl
+++ b/tools/build_rules/select.bzl
@@ -3,10 +3,15 @@
# quickly find issues where something new isn't handled.
# It will also make adding ORs when it makes sense easy to do nicely.
-all_cpus = ['amd64', 'roborio', 'armhf']
-'''All of the CPUs we know about.'''
+all_cpus = [
+ "amd64",
+ "roborio",
+ "armhf",
+]
-'''A select wrapper for CPU architectures.
+"""All of the CPUs we know about."""
+
+"""A select wrapper for CPU architectures.
Args:
values: A mapping from architecture names (as strings) to other things.
@@ -14,7 +19,8 @@
'else' is also allowed as a default.
'arm' is allowed instead of roborio and armhf.
Returns a select which evaluates to the correct element of values.
-'''
+"""
+
def cpu_select(values):
if 'arm' in values:
new_values = {}
@@ -39,12 +45,13 @@
'//tools:cpu_armhf': values['armhf'],
})
-'''A select wrapper for address space sizes.
+"""A select wrapper for address space sizes.
Args:
values: A mapping from address space sizes (as strings) to other things.
Returns a select which evaluates to the correct element of values.
-'''
+"""
+
def address_size_select(values):
if '32' not in values:
fail('Need to handle 32 bit addresses!', 'values')
@@ -53,15 +60,17 @@
return select({
'//tools:cpu_k8': values['64'],
'//tools:cpu_roborio': values['32'],
+ '//tools:cpu_armhf': values['32'],
})
-'''A select wrapper for compilers.
+"""A select wrapper for compilers.
Args:
values: A mapping from compiler names (as strings) to other things.
Currently 'gcc' and 'clang' are recognized.
Returns a select which evaluates to the correct element of values.
-'''
+"""
+
def compiler_select(values):
if 'gcc' not in values:
fail('Need to handle gcc!', 'values')
diff --git a/tools/ci/run-tests.sh b/tools/ci/run-tests.sh
index 5e31caa..bcb4c2a 100755
--- a/tools/ci/run-tests.sh
+++ b/tools/ci/run-tests.sh
@@ -2,6 +2,7 @@
set -e
set -x
-bazel --batch test -c opt --curses=no --color=no //...
-bazel --batch build -c opt --curses=no --color=no //... --cpu=roborio
-bazel --batch build -c opt --curses=no --color=no //motors/... --cpu=cortex-m4f
+bazel test -c opt --curses=no --color=no //...
+bazel build -c opt --curses=no --color=no //... --cpu=roborio
+bazel build -c opt --curses=no --color=no //motors/... --cpu=cortex-m4f
+bazel build --curses=no --color=no //... --cpu=armhf-debian
diff --git a/tools/cpp/BUILD b/tools/cpp/BUILD
index e5cdcc7..afa296d 100644
--- a/tools/cpp/BUILD
+++ b/tools/cpp/BUILD
@@ -158,6 +158,7 @@
filegroup(
name = "linaro-gcc-files",
srcs = [
+ ":clang_3p6_all_files",
"//tools/cpp/linaro_linux_gcc:clang-symlinks",
"//tools/cpp/linaro_linux_gcc:tool-wrappers",
"@linaro_linux_gcc_4_9_repo//:compiler_pieces",
@@ -167,6 +168,7 @@
filegroup(
name = "linaro_linux_linker_files",
srcs = [
+ ":clang_3p6_linker_files",
"//tools/cpp/linaro_linux_gcc:ar",
"//tools/cpp/linaro_linux_gcc:clang",
"//tools/cpp/linaro_linux_gcc:clang-ld",
@@ -180,10 +182,20 @@
filegroup(
name = "linaro_linux_compiler_files",
srcs = [
+ ":clang_3p6_compiler_files",
"//tools/cpp/linaro_linux_gcc:as",
"//tools/cpp/linaro_linux_gcc:clang",
"//tools/cpp/linaro_linux_gcc:gcc",
"//tools/cpp/linaro_linux_gcc:ld",
+ "@linaro_linux_gcc_4_9_repo//:compiler_pieces",
+ ],
+)
+
+filegroup(
+ name = "linaro_linux_strip_files",
+ srcs = [
+ "//tools/cpp/linaro_linux_gcc:strip",
+ "@linaro_linux_gcc_4_9_repo//:compiler_pieces",
],
)
@@ -197,7 +209,7 @@
linker_files = ":linaro_linux_linker_files",
objcopy_files = "//tools/cpp/linaro_linux_gcc:objcopy",
static_runtime_libs = [":empty"],
- strip_files = "//tools/cpp/linaro_linux_gcc:strip",
+ strip_files = ":linaro_linux_strip_files",
supports_param_files = 1,
)
diff --git a/tools/cpp/linaro_linux_gcc/BUILD b/tools/cpp/linaro_linux_gcc/BUILD
index 2c79142..4800436 100644
--- a/tools/cpp/linaro_linux_gcc/BUILD
+++ b/tools/cpp/linaro_linux_gcc/BUILD
@@ -1,113 +1,113 @@
-package(default_visibility = ['//tools/cpp:__pkg__'])
+package(default_visibility = ["//tools/cpp:__pkg__"])
cc_library(
- name = 'libpthread',
- visibility = ['//visibility:public'],
- srcs = [
- 'clang_more_libs/libpthread.so',
- ],
+ name = "libpthread",
+ srcs = [
+ "clang_more_libs/libpthread.so",
+ ],
+ visibility = ["//visibility:public"],
)
filegroup(
- name = 'gcc',
- srcs = [
- '@linaro_linux_gcc_4_9_repo//:gcc',
- 'arm-linux-gnueabihf-gcc',
- ],
+ name = "gcc",
+ srcs = [
+ "arm-linux-gnueabihf-gcc",
+ "@linaro_linux_gcc_4_9_repo//:gcc",
+ ],
)
filegroup(
- name = 'ar',
- srcs = [
- '@linaro_linux_gcc_4_9_repo//:ar',
- 'arm-linux-gnueabihf-ar',
- ],
+ name = "ar",
+ srcs = [
+ "arm-linux-gnueabihf-ar",
+ "@linaro_linux_gcc_4_9_repo//:ar",
+ ],
)
filegroup(
- name = 'ld',
- srcs = [
- '@linaro_linux_gcc_4_9_repo//:ld',
- 'arm-linux-gnueabihf-ld',
- ],
+ name = "ld",
+ srcs = [
+ "arm-linux-gnueabihf-ld",
+ "@linaro_linux_gcc_4_9_repo//:ld",
+ ],
)
filegroup(
- name = 'nm',
- srcs = [
- '@linaro_linux_gcc_4_9_repo//:nm',
- 'arm-linux-gnueabihf-nm',
- ],
+ name = "nm",
+ srcs = [
+ "arm-linux-gnueabihf-nm",
+ "@linaro_linux_gcc_4_9_repo//:nm",
+ ],
)
filegroup(
- name = 'objcopy',
- srcs = [
- '@linaro_linux_gcc_4_9_repo//:objcopy',
- 'arm-linux-gnueabihf-objcopy',
- ],
+ name = "objcopy",
+ srcs = [
+ "arm-linux-gnueabihf-objcopy",
+ "@linaro_linux_gcc_4_9_repo//:objcopy",
+ ],
)
filegroup(
- name = 'objdump',
- srcs = [
- '@linaro_linux_gcc_4_9_repo//:objdump',
- 'arm-linux-gnueabihf-objdump',
- ],
+ name = "objdump",
+ srcs = [
+ "arm-linux-gnueabihf-objdump",
+ "@linaro_linux_gcc_4_9_repo//:objdump",
+ ],
)
filegroup(
- name = 'strip',
- srcs = [
- '@linaro_linux_gcc_4_9_repo//:strip',
- 'arm-linux-gnueabihf-strip',
- ],
+ name = "strip",
+ srcs = [
+ "arm-linux-gnueabihf-strip",
+ "@linaro_linux_gcc_4_9_repo//:strip",
+ ],
)
filegroup(
- name = 'as',
- srcs = [
- '@linaro_linux_gcc_4_9_repo//:as',
- 'arm-linux-gnueabihf-as',
- ],
+ name = "as",
+ srcs = [
+ "arm-linux-gnueabihf-as",
+ "@linaro_linux_gcc_4_9_repo//:as",
+ ],
)
filegroup(
- name = 'clang',
- srcs = [
- 'clang_bin/clang',
- ],
+ name = "clang",
+ srcs = [
+ "clang_bin/clang",
+ ],
)
filegroup(
- name = 'clang-ld',
- srcs = [
- 'clang_bin/ld',
- ':ld',
- ],
+ name = "clang-ld",
+ srcs = [
+ "clang_bin/ld",
+ ":ld",
+ ],
)
filegroup(
- name = 'tool-wrappers',
- srcs = [
- ':gcc',
- ':ar',
- ':ld',
- ':nm',
- ':objcopy',
- ':objdump',
- ':strip',
- ':as',
- 'clang_bin/as',
- ':clang',
- ':clang-ld',
- ],
+ name = "tool-wrappers",
+ srcs = [
+ "clang_bin/as",
+ ":ar",
+ ":as",
+ ":clang",
+ ":clang-ld",
+ ":gcc",
+ ":ld",
+ ":nm",
+ ":objcopy",
+ ":objdump",
+ ":strip",
+ ],
)
filegroup(
- name = 'clang-symlinks',
- srcs = glob([
- 'clang_more_libs/**',
- 'clang_syroot/**',
- ]),
+ name = "clang-symlinks",
+ srcs = glob([
+ "clang_more_libs/**",
+ "clang_syroot/**",
+ ]),
)
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-ar b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-ar
index 5615844..abdb214 100755
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-ar
+++ b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-ar
@@ -1,5 +1,9 @@
#!/bin/bash --norc
+LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
+LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
+export LD_LIBRARY_PATH
+
exec -a arm-linux-gnueabihf-ar \
${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_4_9_repo/bin/arm-linux-gnueabihf-ar \
"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-as b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-as
index 7a67c77..6a749b4 100755
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-as
+++ b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-as
@@ -1,5 +1,9 @@
#!/bin/bash --norc
+LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
+LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
+export LD_LIBRARY_PATH
+
exec -a arm-linux-gnueabihf-as \
${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_4_9_repo/bin/arm-linux-gnueabihf-as \
"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-cpp b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-cpp
index 46d8d42..7d97f51 100755
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-cpp
+++ b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-cpp
@@ -1,5 +1,9 @@
#!/bin/bash --norc
+LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
+LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
+export LD_LIBRARY_PATH
+
exec -a arm-linux-gnueabihf-cpp \
${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_4_9_repo/bin/arm-linux-gnueabihf-cpp \
"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-gcc b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-gcc
index c70d6b3..71dd060 100755
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-gcc
+++ b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-gcc
@@ -1,5 +1,9 @@
#!/bin/bash --norc
+LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
+LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
+export LD_LIBRARY_PATH
+
PATH="${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_4_9_repo/libexec/gcc/arm-linux-gnueabihf/4.9.3:$PATH" \
exec \
${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_4_9_repo/bin/arm-linux-gnueabihf-gcc \
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-gcov b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-gcov
index 4525f95..5e179c4 100755
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-gcov
+++ b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-gcov
@@ -1,5 +1,9 @@
#!/bin/bash --norc
+LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
+LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
+export LD_LIBRARY_PATH
+
exec -a arm-linux-gnueabihf-gcov \
${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_4_9_repo/bin/arm-linux-gnueabihf-gcov \
"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-ld b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-ld
index 566df55..b4b9fb2 100755
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-ld
+++ b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-ld
@@ -1,5 +1,9 @@
#!/bin/bash --norc
+LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
+LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
+export LD_LIBRARY_PATH
+
exec -a arm-linux-gnueabihf-ld \
${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_4_9_repo/bin/arm-linux-gnueabihf-ld \
"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-nm b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-nm
index 7dde30a..514dc67 100755
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-nm
+++ b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-nm
@@ -1,5 +1,9 @@
#!/bin/bash --norc
+LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
+LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
+export LD_LIBRARY_PATH
+
exec -a arm-linux-gnueabihf-nm \
${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_4_9_repo/bin/arm-linux-gnueabihf-nm \
"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-objcopy b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-objcopy
index 97d912f..d435e92 100755
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-objcopy
+++ b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-objcopy
@@ -1,5 +1,9 @@
#!/bin/bash --norc
+LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
+LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
+export LD_LIBRARY_PATH
+
exec -a arm-linux-gnueabihf-objcopy \
${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_4_9_repo/bin/arm-linux-gnueabihf-objcopy \
"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-objdump b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-objdump
index 561dc89..260d9c0 100755
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-objdump
+++ b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-objdump
@@ -1,5 +1,9 @@
#!/bin/bash --norc
+LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
+LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
+export LD_LIBRARY_PATH
+
exec -a arm-linux-gnueabihf-objdump \
${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_4_9_repo/bin/arm-linux-gnueabihf-objdump \
"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-strip b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-strip
index 45024d3..2942227 100755
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-strip
+++ b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-strip
@@ -1,5 +1,9 @@
#!/bin/bash --norc
+LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
+LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
+export LD_LIBRARY_PATH
+
exec -a arm-linux-gnueabihf-strip \
${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_4_9_repo/bin/arm-linux-gnueabihf-strip \
"$@"
diff --git a/tools/cpp/linaro_linux_gcc/clang_bin/clang b/tools/cpp/linaro_linux_gcc/clang_bin/clang
index 2ed616a..99f6067 100755
--- a/tools/cpp/linaro_linux_gcc/clang_bin/clang
+++ b/tools/cpp/linaro_linux_gcc/clang_bin/clang
@@ -1,4 +1,4 @@
#!/bin/bash --norc
exec -a "$0" \
- "/usr/bin/clang-3.6" "$@"
+ "tools/cpp/clang_3p6/x86_64-linux-gnu-clang-3.6" "$@"