summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_setup_env.sh12
l---------build-tools/sysroot1
-rw-r--r--hermetic/Dockerfile2
3 files changed, 13 insertions, 2 deletions
diff --git a/_setup_env.sh b/_setup_env.sh
index 2a613123..b1a0f665 100644
--- a/_setup_env.sh
+++ b/_setup_env.sh
@@ -108,6 +108,18 @@ if [ -n "${HERMETIC_TOOLCHAIN}" ]; then
# (e.g. debug info)
export KCPPFLAGS="-ffile-prefix-map=${ROOT_DIR}/="
+ # set the common sysroot
+ sysroot_flags+="--sysroot=${ROOT_DIR}/build/build-tools/sysroot "
+
+ # add openssl (via boringssl) and other prebuilts into the lookup path
+ cflags+="-I${ROOT_DIR}/prebuilts/kernel-build-tools/linux-x86/include "
+
+ # add openssl and further prebuilt libraries into the lookup path
+ ldflags+="-Wl,-rpath,${ROOT_DIR}/prebuilts/kernel-build-tools/linux-x86/lib64 "
+ ldflags+="-L ${ROOT_DIR}/prebuilts/kernel-build-tools/linux-x86/lib64 "
+
+ export HOSTCFLAGS="$sysroot_flags $cflags"
+ export HOSTLDFLAGS="$sysroot_flags $ldflags"
fi
for PREBUILT_BIN in "${PREBUILTS_PATHS[@]}"; do
diff --git a/build-tools/sysroot b/build-tools/sysroot
new file mode 120000
index 00000000..d0298f10
--- /dev/null
+++ b/build-tools/sysroot
@@ -0,0 +1 @@
+../../prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot \ No newline at end of file
diff --git a/hermetic/Dockerfile b/hermetic/Dockerfile
index 502e6b61..70aa2f21 100644
--- a/hermetic/Dockerfile
+++ b/hermetic/Dockerfile
@@ -5,8 +5,6 @@ RUN apt-get -y update \
# Those are likely essential
git \
# To be removed
- libc6-dev \
- libssl-dev \
rsync \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*