File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,8 @@ RUN git clone ${crystal_repo} \
60
60
\
61
61
&& make crystal stats=true static=true ${release:+release=true} \
62
62
CRYSTAL_CONFIG_TARGET=${gnu_target} \
63
- && ([ "$(ldd .build/crystal 2>&1 | wc -l)" -eq "1" ] || { echo './build/crystal is not statically linked' ; ldd .build/crystal; exit 1; })
63
+ && ( (readelf --program-headers .build/crystal | grep -q "Elf file type is EXEC" ) || { echo 'crystal is not statically linked' ; exit 1; }) \
64
+ && .build/crystal --version
64
65
65
66
# Build shards
66
67
ARG shards_version
@@ -71,7 +72,9 @@ RUN git clone https://github.com/crystal-lang/shards \
71
72
&& make SHARDS=false CRYSTAL=/crystal/bin/crystal \
72
73
FLAGS="--stats --target ${musl_target} --static ${release:+--release}" \
73
74
\
74
- && ([ "$(ldd bin/shards 2>&1 | wc -l)" -eq "1" ] || { echo 'shards is not statically linked' ; ldd bin/shards; exit 1; })
75
+ && bin/shards --version \
76
+ && ( (readelf --program-headers bin/shards | grep -q "Elf file type is EXEC" ) || { echo 'shards is not statically linked' ; exit 1; }) \
77
+ && readelf --program-headers bin/shards
75
78
76
79
COPY --from=bdwgc /bdwgc/.libs/libgc.a /libgc-debian.a
77
80
You can’t perform that action at this time.
0 commit comments