Patch to enable build on s390x

Mike Frysinger vapier at gentoo.org
Sat Sep 17 22:21:42 CEST 2011


On Saturday, September 17, 2011 11:07:42 Marc Glisse wrote:
> On Fri, 16 Sep 2011, Andreas Krebbel wrote:
> >> Do these systems support a 32-bit ABI?  If they do, the compiler
> >> should have an option controlling ABI.  Please try it, using something
> >> trivial like hello.c.
> > 
> > Yes. The toolchain for System z supports 2 differents ABIs:
> > -m31 for 32 bit GPRs, 31 bit addressing - s390 <-- machine id (uname -r)
> > -m64 for 64 bit GPRs, 64 bit addressing - s390x
> 
> Does something like this work (ie doesn't change anything on s390, works
> on s390x and with ABI=32 works like s390 on s390x)?
> 
> --- a/configure.in	Sun Aug 21 20:08:38 2011 +0200
> +++ b/configure.in	Sat Sep 17 16:45:31 2011 +0200
> @@ -1119,6 +1119,13 @@
>       gcc_cflags="$gcc_cflags $fomit_frame_pointer"
>       path="s390"
>       extra_functions="udiv_w_sdiv"
> +    case $host_cpu in
> +      s390x)
> +        abilist="64 32"
> +        gcc_64_cflags="$gcc_cflags"
> +        gcc_32_cflags="$gcc_cflags -m31"
> +	;;
> +    esac
>       ;;

this doesnt help with the problem the original patch fixes:
/home/vapier/gmp-5.0.2/build/.libs/libgmp.so: undefined reference to 
`sdiv_qrnnd'

can't we focus on making s390x simply work before worrying about cross-abi 
support and optimizations ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://gmplib.org/list-archives/gmp-bugs/attachments/20110917/42bcb365/attachment.bin>


More information about the gmp-bugs mailing list