This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCHv3] powerpc: ABI change - add HWCAP/HWCAP2/platform info to TCB
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Peter Bergner <bergner at vnet dot ibm dot com>
- Cc: Carlos Eduardo Seo <cseo at linux dot vnet dot ibm dot com>, GNU C Library <libc-alpha at sourceware dot org>, Tulio Machado <tuliom at linux dot vnet dot ibm dot com>, "Steven J. Munroe" <sjmunroe at us dot ibm dot com>, Carlos O'Donell <carlos at redhat dot com>
- Date: Wed, 23 Sep 2015 23:45:52 +0000
- Subject: Re: [PATCHv3] powerpc: ABI change - add HWCAP/HWCAP2/platform info to TCB
- Authentication-results: sourceware.org; auth=none
- References: <4BE991CB-F601-4D63-A416-5991FE870FC4 at linux dot vnet dot ibm dot com> <alpine dot DEB dot 2 dot 10 dot 1509232114070 dot 10585 at digraph dot polyomino dot org dot uk> <B650304C-6207-46AC-B6A8-FA29959B305D at linux dot vnet dot ibm dot com> <alpine dot DEB dot 2 dot 10 dot 1509232141250 dot 10585 at digraph dot polyomino dot org dot uk> <1443046986 dot 23503 dot 68 dot camel at otta> <alpine dot DEB dot 2 dot 10 dot 1509232234500 dot 10585 at digraph dot polyomino dot org dot uk> <1443050731 dot 23503 dot 78 dot camel at otta>
On Wed, 23 Sep 2015, Peter Bergner wrote:
> On Wed, 2015-09-23 at 22:36 +0000, Joseph Myers wrote:
> > On Wed, 23 Sep 2015, Peter Bergner wrote:
> >> The idea is that applications will use the builtins supplied by GCC
> >> (and other compilers) and will not access this info directly.
> >> In GCC, my plan is to first add a configure test looking for the
> >> symbol and if it doesn't exist, then I'll make the builtins return
> >
> > (Please make that configure test respect --with-glibc-version so that the
> > results can be correct when a bootstrap compiler is configured without
> > pre-existing glibc.)
>
> So you want the --with-glibc-version option to take precedence over a
> configure time test that the __init_hwcapinfo (or whatever it ends up
> being called) exists? Meaning we won't even do the configure time test
> if the user explicitly uses the --with-glibc-version option?
Yes.
I'm not clear on whether your configure test is meant to be in the gcc/
directory or in libgcc/. In gcc/, it's not possible to do compile or link
tests for the target at all - all you can do is examine headers for the
target (which may or may not be available either). The code to extract
version numbers from headers, overridden by --with-glibc-version, already
exists, so you could use GCC_GLIBC_VERSION_GTE_IFELSE in a configure test
there. In libgcc/, you can do compile tests but not link tests, but again
it's probably simplest to use glibc_version_major and glibc_version_minor
that configure.ac already computes taking due account of
--with-glibc-version.
Given the inability to do link tests for the target, testing for a symbol
isn't an option at all unless that symbol is mentioned in a header.
--
Joseph S. Myers
joseph@codesourcery.com