mirror of
https://github.com/rui314/mold.git
synced 2024-10-26 21:20:46 +03:00
23 lines
453 B
Bash
Executable File
23 lines
453 B
Bash
Executable File
#!/bin/bash
|
|
. $(dirname $0)/common.inc
|
|
|
|
set -x
|
|
|
|
cat <<EOF | $CC -o $t/a.o -c -xc -
|
|
void foo() {}
|
|
EOF
|
|
|
|
# Set `e_flags` to zero to simulate ABI incompatibility
|
|
dd if=/dev/zero of=$t/a.o bs=4 oflag=seek_bytes seek=48 count=1 conv=notrunc
|
|
|
|
cat <<EOF | $CC -o $t/b.o -c -xc -
|
|
void foo();
|
|
int main() {
|
|
foo();
|
|
return 0;
|
|
}
|
|
EOF
|
|
|
|
! $CC -B. -o $t/exe $t/a.o $t/b.o 2> $t/log || false
|
|
grep -q 'cannot link object files with different floating-point ABI' $t/log
|