1.1 --- a/patches/gcc/3.3/sh-pic-set_fpscr.patch Tue Aug 14 19:32:22 2007 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,60 +0,0 @@
1.4 -Should fix
1.5 -make[2]: *** [/gcc-3.3-glibc-2.3.2/build-glibc/elf/check-textrel.out] Error 1
1.6 -in glibc's "make tests".
1.7 -
1.8 --------------
1.9 -
1.10 -Message-Id: <200307300255.h6U2tB906928@r-rr.iij4u.or.jp>
1.11 -To: dank@kegel.com
1.12 -Cc: linux-sh@m17n.org
1.13 -Subject: Re: Writing PIC version of __udivsi3_i4? (was: Re: "make tests" fails
1.14 - with "libc.so: text relocations used" in glibc-2.3.2 for sh4)
1.15 -In-Reply-To: Your message of "Wed, 30 Jul 2003 11:20:49 +0900"
1.16 - <200307300212.h6U2CH901209@r-rr.iij4u.or.jp>
1.17 -References: <200307300212.h6U2CH901209@r-rr.iij4u.or.jp>
1.18 -Date: Wed, 30 Jul 2003 12:03:01 +0900
1.19 -From: kaz Kojima <kkojima@rr.iij4u.or.jp>
1.20 -
1.21 -> I'll try to write the PIC version of it,
1.22 -
1.23 -Dan, does the attached patch work for you?
1.24 -
1.25 -[dank: original patch deleted; here's same thing rediffed against gcc-3.3 instead of HEAD]
1.26 -
1.27 ---- gcc-3.3/gcc/config/sh/lib1funcs.asm.old Tue Jul 29 21:37:29 2003
1.28 -+++ gcc-3.3/gcc/config/sh/lib1funcs.asm Tue Jul 29 21:40:58 2003
1.29 -@@ -1792,7 +1792,17 @@
1.30 - .global GLOBAL(set_fpscr)
1.31 - GLOBAL(set_fpscr):
1.32 - lds r4,fpscr
1.33 -+#ifdef __PIC__
1.34 -+ mov.l r12,@-r15
1.35 -+ mova LOCAL(set_fpscr_L0),r0
1.36 -+ mov.l LOCAL(set_fpscr_L0),r12
1.37 -+ add r0,r12
1.38 -+ mov.l LOCAL(set_fpscr_L1),r0
1.39 -+ mov.l @(r0,r12),r1
1.40 -+ mov.l @r15+,r12
1.41 -+#else
1.42 - mov.l LOCAL(set_fpscr_L1),r1
1.43 -+#endif
1.44 - swap.w r4,r0
1.45 - or #24,r0
1.46 - #ifndef FMOVD_WORKS
1.47 -@@ -1820,8 +1830,16 @@
1.48 - mov.l r3,@(4,r1)
1.49 - #endif
1.50 - .align 2
1.51 -+#ifdef __PIC__
1.52 -+LOCAL(set_fpscr_L0):
1.53 -+ .long _GLOBAL_OFFSET_TABLE_
1.54 -+LOCAL(set_fpscr_L1):
1.55 -+ .long GLOBAL(fpscr_values@GOT)
1.56 -+#else
1.57 - LOCAL(set_fpscr_L1):
1.58 - .long GLOBAL(fpscr_values)
1.59 -+#endif
1.60 -+
1.61 - #ifdef __ELF__
1.62 - .comm GLOBAL(fpscr_values),8,4
1.63 - #else