Add latest ia64 patches.
[linux-flexiantxendom0-3.2.10.git] / arch / ia64 / scripts / toolchain-flags
1 #!/bin/sh
2 #
3 # Check whether linker can handle cross-segment @segrel():
4 #
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
20 fi