[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Detect the default libpath on aix (to fix MPI support!)
From: |
libtool-patches |
Subject: |
Re: [PATCH] Detect the default libpath on aix (to fix MPI support!) |
Date: |
Sat, 4 Aug 2001 12:01:09 -0500 |
User-agent: |
Mutt/1.2.5i |
On Sun, Jul 29, 2001 at 05:57:04PM +0100, Gary V. Vaughan wrote:
> On Tuesday 24 July 2001 9:05 am, Erik Lindahl wrote:
> > > Good job! Thanks for following this through for us. I took the liberty
> > > of renaming and lightly reformatting you new macro, but otherwise applied
> > > unchanged to HEAD. I'm not overly keen on the use of awk, except perhaps
> > > here where the macro targets a particular class of machines (where
> > > presumably there is guaranteed to be an awk implementation installed).
> > > However, more brownie points are available for converting the awk script
> > > into sed...
> >
> > Ah, I almost suspected awk was at least a little bad. On the other hand,
> > this will only
> > be executed on AIX 4.3 and higher, i.e. fairly modern systems..
> >
> > I just spend an hour trying to achieve the same result with sed, but no
> > luck. Perhaps
> > it's trivial for some of you shell script wizards:
>
> Is *anything* trivial with sed? ;-) I expect some combination of `n' and `x'
> operations inside `/Import File Strings/{}' block will select the 2nd line
> following. I fiddled for a few minutes, but didn't hit upon the correct
> voodoo. I am not a qualified sedi master after all...
$ dump -H /usr/bin/ls
/usr/bin/ls:
***Loader Section***
Loader Header Information
VERSION# #SYMtableENT #RELOCent LENidSTR
0x00000001 0x00000031 0x00000047 0x0000002f
#IMPfilID OFFidSTR LENstrTBL OFFstrTBL
0x00000002 0x0000080c 0x00000083 0x0000083b
***Import File Strings***
INDEX PATH BASE MEMBER
0 /usr/lib:/lib:/usr/lpp/xlC/lib
1 libc.a shr.o
$ dump -H /usr/bin/ls | sed -n -e '/Import File Strings/,/^$/ {
/^0/ {
s/^[0-9][0-9]*[ ][ ]*\(.*\)$/\1/
p
}
}'
/usr/lib:/lib:/usr/lpp/xlC/lib
--
albert chin (address@hidden)
- Re: [PATCH] Detect the default libpath on aix (to fix MPI support!),
libtool-patches <=