This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 21/29] [AARCH64] Add ILP32 to makefiles
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: Andrew Pinski <apinski at cavium dot com>, <libc-alpha at sourceware dot org>
- Date: Tue, 28 Oct 2014 22:46:18 +0000
- Subject: Re: [PATCH 21/29] [AARCH64] Add ILP32 to makefiles
- Authentication-results: sourceware.org; auth=none
- References: <1414396793-9005-1-git-send-email-apinski at cavium dot com> <1414396793-9005-22-git-send-email-apinski at cavium dot com> <20141028201409 dot GD13832 at vapier dot wh0rd dot info>
On Tue, 28 Oct 2014, Mike Frysinger wrote:
> On 27 Oct 2014 00:59, Andrew Pinski wrote:
> > -abi-lp64-options := -U__AARCH64EB__
> > -abi-lp64-condition := !defined __AARCH64EB__
> > +abi-lp64-options := -U__AARCH64EB__ -D__LP64__ -U__ILP32__
> > +abi-lp64-condition := __WORDSIZE == 64 && !defined __AARCH64EB__
> >
> > -abi-lp64_be-options := -D__AARCH64EB__
> > -abi-lp64_be-condition := defined __AARCH64EB__
> > +abi-lp64_be-options := -D__AARCH64EB__ -D__LP64__ -U__ILP32__
> > +abi-lp64_be-condition := __WORDSIZE == 64 && defined __AARCH64EB__
> > +
> > +abi-ilp32-options := -U__AARCH64EB__ -U__LP64__ -D__ILP32__
> > +abi-ilp32-condition := __WORDSIZE == 32 && !defined __AARCH64EB__
> > +
> > +abi-ilp32_be-options := -D__AARCH64EB__ -U__LP64__ -D__ILP32__
> > +abi-ilp32_be-condition := __WORDSIZE == 32 && defined __AARCH64EB__
>
> why all this CPP magic ? shouldn't the compiler be producing the right objects
> in the first place with all the right defines ?
abi-$(variant)-options is used to generate bits/syscall.h, with a single
glibc install generating a version of bits/syscall.h suitable for all
ABIs. This means that a compiler with options set up to generate code for
one ABI needs to be forced to define macros that make asm/unistd.h define
the syscall macros for another ABI.
If we moved bits/syscall.h to the same approach as gnu/stubs.h and
gnu/lib-names.h (a glibc build only generates a full header for its own
ABI, and a wrapper that selects such a header depending on the ABI in
use), it should no longer be necessary to have abi-$(variant)-options
variables at all.
--
Joseph S. Myers
joseph@codesourcery.com