mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-03 09:00:21 +00:00
Bring some rough support for FreeBSD S/390 to the GNU toolchain.
This is no-op and only for reference: the S/390 port seems to be elusive in the BSDs so it is convenient to keep some trace from past efforts. It is likely newer attempts will focus on a newer toolchain using clang instead. Obtained from: Perforce depot/projects/s390
This commit is contained in:
parent
5a6d7b723f
commit
3a17f73727
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=318750
@ -1156,13 +1156,13 @@ case "${targ}" in
|
||||
targ_selvecs="bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec"
|
||||
;;
|
||||
|
||||
s390-*-linux*)
|
||||
s390-*-freebsd* | s390-*-linux*)
|
||||
targ_defvec=bfd_elf32_s390_vec
|
||||
targ64_selvecs=bfd_elf64_s390_vec
|
||||
want64=true
|
||||
;;
|
||||
#ifdef BFD64
|
||||
s390x-*-linux*)
|
||||
s390x-*-freebsd* | s390x-*-linux*)
|
||||
targ_defvec=bfd_elf64_s390_vec
|
||||
targ_selvecs=bfd_elf32_s390_vec
|
||||
want64=true
|
||||
|
@ -480,12 +480,21 @@ powerpc-*-lynxos*) targ_emul=ppclynx ;;
|
||||
rs6000-*-aix5*) targ_emul=aix5rs6 ;;
|
||||
rs6000-*-aix*) targ_emul=aixrs6
|
||||
;;
|
||||
s390x-*-freebsd*) targ_emul=elf64_s390
|
||||
targ_extra_emuls=elf_s390
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
|
||||
s390x-*-linux*) targ_emul=elf64_s390
|
||||
targ_extra_emuls=elf_s390
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
|
||||
s390x-*-tpf*) targ_emul=elf64_s390
|
||||
tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
|
||||
s390-*-freebsd*) targ_emul=elf_s390
|
||||
targ64_extra_emuls=elf64_s390
|
||||
targ64_extra_libpath=elf64_s390
|
||||
tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
|
||||
;;
|
||||
s390-*-linux*) targ_emul=elf_s390
|
||||
targ64_extra_emuls=elf64_s390
|
||||
targ64_extra_libpath=elf64_s390
|
||||
|
2
contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh
Executable file
2
contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh
Executable file
@ -0,0 +1,2 @@
|
||||
. ${srcdir}/emulparams/elf64_s390.sh
|
||||
. ${srcdir}/emulparams/elf_fbsd.sh
|
2
contrib/binutils/ld/emulparams/elf_s390_fbsd.sh
Executable file
2
contrib/binutils/ld/emulparams/elf_s390_fbsd.sh
Executable file
@ -0,0 +1,2 @@
|
||||
. ${srcdir}/emulparams/elf_s390.sh
|
||||
. ${srcdir}/emulparams/elf_fbsd.sh
|
@ -1942,10 +1942,19 @@ rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
|
||||
thread_file='aix'
|
||||
extra_headers=
|
||||
;;
|
||||
s390-*-freebsd*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} s390/freebsd.h"
|
||||
;;
|
||||
s390-*-linux*)
|
||||
tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
|
||||
tmake_file="${tmake_file} t-dfprules s390/t-crtstuff s390/t-linux"
|
||||
;;
|
||||
s390x-*-freebsd*)
|
||||
tm_file="s390/s390.h s390/s390x.h dbxelf.h elfos.h ${fbsd_tm_file} s390/freebsd.h"
|
||||
tm_p_file=s390/s390-protos.h
|
||||
md_file=s390/s390.md
|
||||
out_file=s390/s390.c
|
||||
;;
|
||||
s390x-*-linux*)
|
||||
tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
|
||||
tm_p_file=s390/s390-protos.h
|
||||
|
105
contrib/gcc/config/s390/freebsd.h
Normal file
105
contrib/gcc/config/s390/freebsd.h
Normal file
@ -0,0 +1,105 @@
|
||||
/* Definitions for FreeBSD for S/390.
|
||||
Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by 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, 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
#ifndef _CONFIG_S390_FREEBSD_H
|
||||
#define _CONFIG_S390_FREEBSD_H
|
||||
|
||||
/* Target specific version string. */
|
||||
|
||||
#ifdef DEFAULT_TARGET_64BIT
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fprintf (stderr, " (FreeBSD for zSeries)");
|
||||
#else
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fprintf (stderr, " (FreeBSD for S/390)");
|
||||
#endif
|
||||
|
||||
|
||||
/* Target specific type definitions. */
|
||||
|
||||
/* ??? Do we really want long as size_t on 31-bit? */
|
||||
/* Answer is yes for FreeBSD. */
|
||||
#undef SIZE_TYPE
|
||||
#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
|
||||
#undef PTRDIFF_TYPE
|
||||
#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 32
|
||||
|
||||
#undef DEFAULT_SIGNED_CHAR
|
||||
#define DEFAULT_SIGNED_CHAR 1
|
||||
|
||||
/* Target specific assembler settings. */
|
||||
|
||||
#undef ASM_SPEC
|
||||
#define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*}"
|
||||
|
||||
|
||||
/* Target specific linker settings. */
|
||||
|
||||
#ifdef DEFAULT_TARGET_64BIT
|
||||
#define MULTILIB_DEFAULTS { "m64" }
|
||||
#else
|
||||
#define MULTILIB_DEFAULTS { "m31" }
|
||||
#endif
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
|
||||
#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
"%{m31:-m elf_s390}%{m64:-m elf64_s390} \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{static:-static} \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker: \
|
||||
%{m31:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "} \
|
||||
%{m64:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}}}"
|
||||
|
||||
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
|
||||
|
||||
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
|
||||
#define MD_UNWIND_SUPPORT "config/s390/freebsd-unwind.h"
|
||||
|
||||
#ifdef TARGET_LIBC_PROVIDES_SSP
|
||||
/* s390 glibc provides __stack_chk_guard in 0x14(tp),
|
||||
s390x glibc provides it at 0x28(tp). */
|
||||
#define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14)
|
||||
#endif
|
||||
|
||||
/* Define if long doubles should be mangled as 'g'. */
|
||||
#define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING
|
||||
|
||||
/* Override the default comment-starter of "/APP" from unix.h. */
|
||||
#undef ASM_APP_ON
|
||||
#define ASM_APP_ON "#APP\n"
|
||||
#undef ASM_APP_OFF
|
||||
#define ASM_APP_OFF "#NO_APP\n"
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user