This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] A few fixes for sh-linux port
- From: kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 03 Aug 2003 09:57:55 +0900
- Subject: [PATCH] A few fixes for sh-linux port
Hi,
The attached patch updates sh-linux port. The first hunk makes
it more compatible with the other linux ports and fixes the problem
pointed out by Dan Kegel in
<URL:http://gcc.gnu.org/ml/gcc-patches/2003-07/msg02092.html>.
The latter part is needed to get rid of a build error on sh64-linux
target. Bootstraped and regtested on sh4-unknown-linux-gnu and
regtested on sh64-unknown-linux-gnu, without new regressions.
Commited to the mainline.
Regards,
kaz
--
2003-08-02 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/linux.h (SUBTARGET_LINK_SPEC): Don't set rpath.
(LIB_SPEC): Set -lpthread always when -pthread set. Set -lieee
when -mieee-fp set and -shared not set.
(SH_FALLBACK_FRAME_FLOAT_STATE): Don't define for SH5.
diff -u3prN ORIG/gcc/gcc/config/sh/linux.h LOCAL/gcc/gcc/config/sh/linux.h
--- ORIG/gcc/gcc/config/sh/linux.h Fri Jun 13 15:44:26 2003
+++ LOCAL/gcc/gcc/config/sh/linux.h Sat Aug 2 13:29:41 2003
@@ -73,15 +73,16 @@ do { \
"%{shared:-shared} \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
- %{!rpath:-rpath /lib}} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
%{static:-static}"
#undef LIB_SPEC
#define LIB_SPEC \
- "%{shared: -lc} \
+ "%{pthread:-lpthread} \
+ %{shared: -lc} \
%{!static:-rpath-link %R/lib:%R/usr/lib} \
- %{!shared: %{pthread:-lthread} \
+ %{!shared: \
+ %{mieee-fp:-lieee} \
%{profile:-lc_p} %{!profile: -lc}}"
#if defined(HAVE_LD_EH_FRAME_HDR)
@@ -170,11 +171,11 @@ do { \
#define SH_DWARF_FRAME_FPSCR 24
#endif /* defined (__SH5__) */
-#if defined (__SH5__) && __SH5__ != 32
+#if defined (__SH5__)
/* MD_FALLBACK_FRAME_STATE_FOR is not yet defined for SHMEDIA. */
-#else /* defined (__SH5__) && __SH5__ != 32 */
+#else /* defined (__SH5__) */
-#if defined (__SH3E__) || defined (__SH4__) || defined (__SH5__)
+#if defined (__SH3E__) || defined (__SH4__)
#define SH_FALLBACK_FRAME_FLOAT_STATE(SC, FS, CFA) \
do { \
int i_, r_; \
@@ -274,5 +275,5 @@ do { \
goto SUCCESS; \
} while (0)
-#endif /* defined (__SH5__) && __SH5__ != 32 */
+#endif /* defined (__SH5__) */
#endif /* IN_LIBGCC2 */