summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDavid Mosberger <davidm@tiger.hpl.hp.com>2004-02-12 06:29:35 -0800
committerDavid Mosberger <davidm@tiger.hpl.hp.com>2004-02-12 06:29:35 -0800
commit8a4e1b971a578111da868535b8a296c312ef87de (patch)
treeab3fc572ac9e6f7435c8b25ff5e64b585d1efdd0 /arch
parentc71752bb1656cbe3e89cf759fb74c180a4935036 (diff)
ia64: Update toolchain-flags with a check for working .align inside a
now that there is a fixed GAS.
Diffstat (limited to 'arch')
-rwxr-xr-xarch/ia64/scripts/toolchain-flags15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/ia64/scripts/toolchain-flags b/arch/ia64/scripts/toolchain-flags
index a9b64a538c5f..7fd868bf1ded 100755
--- a/arch/ia64/scripts/toolchain-flags
+++ b/arch/ia64/scripts/toolchain-flags
@@ -5,9 +5,14 @@
CPPFLAGS=""
CC=$1
OBJDUMP=$2
+READELF=$3
dir=$(dirname $0)
tmp=${TMPDIR:-/tmp}
out=$tmp/out$$
+
+# Check whether cross-segment segment-relative relocs work fine. We need
+# that for building the gate DSO:
+
$CC -nostdlib -static -Wl,-T$dir/check-segrel.lds $dir/check-segrel.S -o $out
res=$($OBJDUMP --full --section .rodata $out | fgrep 000 | cut -f3 -d' ')
rm -f $out
@@ -20,6 +25,16 @@ warning: your linker cannot handle cross-segment segment-relative relocations.
EOF
fi
+# Check whether .align inside a function works as expected.
+
+$CC -c $dir/check-text-align.S -o $out
+$READELF -u $out | fgrep -q 'prologue(rlen=12)'
+res=$?
+rm -f $out
+if [ $res -eq 0 ]; then
+ CPPFLAGS="$CPPFLAGS -DHAVE_WORKING_TEXT_ALIGN"
+fi
+
if ! $CC -c $dir/check-model.c -o $out 2>&1 | grep __model__ | grep -q attrib
then
CPPFLAGS="$CPPFLAGS -DHAVE_MODEL_SMALL_ATTRIBUTE"