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