Am Tue, 23 May 2017 16:38:10 +0000 (UTC) "Pedro F. Giffuni" <p...@freebsd.org> schrieb:
> Author: pfg > Date: Tue May 23 16:38:10 2017 > New Revision: 318750 > URL: https://svnweb.freebsd.org/changeset/base/318750 > > Log: > 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 > > Added: > head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh (contents, props > changed) > head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh (contents, props > changed) > head/contrib/gcc/config/s390/freebsd.h > - copied, changed from r318546, head/contrib/gcc/config/s390/linux.h > Modified: > head/contrib/binutils/bfd/config.bfd > head/contrib/binutils/ld/configure.tgt > head/contrib/gcc/config.gcc > > Modified: head/contrib/binutils/bfd/config.bfd > ============================================================================== > --- head/contrib/binutils/bfd/config.bfd Tue May 23 16:12:50 2017 > (r318749) +++ head/contrib/binutils/bfd/config.bfd Tue May 23 16:38:10 > 2017 (r318750) @@ -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 > > Modified: head/contrib/binutils/ld/configure.tgt > ============================================================================== > --- head/contrib/binutils/ld/configure.tgt Tue May 23 16:12:50 2017 > (r318749) +++ head/contrib/binutils/ld/configure.tgt Tue May 23 16:38:10 > 2017 (r318750) @@ -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 > > Added: head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh Tue May 23 > 16:38:10 > 2017 (r318750) @@ -0,0 +1,2 @@ > +. ${srcdir}/emulparams/elf64_s390.sh > +. ${srcdir}/emulparams/elf_fbsd.sh > > Added: head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh Tue May 23 > 16:38:10 > 2017 (r318750) @@ -0,0 +1,2 @@ > +. ${srcdir}/emulparams/elf_s390.sh > +. ${srcdir}/emulparams/elf_fbsd.sh > > Modified: head/contrib/gcc/config.gcc > ============================================================================== > --- head/contrib/gcc/config.gcc Tue May 23 16:12:50 2017 > (r318749) > +++ head/contrib/gcc/config.gcc Tue May 23 16:38:10 2017 > (r318750) > @@ -1942,10 +1942,19 @@ rs6000-ibm-aix[56789].* | powerpc-ibm-ai > 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 > > Copied and modified: head/contrib/gcc/config/s390/freebsd.h (from r318546, > head/contrib/gcc/config/s390/linux.h) > ============================================================================== > --- > head/contrib/gcc/config/s390/linux.h Fri May 19 17:14:29 2017 > (r318546, > copy source) +++ head/contrib/gcc/config/s390/freebsd.h Tue May 23 > 16:38:10 > 2017 (r318750) @@ -1,4 +1,4 @@ -/* Definitions for Linux for S/390. > +/* Definitions for FreeBSD for S/390. > Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005, 2006 > Free Software Foundation, Inc. > Contributed by Hartmut Penner (hpen...@de.ibm.com) and > @@ -21,25 +21,26 @@ along with GCC; see the file COPYING. I > Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA > 02110-1301, USA. */ > > -#ifndef _LINUX_H > -#define _LINUX_H > +#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, " (Linux for zSeries)"); > +#define TARGET_VERSION fprintf (stderr, " (FreeBSD for zSeries)"); > #else > #undef TARGET_VERSION > -#define TARGET_VERSION fprintf (stderr, " (Linux for S/390)"); > +#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" : "long unsigned int") > +#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int") > #undef PTRDIFF_TYPE > #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int") > > @@ -48,16 +49,8 @@ Software Foundation, 51 Franklin Street, > #undef WCHAR_TYPE_SIZE > #define WCHAR_TYPE_SIZE 32 > > - > -/* Target specific preprocessor settings. */ > - > -#define TARGET_OS_CPP_BUILTINS() \ > - do \ > - { \ > - LINUX_TARGET_OS_CPP_BUILTINS(); \ > - } \ > - while (0) > - > +#undef DEFAULT_SIGNED_CHAR > +#define DEFAULT_SIGNED_CHAR 1 > > /* Target specific assembler settings. */ > > @@ -92,7 +85,7 @@ Software Foundation, 51 Franklin Street, > > #define TARGET_ASM_FILE_END file_end_indicate_exec_stack > > -#define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h" > +#define MD_UNWIND_SUPPORT "config/s390/freebsd-unwind.h" > > #ifdef TARGET_LIBC_PROVIDES_SSP > /* s390 glibc provides __stack_chk_guard in 0x14(tp), > @@ -103,4 +96,10 @@ Software Foundation, 51 Franklin Street, > /* 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 > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" Buildworld fails on r318751 with a "Segmentation fault" error as shown below: Building /usr/obj/usr/src/lib/libkiconv/_libinstall --- lib/libmd__L --- --- skein_block_asm.o --- Segmentation fault *** [skein_block_asm.o] Error code 139 make[4]: stopped in /usr/src/lib/libmd .ERROR_TARGET='skein_block_asm.o' .ERROR_META_FILE='/usr/obj/usr/src/lib/libmd/skein_block_asm.o.meta' .MAKE.LEVEL='4' MAKEFILE='' Host is running recent CURRENT: FreeBSD 12.0-CURRENT #124 r318748: Tue May 23 18:52:59 CEST 2017 amd64 -- O. Hartmann Ich widerspreche der Nutzung oder Übermittlung meiner Daten für Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).
pgp6YPyI7JcXG.pgp
Description: OpenPGP digital signature