public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@hack.frob.com>
To: Carlos O'Donell <carlos_odonell@mentor.com>
Cc: Andrew Haley <aph@redhat.com>,    <libc-ports@sourceware.org>,
	   <steve.mcintyre@linaro.org>,    <michael.hope@linaro.org>
Subject: Re: [WIP] glibc: Use /lib/ld-linux-armhf.so.3 for ARM's -mfloat-abi=hard ABI.
Date: Thu, 26 Apr 2012 21:43:00 -0000	[thread overview]
Message-ID: <20120426214315.5B9252C0E5@topped-with-meat.com> (raw)
In-Reply-To: Carlos O'Donell's message of  Thursday, 26 April 2012 17:09:36 -0400 <4F99B990.7020300@mentor.com>

> 	* configure.in: Check and set libc_cv_compiler_dynlinker_default.

Since this is not used generically, it doesn't belong in the main configure.
Instead, put it in a macro in aclocal.m4 and use it in arm/preconfigure.in.

> +dnl Determine the dynamic linker that the compiler would have used given
> +dnl options we have been given. This is useful for machines to know so

Two spaces between sentences.

> +dnl compute it here and have it available for things like ABI checking.
> +AC_CACHE_CHECK([what dynamic linker is used by the compiler], libc_cv_complier_dynlinker_default,

Line too long, wrap the second arg to below [.

> +[libc_cv_compiler_dynlinker_default=""
> +cat > conftest.c <<EOF
> +int main (void) {}
> +EOF
> +  if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS

Why can't use use AC_TRY_LINK?

> +    libc_cv_compiler_dynlinker_default="`$READELF -W -l conftest | grep interpreter | sed -e 's,^.* \(\/.*\).$,\1,g'`"

Don't use grep.  You can use:

	| sed -n 's/^.*interpreter: \(.*\)\@:>@$/\1/p'

> +rm -r conftest.*])

You meant -f.  But you should just leave it to AC_TRY_LINK to clean up.

> In ARM's preconfigure we detect that the compiler is using the new
> dynamic linker and select the new "armhf" sysdep directory. The
> new "armhf" sysdep directory has a shlib-versions file which 
> names the dynamic linker correctly.
> 
> One downside to this solution is that we need to duplicate
> the directory structure for arm along with Implies in order
> to pickup the optimized routines normally present.
> 
> This is a bit hackish and I'd be open to other solutions, but
> at present this works.

I think you can just do the whole check in sysdeps/arm/configure
instead of preconfigure.  Make it AC_DEFINE something.  Then use
%ifdef something in sysdeps/arm/shlib-versions.  Or if you really
want to be open to randomness from the compiler config, you could
even AC_DEFINE_UNQUOTED(FOO, $libc_cv_compiler_dynlinker_default)
and then put in sysdeps/arm/shlib-versions:

arm.*-.*-linux-gnueabi.*	ld=FOO

But I wouldn't recommend that lack of sanity-checking.


Thanks,
Roland

  reply	other threads:[~2012-04-26 21:43 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13 17:27 New path for ld.so on ARM hard fp Andrew Haley
2012-04-13 17:29 ` Andrew Haley
2012-04-13 17:35   ` Roland McGrath
2012-04-14 16:35     ` Carlos O'Donell
2012-04-23  8:42       ` Andrew Haley
2012-04-26  3:41         ` Carlos O'Donell
2012-04-26 21:09         ` [WIP] glibc: Use /lib/ld-linux-armhf.so.3 for ARM's -mfloat-abi=hard ABI Carlos O'Donell
2012-04-26 21:43           ` Roland McGrath [this message]
2012-04-26 22:03           ` Joseph S. Myers
2012-04-26 22:07             ` Roland McGrath
2012-05-05 21:06               ` Carlos O'Donell
2012-05-05 21:48                 ` Joseph S. Myers
2012-05-05 21:52                 ` Carlos O'Donell
2012-05-05 23:17                   ` Joseph S. Myers
2012-05-06  2:18                     ` Carlos O'Donell
2012-05-06 12:13                       ` Joseph S. Myers
2012-05-06 21:36                         ` Carlos O'Donell
2012-05-06 22:41                           ` Joseph S. Myers
2012-05-07 18:47                   ` Roland McGrath
2012-05-07 18:57                     ` Carlos O'Donell
2012-05-07 19:55                       ` Roland McGrath
2012-05-07 20:00                         ` Carlos O'Donell
2012-05-07 20:00                           ` Carlos O'Donell
2012-05-07 19:11                     ` Joseph S. Myers
2012-05-07 19:41                       ` Roland McGrath
2012-05-07 20:52                         ` Joseph S. Myers
2012-05-07 21:31                           ` Roland McGrath
2012-05-01  4:48             ` Khem Raj
2012-05-01 10:09               ` Joseph S. Myers
2012-04-27  2:18           ` Mike Frysinger
2012-04-27 12:57             ` Carlos O'Donell
2012-04-19 19:49 ` New path for ld.so on ARM hard fp Joseph S. Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120426214315.5B9252C0E5@topped-with-meat.com \
    --to=roland@hack.frob.com \
    --cc=aph@redhat.com \
    --cc=carlos_odonell@mentor.com \
    --cc=libc-ports@sourceware.org \
    --cc=michael.hope@linaro.org \
    --cc=steve.mcintyre@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).