[04d819]: tools-for-build / sparc-funcdef.sh Maximize Restore History

Download this file

sparc-funcdef.sh    26 lines (21 with data), 610 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
cd ./tools-for-build
TMP=sparc-funcdef.S
SUN_FUNCDEF="#define FUNCDEF(x) .type x, #function"
GNU_FUNCDEF="#define FUNCDEF(x) .type x,@function"
echo $SUN_FUNCDEF > $TMP
# cribbed from ldso_stubs, just "some code"
echo "
.globl ldso_stub__printf ;
FUNCDEF(ldso_stub__printf) ;
ldso_stub__printf: ;
sethi %hi(printf),%g1 ;
jmpl %g1+%lo(printf),%g0 ;
nop /* delay slot*/ ;
.Lprintfe1: ;
.size ldso_stub__printf,.Lprintfe1-ldso_stub__printf ;" >> $TMP
if $GNUMAKE sparc-funcdef.o > /dev/null 2>&1 ; then
echo $SUN_FUNCDEF
else
echo $GNU_FUNCDEF
fi
rm -f $TMP