diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/ia64/scripts/toolchain-flags |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/ia64/scripts/toolchain-flags')
-rwxr-xr-x | arch/ia64/scripts/toolchain-flags | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/arch/ia64/scripts/toolchain-flags b/arch/ia64/scripts/toolchain-flags new file mode 100755 index 000000000000..3f0c2adacb70 --- /dev/null +++ b/arch/ia64/scripts/toolchain-flags | |||
@@ -0,0 +1,53 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Check whether linker can handle cross-segment @segrel(): | ||
4 | # | ||
5 | CPPFLAGS="" | ||
6 | CC=$1 | ||
7 | OBJDUMP=$2 | ||
8 | READELF=$3 | ||
9 | dir=$(dirname $0) | ||
10 | tmp=${TMPDIR:-/tmp} | ||
11 | out=$tmp/out$$ | ||
12 | |||
13 | # Check whether cross-segment segment-relative relocs work fine. We need | ||
14 | # that for building the gate DSO: | ||
15 | |||
16 | $CC -nostdlib -static -Wl,-T$dir/check-segrel.lds $dir/check-segrel.S -o $out | ||
17 | res=$($OBJDUMP --full --section .rodata $out | fgrep 000 | cut -f3 -d' ') | ||
18 | rm -f $out | ||
19 | if [ $res != 00000a00 ]; then | ||
20 | CPPFLAGS="$CPPFLAGS -DHAVE_BUGGY_SEGREL" | ||
21 | cat >&2 <<EOF | ||
22 | warning: your linker cannot handle cross-segment segment-relative relocations. | ||
23 | please upgrade to a newer version (it is safe to use this linker, but | ||
24 | the kernel will be bigger than strictly necessary). | ||
25 | EOF | ||
26 | fi | ||
27 | |||
28 | # Check whether .align inside a function works as expected. | ||
29 | |||
30 | $CC -c $dir/check-text-align.S -o $out | ||
31 | $READELF -u $out | fgrep -q 'prologue(rlen=12)' | ||
32 | res=$? | ||
33 | rm -f $out | ||
34 | if [ $res -eq 0 ]; then | ||
35 | CPPFLAGS="$CPPFLAGS -DHAVE_WORKING_TEXT_ALIGN" | ||
36 | fi | ||
37 | |||
38 | if ! $CC -c $dir/check-model.c -o $out 2>&1 | grep __model__ | grep -q attrib | ||
39 | then | ||
40 | CPPFLAGS="$CPPFLAGS -DHAVE_MODEL_SMALL_ATTRIBUTE" | ||
41 | fi | ||
42 | rm -f $out | ||
43 | |||
44 | # Check whether assembler supports .serialize.{data,instruction} directive. | ||
45 | |||
46 | $CC -c $dir/check-serialize.S -o $out 2>/dev/null | ||
47 | res=$? | ||
48 | rm -f $out | ||
49 | if [ $res -eq 0 ]; then | ||
50 | CPPFLAGS="$CPPFLAGS -DHAVE_SERIALIZE_DIRECTIVE" | ||
51 | fi | ||
52 | |||
53 | echo $CPPFLAGS | ||