Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 May 2017 19:12:24 +0200
From:      "O. Hartmann" <ohartmann@walstatt.org>
To:        "Pedro F. Giffuni" <pfg@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r318750 - in head/contrib: binutils/bfd binutils/ld binutils/ld/emulparams gcc gcc/config/s390
Message-ID:  <20170523191129.57183b1c@thor.intern.walstatt.dynvpn.de>
In-Reply-To: <201705231638.v4NGcAq1005935@repo.freebsd.org>
References:  <201705231638.v4NGcAq1005935@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/al1vyjXYFJz=ZTpFGvfuiI1
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Am Tue, 23 May 2017 16:38:10 +0000 (UTC)
"Pedro F. Giffuni" <pfg@FreeBSD.org> schrieb:

> Author: pfg
> Date: Tue May 23 16:38:10 2017
> New Revision: 318750
> URL: https://svnweb.freebsd.org/changeset/base/318750
>=20
> Log:
>   Bring some rough support for FreeBSD S/390 to the GNU toolchain.
>  =20
>   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.
>  =20
>   Obtained from:	Perforce depot/projects/s390
>=20
> Added:
>   head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh   (contents, pro=
ps 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
>=20
> Modified: head/contrib/binutils/bfd/config.bfd
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- 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=3D"bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerp=
cle_pe_vec
> bfd_powerpc_pe_vec" ;;
> =20
> -  s390-*-linux*)
> +  s390-*-freebsd* | s390-*-linux*)
>      targ_defvec=3Dbfd_elf32_s390_vec
>      targ64_selvecs=3Dbfd_elf64_s390_vec
>      want64=3Dtrue
>      ;;
>  #ifdef BFD64
> -  s390x-*-linux*)
> +  s390x-*-freebsd* | s390x-*-linux*)
>      targ_defvec=3Dbfd_elf64_s390_vec
>      targ_selvecs=3Dbfd_elf32_s390_vec
>      want64=3Dtrue
>=20
> Modified: head/contrib/binutils/ld/configure.tgt
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- 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=3Dppclynx ;; rs6000-*-aix5*)		targ_emul=3Daix5rs6 ;;
>  rs6000-*-aix*)		targ_emul=3Daixrs6
>  			;;
> +s390x-*-freebsd*)         targ_emul=3Delf64_s390
> +			targ_extra_emuls=3Delf_s390
> +			targ_extra_libpath=3D$targ_extra_emuls
> +			tdir_elf_s390=3D`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
>  s390x-*-linux*)         targ_emul=3Delf64_s390
>  			targ_extra_emuls=3Delf_s390
>  			targ_extra_libpath=3D$targ_extra_emuls
>  			tdir_elf_s390=3D`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
>  s390x-*-tpf*)		targ_emul=3Delf64_s390
>  			tdir_elf_s390=3D`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
> +s390-*-freebsd*)          targ_emul=3Delf_s390
> +			targ64_extra_emuls=3Delf64_s390
> +			targ64_extra_libpath=3Delf64_s390
> +			tdir_elf64_s390=3D`echo ${targ_alias} | sed -e 's/s390/s390x/'`
> +			;;
>  s390-*-linux*)          targ_emul=3Delf_s390
>  			targ64_extra_emuls=3Delf64_s390
>  			targ64_extra_libpath=3Delf64_s390
>=20
> Added: head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- /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
>=20
> Added: head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- /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
>=20
> Modified: head/contrib/gcc/config.gcc
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- 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=3D'aix'
>  	extra_headers=3D
>  	;;
> +s390-*-freebsd*)
> +	tm_file=3D"${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} s390/freebsd.h"
> +	;;
>  s390-*-linux*)
>  	tm_file=3D"s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
>  	tmake_file=3D"${tmake_file} t-dfprules s390/t-crtstuff s390/t-linux"
>  	;;
> +s390x-*-freebsd*)
> +	tm_file=3D"s390/s390.h s390/s390x.h dbxelf.h elfos.h ${fbsd_tm_file}
> s390/freebsd.h"
> +	tm_p_file=3Ds390/s390-protos.h
> +	md_file=3Ds390/s390.md
> +	out_file=3Ds390/s390.c
> +	;;
>  s390x-*-linux*)
>  	tm_file=3D"s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h s39=
0/linux.h"
>  	tm_p_file=3Ds390/s390-protos.h
>=20
> Copied and modified: head/contrib/gcc/config/s390/freebsd.h (from r318546,
> head/contrib/gcc/config/s390/linux.h)
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D ---
> 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 (hpenner@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.  */
> =20
> -#ifndef _LINUX_H
> -#define _LINUX_H
> +#ifndef _CONFIG_S390_FREEBSD_H
> +#define _CONFIG_S390_FREEBSD_H
> =20
>  /* Target specific version string.  */
> =20
>  #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
> =20
> =20
>  /* Target specific type definitions.  */
> =20
>  /* ??? 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 i=
nt")
> +#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
>  #undef  PTRDIFF_TYPE
>  #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
> =20
> @@ -48,16 +49,8 @@ Software Foundation, 51 Franklin Street,
>  #undef  WCHAR_TYPE_SIZE
>  #define WCHAR_TYPE_SIZE 32
> =20
> -
> -/* 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
> =20
>  /* Target specific assembler settings.  */
> =20
> @@ -92,7 +85,7 @@ Software Foundation, 51 Franklin Street,
> =20
>  #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
> =20
> -#define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h"
> +#define MD_UNWIND_SUPPORT "config/s390/freebsd-unwind.h"
> =20
>  #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
> =20
> +/* 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-unsubscribe@freebsd.org"

Buildworld fails on r318751 with a "Segmentation fault" error as shown belo=
w:

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=3D'skein_block_asm.o'
.ERROR_META_FILE=3D'/usr/obj/usr/src/lib/libmd/skein_block_asm.o.meta'
.MAKE.LEVEL=3D'4'
MAKEFILE=3D''


Host is running recent CURRENT: FreeBSD 12.0-CURRENT #124 r318748: Tue May =
23 18:52:59
CEST 2017 amd64
--=20
O. Hartmann

Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr
Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.=
 4 BDSG).

--Sig_/al1vyjXYFJz=ZTpFGvfuiI1
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWSRteAAKCRDS528fyFhY
lNJzAf9E+JYxM4l1P7Nh49Rrg1l7hDKe8ta/GFes1MQCpLG9A6I5bi5Bx4awtjMi
9fwdsMRU/M6rqb3k8eLBlkx78DILAf9nMvaOE+Ardj0y0rkLy3kXsXTVrxBoiboR
VTxLE2TZ4qNuRdBdTsZtUCjqBWS+EVKhZSd9qj6yzCY6tfeKOhA9
=0zre
-----END PGP SIGNATURE-----

--Sig_/al1vyjXYFJz=ZTpFGvfuiI1--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170523191129.57183b1c>