This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: SH Linux: remove big endian multilib
- To: Andrew Haley <aph at cambridge dot redhat dot com>
- Subject: Re: SH Linux: remove big endian multilib
- From: NIIBE Yutaka <gniibe at m17n dot org>
- Date: Fri, 27 Jul 2001 20:25:50 +0900 (JST)
- Cc: Joern Rennecke <amylaar at redhat dot com>, kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Cc: gcc-patches at gcc dot gnu dot org
- References: <15198.53597.668480.832931@cuddles.cambridge.redhat.com><200107251858.f6PIwPQ22967@phal.cambridge.redhat.com><15199.6387.263098.345128@cuddles.cambridge.redhat.com>
This patch supports no-multilib for individual sh[34]{eb}? targets.
The work has been done by Kaz Kojima.
I think that sh-unknown-linux-gnu target should support multilib.
I'm afraid of removing multilib supports means:
sh-unknown-linux-gnu == sh3-unknown-linux-gnu
2001-07-02 kaz Kojima <kkojima@rr.iij4u.or.jp>
NIIBE Yutaka <gniibe@m17n.org>
* config.gcc: Add new configurations sh[34]*-*-linux*.
* config/sh/t-linux-nomulti: New file.
* config/sh/sh3-linux.h, config/sh/sh3eb-linux.h,
config/sh/sh4-linux.h, config/sh/sh4eb-linux.h: New files.
diff -rcNp gcc-3.0/gcc/config/sh/sh3-linux.h gcc-3.0-kaz-gn/gcc/config/sh/sh3-linux.h
*** gcc-3.0/gcc/config/sh/sh3-linux.h Thu Jan 1 09:00:00 1970
--- gcc-3.0-kaz-gn/gcc/config/sh/sh3-linux.h Fri Jul 27 17:49:46 2001
***************
*** 0 ****
--- 1 ----
+ /* Currently, SH-3 (little endian) is default for GNU/Linux on SuperH. */
diff -rcNp gcc-3.0/gcc/config/sh/sh3eb-linux.h gcc-3.0-kaz-gn/gcc/config/sh/sh3eb-linux.h
*** gcc-3.0/gcc/config/sh/sh3eb-linux.h Thu Jan 1 09:00:00 1970
--- gcc-3.0-kaz-gn/gcc/config/sh/sh3eb-linux.h Fri Jul 27 18:31:27 2001
***************
*** 0 ****
--- 1,31 ----
+ #undef CPP_SPEC
+ #define CPP_SPEC \
+ "%{!ml:-D__BIG_ENDIAN__} \
+ %{ml:-D__LITTLE_ENDIAN__} \
+ %{m4:-D__SH4__} \
+ %{!m4:-D__SH3__ -D__sh3__} \
+ %{fPIC:-D__PIC__ -D__pic__} \
+ %{fpic:-D__PIC__ -D__pic__} \
+ %{posix:-D_POSIX_SOURCE} \
+ %{pthread:-D_REENTRANT -D_PTHREADS}"
+
+ #undef ASM_SPEC
+ #define ASM_SPEC "%{!ml:-big} %{ml:-little} %{mrelax:-relax}"
+
+ #undef CC1_SPEC
+ #define CC1_SPEC \
+ "-musermode %{!ml:-mb} %{!m4:-m3}"
+
+ #undef CC1PLUS_SPEC
+ #define CC1PLUS_SPEC \
+ "-musermode %{!ml:-mb} %{!m4:-m3}"
+
+ #undef LINK_SPEC
+ #define LINK_SPEC \
+ "%{!ml:-m shelf_linux} %{mrelax:-relax} \
+ %{shared:-shared} \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ %{!rpath:-rpath /lib}} \
+ %{static:-static}"
diff -rcNp gcc-3.0/gcc/config/sh/sh4-linux.h gcc-3.0-kaz-gn/gcc/config/sh/sh4-linux.h
*** gcc-3.0/gcc/config/sh/sh4-linux.h Thu Jan 1 09:00:00 1970
--- gcc-3.0-kaz-gn/gcc/config/sh/sh4-linux.h Fri Jul 27 18:32:29 2001
***************
*** 0 ****
--- 1,21 ----
+ #undef CPP_SPEC
+ #define CPP_SPEC \
+ "%{mb:-D__BIG_ENDIAN__} \
+ %{!mb:-D__LITTLE_ENDIAN__} \
+ %{m3:-D__SH3__ -D__sh3__} \
+ %{!m3:-D__SH4__} \
+ %{fPIC:-D__PIC__ -D__pic__} \
+ %{fpic:-D__PIC__ -D__pic__} \
+ %{posix:-D_POSIX_SOURCE} \
+ %{pthread:-D_REENTRANT -D_PTHREADS}"
+
+ #undef ASM_SPEC
+ #define ASM_SPEC "%{mb:-big} %{!mb:-little} %{mrelax:-relax}"
+
+ #undef CC1_SPEC
+ #define CC1_SPEC \
+ "-musermode %{!mb:-ml} %{!m3:-m4}"
+
+ #undef CC1PLUS_SPEC
+ #define CC1PLUS_SPEC \
+ "-musermode %{!mb:-ml} %{!m3:-m4}"
diff -rcNp gcc-3.0/gcc/config/sh/sh4eb-linux.h gcc-3.0-kaz-gn/gcc/config/sh/sh4eb-linux.h
*** gcc-3.0/gcc/config/sh/sh4eb-linux.h Thu Jan 1 09:00:00 1970
--- gcc-3.0-kaz-gn/gcc/config/sh/sh4eb-linux.h Fri Jul 27 18:32:58 2001
***************
*** 0 ****
--- 1,31 ----
+ #undef CPP_SPEC
+ #define CPP_SPEC \
+ "%{!ml:-D__BIG_ENDIAN__} \
+ %{ml:-D__LITTLE_ENDIAN__} \
+ %{m3:-D__SH3__ -D__sh3__} \
+ %{!m3:-D__SH4__} \
+ %{fPIC:-D__PIC__ -D__pic__} \
+ %{fpic:-D__PIC__ -D__pic__} \
+ %{posix:-D_POSIX_SOURCE} \
+ %{pthread:-D_REENTRANT -D_PTHREADS}"
+
+ #undef ASM_SPEC
+ #define ASM_SPEC "%{!ml:-big} %{ml:-little} %{mrelax:-relax}"
+
+ #undef CC1_SPEC
+ #define CC1_SPEC \
+ "-musermode %{!ml:-mb} %{!m3:-m4}"
+
+ #undef CC1PLUS_SPEC
+ #define CC1PLUS_SPEC \
+ "-musermode %{!ml:-mb} %{!m3:-m4}"
+
+ #undef LINK_SPEC
+ #define LINK_SPEC \
+ "%{!ml:-m shelf_linux} %{mrelax:-relax} \
+ %{shared:-shared} \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ %{!rpath:-rpath /lib}} \
+ %{static:-static}"
diff -rcNp gcc-3.0/gcc/config/sh/t-linux-nomulti gcc-3.0-kaz-gn/gcc/config/sh/t-linux-nomulti
*** gcc-3.0/gcc/config/sh/t-linux-nomulti Thu Jan 1 09:00:00 1970
--- gcc-3.0-kaz-gn/gcc/config/sh/t-linux-nomulti Fri Jul 27 17:49:46 2001
***************
*** 0 ****
--- 1,11 ----
+ LIBGCC = libgcc.a
+ EXTRA_PARTS = crtbegin.o crtbeginS.o crtend.o crtendS.o
+
+ SHLIB_MAPFILES += $(srcdir)/config/sh/libgcc-sh.ver
+
+ INSTALL_LIBGCC = install-libgcc
+
+ MULTILIB_OPTIONS=
+ MULTILIB_DIRNAMES=
+ MULTILIB_MATCHES =
+ EXTRA_MULTILIB_PARTS=
diff -rcNp gcc-3.0/gcc/config.gcc gcc-3.0-kaz-gn/gcc/config.gcc
*** gcc-3.0/gcc/config.gcc Wed Jun 6 04:09:51 2001
--- gcc-3.0-kaz-gn/gcc/config.gcc Fri Jul 27 17:49:46 2001
*************** powerpc*-*-*)
*** 240,245 ****
--- 240,248 ----
sparc*-*-*)
cpu_type=sparc
;;
+ sh*-*-*)
+ cpu_type=sh
+ ;;
esac
tm_file=${cpu_type}/${cpu_type}.h
*************** sh-*-rtems*)
*** 2991,2999 ****
thread_file='rtems'
fi
;;
! sh-*-linux*)
tm_file="sh/sh.h sh/elf.h sh/linux.h"
! tmake_file="sh/t-sh sh/t-elf sh/t-linux"
xmake_file=x-linux
gas=yes gnu_ld=yes
if test x$enable_threads = xyes; then
--- 2994,3022 ----
thread_file='rtems'
fi
;;
! sh*-*-linux*)
tm_file="sh/sh.h sh/elf.h sh/linux.h"
! tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux sh/t-linux"
! case $machine in
! sh3eb-*)
! tm_file="$tm_file sh/sh3eb-linux.h"
! tmake_file="$tmake_file sh/t-linux-nomulti"
! ;;
! sh4eb-*)
! tm_file="$tm_file sh/sh4eb-linux.h"
! tmake_file="$tmake_file sh/t-linux-nomulti"
! ;;
! sh3-*)
! tm_file="$tm_file sh/sh3-linux.h"
! tmake_file="$tmake_file sh/t-linux-nomulti"
! ;;
! sh4-*)
! tm_file="$tm_file sh/sh4-linux.h"
! tmake_file="$tmake_file sh/t-linux-nomulti"
! ;;
! *)
! ;;
! esac
xmake_file=x-linux
gas=yes gnu_ld=yes
if test x$enable_threads = xyes; then
--