mirror of
https://github.com/rui314/mold.git
synced 2024-10-04 16:48:04 +03:00
[ELF] Do not print out an error of ldd --version
Some `ldd` impls don't support the --version option. We do not want to show the error message but instead just skip the test entirely. https://github.com/rui314/mold/pull/385
This commit is contained in:
parent
37f6ef2081
commit
98edd441ce
@ -18,7 +18,7 @@ echo 'int main() {}' | $CC -o $t/exe -xc -
|
||||
ldd $t/exe | grep -q ld-musl && { echo OK; exit; }
|
||||
|
||||
# -static-pie works only with a newer version of glibc
|
||||
ldd --version | grep -Pq 'Copyright \(C\) 202[2-9]' || { echo skipped; exit; }
|
||||
ldd --version 2>&1 | grep -Pq 'Copyright \(C\) 202[2-9]' || { echo skipped; exit; }
|
||||
|
||||
cat <<EOF | $CC -o $t/a.o -c -xc - -fPIE
|
||||
#include <stdio.h>
|
||||
|
@ -18,7 +18,7 @@ echo 'int main() {}' | $CC -o $t/exe -xc -
|
||||
ldd $t/exe | grep -q ld-musl && { echo OK; exit; }
|
||||
|
||||
# -static-pie works only with a newer version of glibc
|
||||
ldd --version | grep -Pq 'Copyright \(C\) 202[2-9]' || { echo skipped; exit; }
|
||||
ldd --version 2>&1 | grep -Pq 'Copyright \(C\) 202[2-9]' || { echo skipped; exit; }
|
||||
|
||||
cat <<EOF | $CC -o $t/a.o -c -xc - -fPIC
|
||||
#include <stdio.h>
|
||||
|
Loading…
Reference in New Issue
Block a user