Merge with Linux 2.5.73.
[linux-2.6/linux-mips.git] / arch / ia64 / scripts / toolchain-flags
blob7e21e177351bded1176146d52f62c25ee7a352c4
1 #!/bin/sh
3 # Check whether linker can handle cross-segment @segrel():
5 CC=$1
6 LD=$2
7 OBJDUMP=$3
8 dir=$(dirname $0)
9 tmp=${TMPDIR:-/tmp}
10 out=$tmp/out$$
11 $CC -c $dir/check-segrel.S -o $out.o
12 $LD -static -T$dir/check-segrel.lds $out.o -o $out
13 res=$($OBJDUMP --full --section .rodata $out | fgrep 000 | cut -f3 -d' ')
14 rm -f $out $out.o
15 if [ $res != 00000a00 ]; then
16 echo " -DHAVE_BUGGY_SEGREL"
17 cat >&2 <<EOF
18 warning: your linker cannot handle cross-segment segment-relative relocations.
19 please upgrade to a newer version (it is safe to use this linker, but
20 the kernel will be bigger than strictly necessary).
21 EOF