[Buildroot] [RFC PATCH 1/1] pkg-autotools: generic configure fix for powerpc64

Arnout Vandecappelle arnout at mind.be
Thu Nov 17 11:06:42 UTC 2016



On 17-11-16 11:05, Thomas Petazzoni wrote:
> Hello,
> 
[snip]
> I'm hesitating between this patch approach (with significant offsets)
> when applying, and an approach using a awk script. Here is an awk
> script that does the job:
> 
> /^\s*ppc\*-\*linux\*|powerpc\*-\*linux\*)$/ {

 How sure are you that no configure script will contain this line somewhere else
than in the shared library test? You *have* to match the context as well - in
particular the LD="${LD-ld} -m elf64ppc" part. This is possible with awk, but
the patch approach is a lot simpler IMHO, and anyway easier to read.

 Regards,
 Arnout

>     infix = 1;
>     print "         powerpcle-*linux*)";
>     print "           LD=\"${LD-ld} -m elf64lppc\"";
>     print "           ;;";
>     print "         powerpc-*linux*)";
>     print "           LD=\"${LD-ld} -m elf64ppc\"";
>     print "           ;;";
> }
> 
> /^\s*;;$/ {
>     if (infix) {
> 	infix = 0;
> 	next;
>     }
> }
> 
> // {
>     if (infix)
> 	next;
>     print;
> }
> 
> I'm not sure which of the two solutions is the most appropriate. The
> awk solution can probably be applied without doing the grep for the
> ppc*-*linux line, because the awk script only does the replacement if
> this line is found anyway.
> 
> Thomas
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF


More information about the buildroot mailing list