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