This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [WIP] glibc: Use /lib/ld-linux-armhf.so.3 for ARM's -mfloat-abi=hard ABI.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]