summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2017-09-18 18:04:57 (GMT)
committerSam Thursfield <sam.thursfield@codethink.co.uk>2017-10-25 13:41:36 (GMT)
commitb4dd89a93fcbbc113011d8f83e6f92ad875c65f5 (patch)
tree7d58354c3f63dc70d4e69fb880786b0192093b3e
parent4426563e2600f11891fba1efce6ff16b49986403 (diff)
downloaddefinitions-b4dd89a93fcbbc113011d8f83e6f92ad875c65f5.tar.gz
gnu-toolchain: Set correct sysconfdir for stage2-glibc
We install the ld.so config to /etc/ld.so.conf in the stage2-glibc element, but the ldconfig tool would look for /tools/etc/ld.so.conf. This caused no problems for a long time, I suppose because we always built on top of sysroots that had an existing /etc/ld.so.cache file. But if `ldconfig` hadn't already been run in the sysroot, builds depending on stage2-glibc would fail as various things would no longer be able to find libz.so due the ldconfig command failing to find its config file.
-rw-r--r--elements/gnu-toolchain/stage2-glibc.bst15
1 files changed, 9 insertions, 6 deletions
diff --git a/elements/gnu-toolchain/stage2-glibc.bst b/elements/gnu-toolchain/stage2-glibc.bst
index 1871a4e..46396ec 100644
--- a/elements/gnu-toolchain/stage2-glibc.bst
+++ b/elements/gnu-toolchain/stage2-glibc.bst
@@ -26,9 +26,11 @@ config:
# Configure flag notes:
# 1. Avoid installing to PREFIX/lib64 on x86_64.
- # 2. Location of linux-api-headers.
- # 3. Normal flags. See glibc.morph.
- # 4. Force configuration values of certain things that can't be detected
+ # 2. We install ld.so.conf to /etc, not /tools/etc, and we need to ensure
+ # ldconfig looks for it in the right place.
+ # 3. Location of linux-api-headers.
+ # 4. Normal flags. See glibc.morph.
+ # 5. Force configuration values of certain things that can't be detected
# in a cross-compile.
- |
case "%{bst-target-arch}" in
@@ -42,9 +44,10 @@ config:
--build=$(../scripts/config.guess) --host=%{target-stage1} \
--prefix="%{prefix}" \
`# [1]` --libdir="%{prefix}/lib" \
- `# [2]` --with-headers="%{prefix}/include" \
- `# [3]` --disable-profile --enable-kernel=2.6.25 \
- `# [4]` libc_cv_c_cleanup=yes libc_cv_ctors_header=yes \
+ `# [2]` --sysconfdir="/etc" \
+ `# [3]` --with-headers="%{prefix}/include" \
+ `# [4]` --disable-profile --enable-kernel=2.6.25 \
+ `# [5]` libc_cv_c_cleanup=yes libc_cv_ctors_header=yes \
libc_cv_forced_unwind=yes libc_cv_ssp=no
build-commands: