Skip to content

Commit b81ec64

Browse files
committed
build: in the ccache case, after test -e also accept -L
for compiler frontends, they might be absolute links to /etc/alternatives and then the test might just not work in the chroot case (problem of the BUILD_ROOT prefix)
1 parent 08dab29 commit b81ec64

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ ccache_setup() {
594594
if mkdir -p $BUILD_ROOT/var/lib/build/ccache/bin; then
595595
for i in $(ls $BUILD_ROOT/usr/bin | grep -E '^(cc|gcc|[cg][+][+]|clang|clang[+][+])([-]?[.0-9])*$'); do
596596
rm -f $BUILD_ROOT/var/lib/build/ccache/bin/$i
597-
test -e $BUILD_ROOT/usr/bin/$i || continue
597+
test -e $BUILD_ROOT/usr/bin/$i -o -L $BUILD_ROOT/usr/bin/$i || continue
598598
echo '#! /bin/sh' > $BUILD_ROOT/var/lib/build/ccache/bin/$i
599599
echo "test -e /usr/bin/$i || exit 1" >> $BUILD_ROOT/var/lib/build/ccache/bin/$i
600600
echo 'export PATH=/usr/lib/icecc/bin:/opt/icecream/bin:/usr/bin:$PATH' >> $BUILD_ROOT/var/lib/build/ccache/bin/$i

0 commit comments

Comments
 (0)