This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [WIP] glibc: Use /lib/ld-linux-armhf.so.3 for ARM's -mfloat-abi=hard ABI.
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: libc-ports at sourceware dot org, "Carlos O'Donell" <carlos_odonell at mentor dot com>, Andrew Haley <aph at redhat dot com>, Roland McGrath <roland at hack dot frob dot com>, steve dot mcintyre at linaro dot org, michael dot hope at linaro dot org
- Date: Fri, 27 Apr 2012 08:56:47 -0400
- Subject: Re: [WIP] glibc: Use /lib/ld-linux-armhf.so.3 for ARM's -mfloat-abi=hard ABI.
- References: <4F886201.3040200@redhat.com> <4F9515D5.60804@redhat.com> <4F99B990.7020300@mentor.com> <201204262219.36774.vapier@gentoo.org>
On Thu, Apr 26, 2012 at 10:19 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Thursday 26 April 2012 17:09:36 Carlos O'Donell wrote:
>> --- sysdeps/arm/preconfigure ?(revision 368507)
>> +++ sysdeps/arm/preconfigure ?(working copy)
>>
>> + ? ? ? ? ? ? armhf_dynamic_linker="ld-linux-armhf.so.3"
>> + ? ? ? ? ? ? ? ?if `echo "$libc_cv_compiler_dynlinker_default" | grep
>> "$armhf_dynamic_linker" >& /dev/null`; then
>
> not that it matters as it sounds like this is going to be rewritten, but
> there's no need for grep here. ?you can use a case statement:
I always appreciate a good review!
> ? ? ? ?case $libc_cv_compiler_dynlinker_default in
> ? ? ? ?*$armhf_dynamic_linker*)
> ? ? ? ? ? ? ? ?... hard float ...
> ? ? ? ? ? ? ? ?;;
> ? ? ? ?*)
> ? ? ? ? ? ? ? ?... soft float ...
> ? ? ? ? ? ? ? ?;;
> ? ? ? ?esac
Thank's that's a great idea, I always forget case can emulate grep.
> also, what's with the back ticks ? ?i think you just wanted:
> ? ? ? ?if echo ... | grep ... ; then
> rather than:
> ? ? ? ?if `echo ... | grep ...` ; then
WIP, it used to be on separate line and I didn't remove the backticks.
To be pedantic (and POSIX) one would need to use a lot more code to
ensure any command in a pipe sequence exited with the correct status.
I'm assuming echo doesn't fail ;-)
> and you don't want to use ">&" like that ... it's a bashism. ?`grep -q` would
> be better, or the POSIX ">/dev/null 2>&1".
Yup, good catch, I always forget ">&" is bash.
Cheers,
Carlos.