This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

S/390: Add s390x-ibm-tpf* target


Hello,

this adds support for TPF as cross-compilation target (s390x-ibm-tpf).
The TPF port was contributed by P.J. Darcy (darcypj@us.ibm.com).

Bye,
Ulrich

ChangeLog:

	* config.gcc (s390x-ibm-tpf*): New target.
	* doc/install.texi: Document it.
	* config/s390/t-tpf: New file.
	* config/s390/tpf.h: New file.


Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.398
diff -c -p -r1.398 config.gcc
*** gcc/config.gcc	13 Oct 2003 02:48:59 -0000	1.398
--- gcc/config.gcc	15 Oct 2003 15:49:59 -0000
*************** s390x-*-linux*)
*** 1761,1766 ****
--- 1761,1774 ----
  	out_file=s390/s390.c
  	tmake_file="t-slibgcc-elf-ver t-linux s390/t-crtstuff s390/t-linux64"
  	;;
+ s390x-ibm-tpf*)
+ 	tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h s390/tpf.h"
+ 	tm_p_file=s390/s390-protos.h
+ 	md_file=s390/s390.md
+ 	extra_modes=s390/s390-modes.def
+ 	out_file=s390/s390.c
+ 	tmake_file="t-slibgcc-elf-ver s390/t-crtstuff s390/t-tpf"
+ 	;;
  sh-*-elf* | sh[2346l]*-*-elf* | sh*-*-kaos*)
  	tmake_file="sh/t-sh sh/t-elf"
  	case ${target} in
Index: gcc/doc/install.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/install.texi,v
retrieving revision 1.226
diff -c -p -r1.226 install.texi
*** gcc/doc/install.texi	9 Oct 2003 03:24:16 -0000	1.226
--- gcc/doc/install.texi	15 Oct 2003 15:50:36 -0000
*************** GNU Compiler Collection on your machine.
*** 2018,2023 ****
--- 2018,2025 ----
  @item
  @uref{#s390x-*-linux*,,s390x-*-linux*}
  @item
+ @uref{#s390x-ibm-tpf*,,s390x-ibm-tpf*}
+ @item
  @uref{#*-*-solaris2*,,*-*-solaris2*}
  @item
  @uref{#sparc-sun-solaris2*,,sparc-sun-solaris2*}
*************** S/390 system running Linux for S/390@.
*** 3171,3176 ****
--- 3173,3185 ----
  @end html
  @heading @anchor{s390x-*-linux*}s390x-*-linux*
  zSeries system (64-bit) running Linux for zSeries@.
+ 
+ @html
+ <hr />
+ @end html
+ @heading @anchor{s390x-ibm-tpf*}s390x-ibm-tpf*
+ zSeries system (64-bit) running TPF.  This platform is 
+ supported as cross-compilation target only.
  
  @html
  <hr />
*** /dev/null	Mon Aug 11 14:39:14 2003
--- gcc/config/s390/t-tpf	Wed Oct 15 17:28:25 2003
***************
*** 0 ****
--- 1,13 ----
+ # Compile crtbeginS.o and crtendS.o with pic.
+ CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
+ # Compile libgcc2.a with pic.
+ TARGET_LIBGCC2_CFLAGS = -fPIC
+ 
+ # Override t-slibgcc-elf-ver to export some libgcc symbols with
+ # the symbol versions that glibc used.
+ SHLIB_MAPFILES += $(srcdir)/config/s390/libgcc-glibc.ver
+ 
+ # Use unwind-dw2-fde-glibc
+ LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
+   $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
+ LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c gthr-gnat.c
*** /dev/null	Mon Aug 11 14:39:14 2003
--- gcc/config/s390/tpf.h	Wed Oct 15 17:36:31 2003
***************
*** 0 ****
--- 1,112 ----
+ /* Definitions for target OS TPF for GNU compiler, for IBM S/390 hardware
+    Copyright (C) 2003 Free Software Foundation, Inc.
+    Contributed by P.J. Darcy (darcypj@us.ibm.com),
+                   Hartmut Penner (hpenner@de.ibm.com), and
+                   Ulrich Weigand (uweigand@de.ibm.com).
+ 
+ This file is part of GCC.
+ 
+ GCC is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2, or (at your option) any later
+ version.
+ 
+ GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING.  If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.  */
+ 
+ #ifndef _TPF_H
+ #define _TPF_H
+ 
+ /* TPF wants the following macros defined/undefined as follows.  */
+ #undef ASM_APP_ON
+ #define ASM_APP_ON "#APP\n"
+ #undef ASM_APP_OFF
+ #define ASM_APP_OFF "#NO_APP\n"
+ #define NO_IMPLICIT_EXTERN_C
+ #define TARGET_HAS_F_SETLKW
+ #undef MD_EXEC_PREFIX
+ #undef MD_STARTFILE_PREFIX
+ 
+ #undef  SIZE_TYPE
+ #define SIZE_TYPE ("long unsigned int")
+ #undef  PTRDIFF_TYPE
+ #define PTRDIFF_TYPE ("long int")
+ #undef  WCHAR_TYPE
+ #define WCHAR_TYPE "int"
+ #undef  WCHAR_TYPE_SIZE
+ #define WCHAR_TYPE_SIZE 32
+ 
+ 
+ /* Basic record keeping for the TPF OS name.  */
+ #undef  TARGET_VERSION
+ #define TARGET_VERSION fprintf (stderr, " (TPF: zSeries)");
+ 
+ /* TPF OS specific stack-pointer offset.  */
+ #undef STACK_POINTER_OFFSET
+ #define STACK_POINTER_OFFSET 		280
+ 
+ /* When building for TPF, set a generic default target that is 64 bits.  */
+ #undef TARGET_DEFAULT
+ #define TARGET_DEFAULT             0x33
+ 
+ /* TPF OS specific compiler settings.  */
+ #undef TARGET_OS_CPP_BUILTINS
+ #define TARGET_OS_CPP_BUILTINS()                \
+   do                                            \
+     {                                           \
+       builtin_define_std ("tpf");               \
+       builtin_assert ("system=tpf");            \
+       builtin_define ("__ELF__");               \
+       if (flag_pic)                             \
+         {                                       \
+           builtin_define ("__PIC__");           \
+           builtin_define ("__pic__");           \
+         }                                       \
+     }                                           \
+   while (0)
+ 
+ 
+ /* Make TPF specific spec file settings here.  */
+ 
+ #undef  STARTFILE_SPEC
+ #define STARTFILE_SPEC \
+   "%{!shared: \
+      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
+                        %{!p:%{profile:gcrt1.o%s} \
+                          %{!profile:crt1.o%s}}}} \
+    crti.o%s %{static:crtbeginT.o%s} \
+    %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
+ 
+ #undef  ENDFILE_SPEC
+ #define ENDFILE_SPEC \
+   "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
+ 
+ /* The GNU C++ standard library requires that these macros be defined.  */
+ #undef CPLUSPLUS_CPP_SPEC
+ #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
+ 
+ #undef  LIB_SPEC
+ #define LIB_SPEC "%{pthread:-lpthread} -lc"
+ 
+ #undef TARGET_C99_FUNCTIONS
+ #define TARGET_C99_FUNCTIONS 1
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC \
+   "-m elf64_s390 \
+    %{shared:-shared} \
+    %{!shared: \
+       %{static:-static} \
+       %{!static: \
+         %{rdynamic:-export-dynamic} \
+         %{!dynamic-linker:-dynamic-linker /lib/ld64.so}}}"
+ 
+ #endif /* ! _TPF_H */
+ 
-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]