mirror of
https://github.com/rui314/mold.git
synced 2024-09-22 10:27:48 +03:00
de7ba9014f
The configure script in Gentoo's dev-libs/jansson-2.13.1-r1 package treats mold 0.1.1 as GNU ld 0.1.1, which is from 1980s if existed. Adding "GNU gold" to the help message solves the nasty issue, as the configure script considers any version of GNU gold supports modern features.
27 lines
635 B
Bash
Executable File
27 lines
635 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
cd $(dirname $0)
|
|
echo -n "Testing $(basename -s .sh $0) ... "
|
|
t=$(pwd)/tmp/$(basename -s .sh $0)
|
|
mkdir -p $t
|
|
|
|
../mold -v | grep -Pq 'mold .*\; compatible with GNU ld and GNU gold\)'
|
|
../mold --version | grep -Pq 'mold .*\; compatible with GNU ld and GNU gold\)'
|
|
|
|
../mold -V | grep -Pq 'mold .*\; compatible with GNU ld and GNU gold\)'
|
|
../mold -V | grep -q elf_x86_64
|
|
../mold -V | grep -q elf_i386
|
|
|
|
cat <<EOF | clang -c -xc -o $t/a.o -
|
|
#include <stdio.h>
|
|
|
|
int main() {
|
|
printf("Hello world\n");
|
|
}
|
|
EOF
|
|
|
|
clang -fuse-ld=`pwd`/../mold -Wl,--version -o $t/exe $t/a.o | grep -q mold
|
|
$t/exe | grep -q 'Hello world'
|
|
|
|
echo OK
|