Hi Glenn,

Your solution works great on Solaris platform but I have an issue with Linux
platform.
When we want to roll out a new shared object library we need to be able to
do a regression test.  The ideal test would be to use the production
executable and production library vs production executable and test
library.
On Linux platform I need to pass an extra link option,
"-Wl,--enable-new-dtags", to create DT_RUNPATH dynamic section attribute to
override buit-in RPATH with the LD_LIBRARY_PATH environment variable for
this purpose.

Are there any other ways to add "-Wl,--enable-new-dtags" link line option
without changing the CC.LD.RUNPATH variable in the probe file?

Thanks
Sang

On Mon, Aug 17, 2009 at 5:14 PM, Glenn Fowler <[email protected]> wrote:

>
> the nmake probe info contains
>        CC.LD.RUNPATH
> which is the option prefix for setting the compile time runpath
>
> the base rules checks if CC.LD.RUNPATH and LDRUNPATH are defined
> LDRUNPATH is user-defined; if defined it is the compile time runpath
> directory,
> and nmake throws on that option on the executable compile/link line
>
> you can use this in your makefiles something like this:
>
> :ALL: target1 target2
> target1 :: target1.C
> target2 :: LDRUNPATH=$(RUNPATH.$(BUILD)) target2.C
>
> the last assertion shows a scoped variable definition
> in this case LDRUNPATH will have the specified value only when
> building target2
>
> either in the makefile or in a project global makefile:
>
> BUILD        = PROD /* default build type */
>
> RUNPATH.PROD = /usr/local/xxx/lib
> RUNPATH.DEV  = /u1/build/dev/lib
> RUNPATH.WS   = $(HOME)/dev/lib
>
> then to build a type other than PROD run with
>
>        nmake BUILD=DEV ...
>
> > /*
> > Pleas pass the following LDFLAGS as command line argument to build
> target2
> > PROD:
> > LDFLAGS=-Wl,-R/usr/local/xxx/lib
> > DEV:
> > LDFLAGS=-Wl,-R/u1/build/dev/lib
> > WS:
> > LDFLAGS=-Wl,-R$HOME/dev/lib
> > */
>
> On Fri, 14 Aug 2009 14:50:36 -0400 Sang Lee wrote:
> > --0015175cf7721e311904711e8751
> > Content-Type: text/plain; charset=ISO-8859-1
> > Content-Transfer-Encoding: 7bit
>
> > Hi Glenn,
>
> > Sorry for the confusion.
> > I am not building multi architecture targets from one nmake invocation
> > rather I am building multiple binaries. Some of binaries need RPATH to
> > resolve shared libraries dynamically without using LD_LIBRARY_PATH. Also
> > depending on the build environments I need to set different RPATH.
>
> > Basically developers think that invoking nmake multiple times for
> building
> > each target by passing different LDFLAGS is cumbersome and error pron. I
> > also do not want developers to pass CCFLAGS and LDFLAGS for the
> production
> > release build.
>
> > Here is sample nmakefile:
> > :ALL: target1 target2
> > target1 :: target1.C
> > /*
> > Pleas pass the following LDFLAGS as command line argument to build
> target2
> > PROD:
> > LDFLAGS=-Wl,-R/usr/local/xxx/lib
> > DEV:
> > LDFLAGS=-Wl,-R/u1/build/dev/lib
> > WS:
> > LDFLAGS=-Wl,-R$HOME/dev/lib
> > */
> > target2 :: target2.C
>
> > Thanks
> > Sang
>
> > On Fri, Aug 14, 2009 at 1:52 PM, Glenn Fowler <[email protected]>
> wrote:
>
> > >
> > > the typical way to build for multiple architectures:
> > >
> > > * one makefile per library or collection of utilities
> > >  within a hierarchy of makefiles
> > >
> > > * a viewpath for each binary architecture target
> > >
> > > * one build from the top level for each architecture
> > >
> > > this is how ast-open is organized
> > > the viewpath allows one copy of the source and
> > > multiple binaries in separate views
> > > a binary view can be deleted and rebuilt from the source
> > >
> > > if you try to build multiple architecture targets
> > > from one makefile with one nmake invocation you will
> > > run into conflicts with the probe information and nmake state
> > >
> > > explain a little more about your setup and I'll respond monday
> > >
> > > have a good weekend
> > >
> > >
> > > On Fri, 14 Aug 2009 13:40:36 -0400 Sang Lee wrote:
> > > > Hi All,
> > > > I have a Nmakefile for building many binaries for Solaris 8 and Linux
> > > > platforms.
> > > > The problem that I have is how to build those targets without running
> > > nmake
> > > > multiple times with different with different LDFLAGS?
> > > > I do not want developers passing LDFLAGS as command line arguments
> for
> > > our
> > > > production application builds.
> > > > But I need to some build applications with RPATH to eliminate
> > > > LD_LIBRARY_PATH.
> > >
> > > > Thanks
> > > > Sang
> > >
> > > > --001636c5a951c5e66c04711d8cec
> > > > Content-Type: text/html; charset=ISO-8859-1
> > > > Content-Transfer-Encoding: quoted-printable
> > >
> > > > Hi All,<div><br></div><div>I have a Nmakefile for=A0building
> > > many=A0binarie=
> > > > s for Solaris 8 and Linux platforms.</div><div>The problem that I
> have is
> > > h=
> > > > ow to build those targets <span class=3D"Apple-style-span"
> > > style=3D"border-=
> > > > collapse: collapse; white-space: pre;
> -webkit-border-horizontal-spacing:
> > > 2p=
> > > > x; -webkit-border-vertical-spacing: 2px; ">without running nmake
> multiple
> > > t=
> > > > imes with different=A0<span class=3D"Apple-style-span"
> > > style=3D"border-coll=
> > > > apse: separate; white-space: normal;
> -webkit-border-horizontal-spacing:
> > > 0px=
> > > > ; -webkit-border-vertical-spacing: 0px; ">with different<span
> > > class=3D"Appl=
> > > > e-style-span" style=3D"border-collapse: collapse; white-space: pre;
> > > -webkit=
> > > > -border-horizontal-spacing: 2px; -webkit-border-vertical-spacing:
> 2px; ">
> > > L=
> > > > DFLAGS?</span></span></span></div>
> > > > <div><span class=3D"Apple-style-span" style=3D"border-collapse:
> collapse;
> > > w=
> > > > hite-space: pre; -webkit-border-horizontal-spacing: 2px;
> > > -webkit-border-ver=
> > > > tical-spacing: 2px;">I do not want developers passing LDFLAGS as
> command
> > > li=
> > > > ne arguments for our production application builds.</span></div>
> > > > <div><span class=3D"Apple-style-span" style=3D"border-collapse:
> collapse;
> > > w=
> > > > hite-space: pre; -webkit-border-horizontal-spacing: 2px;
> > > -webkit-border-ver=
> > > > tical-spacing: 2px;">But I need to some build applications with RPATH
> to
> > > el=
> > > > iminate LD_LIBRARY_PATH.</span></div>
> > > > <div><span class=3D"Apple-style-span" style=3D"border-collapse:
> collapse;
> > > w=
> > > > hite-space: pre; -webkit-border-horizontal-spacing: 2px;
> > > -webkit-border-ver=
> > > > tical-spacing: 2px;"><br></span></div><div><span
> > > class=3D"Apple-style-span"=
> > > >  style=3D"border-collapse: collapse; white-space: pre;
> > > -webkit-border-horiz=
> > > > ontal-spacing: 2px; -webkit-border-vertical-spacing:
> > > 2px;">Thanks</span></d=
> > > > iv>
> > > > <div><span class=3D"Apple-style-span" style=3D"border-collapse:
> collapse;
> > > w=
> > > > hite-space: pre; -webkit-border-horizontal-spacing: 2px;
> > > -webkit-border-ver=
> > > > tical-spacing: 2px;">Sang</span></div>
> > >
> > > > --001636c5a951c5e66c04711d8cec--
> > >
> > > > --===============0001873331==
> > > > Content-Type: text/plain; charset="us-ascii"
> > > > MIME-Version: 1.0
> > > > Content-Transfer-Encoding: 7bit
> > > > Content-Disposition: inline
> > >
> > > > _______________________________________________
> > > > ast-users mailing list
> > > > [email protected]
> > > > https://mailman.research.att.com/mailman/listinfo/ast-users
> > >
> > > > --===============0001873331==--
> > >
> > >
>
> > --0015175cf7721e311904711e8751
> > Content-Type: text/html; charset=ISO-8859-1
> > Content-Transfer-Encoding: quoted-printable
>
> > <div>Hi Glenn,</div><div><br></div><div>Sorry for the
> confusion.</div><div>=
> > I am not building multi architecture targets from one nmake invocation
> rath=
> > er I am building multiple binaries. Some of binaries need RPATH to
> resolve =
> > shared libraries dynamically without using LD_LIBRARY_PATH. Also
> depending =
> > on the build environments I need to set different RPATH.=A0</div>
> > <div><br></div><div>Basically developers think that invoking nmake
> multiple=
> >  times for building each target by passing different LDFLAGS is
> cumbersome =
> > and error pron. I also do not want developers to pass CCFLAGS and LDFLAGS
> f=
> > or the production release build.</div>
> > <div><br></div><div>Here is sample nmakefile:</div><div>:ALL: target1
> targe=
> > t2</div><div>target1 :: target1.C</div><div>/*</div><div>Pleas pass the
> fol=
> > lowing LDFLAGS as command line argument to build
> target2</div><div>PROD:</d=
> > iv>
> >
> <div>LDFLAGS=3D-Wl,-R/usr/local/xxx/lib</div><div>DEV:</div><div>LDFLAGS=3D=
> >
> -Wl,-R/u1/build/dev/lib=A0</div><div>WS:</div><div>LDFLAGS=3D-Wl,-R$HOME/de=
> > v/lib=A0</div><div>*/</div><div>target2 ::
> target2.C</div><div><br></div><d=
> > iv>Thanks</div>
> > <div>Sang</div><div><br></div><br><div class=3D"gmail_quote">On Fri, Aug
> 14=
> > , 2009 at 1:52 PM, Glenn Fowler <span dir=3D"ltr">&lt;<a href=3D"mailto:
> gsf=
> > @research.att.com">[email protected]</a>&gt;</span>
> wrote:<br><blockquot=
> > e class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc
> sol=
> > id;padding-left:1ex;">
> > <br>
> > the typical way to build for multiple architectures:<br>
> > <br>
> > * one makefile per library or collection of utilities<br>
> >  =A0within a hierarchy of makefiles<br>
> > <br>
> > * a viewpath for each binary architecture target<br>
> > <br>
> > * one build from the top level for each architecture<br>
> > <br>
> > this is how ast-open is organized<br>
> > the viewpath allows one copy of the source and<br>
> > multiple binaries in separate views<br>
> > a binary view can be deleted and rebuilt from the source<br>
> > <br>
> > if you try to build multiple architecture targets<br>
> > from one makefile with one nmake invocation you will<br>
> > run into conflicts with the probe information and nmake state<br>
> > <br>
> > explain a little more about your setup and I&#39;ll respond monday<br>
> > <br>
> > have a good weekend<br>
> > <div><div></div><div class=3D"h5"><br>
> > <br>
> > On Fri, 14 Aug 2009 13:40:36 -0400 Sang Lee wrote:<br>
> > &gt; Hi All,<br>
> > &gt; I have a Nmakefile for building many binaries for Solaris 8 and
> Linux<=
> > br>
> > &gt; platforms.<br>
> > &gt; The problem that I have is how to build those targets without
> running =
> > nmake<br>
> > &gt; multiple times with different with different LDFLAGS?<br>
> > &gt; I do not want developers passing LDFLAGS as command line arguments
> for=
> >  our<br>
> > &gt; production application builds.<br>
> > &gt; But I need to some build applications with RPATH to eliminate<br>
> > &gt; LD_LIBRARY_PATH.<br>
> > <br>
> > &gt; Thanks<br>
> > &gt; Sang<br>
> > <br>
> > </div></div>&gt; --001636c5a951c5e66c04711d8cec<br>
> > &gt; Content-Type: text/html; charset=3DISO-8859-1<br>
> > &gt; Content-Transfer-Encoding: quoted-printable<br>
> > <br>
> > &gt; Hi All,&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I have a
> Nmakefile =
> > for=3DA0building many=3DA0binarie=3D<br>
> > &gt; s for Solaris 8 and Linux platforms.&lt;/div&gt;&lt;div&gt;The
> problem=
> >  that I have is h=3D<br>
> > &gt; ow to build those targets &lt;span
> class=3D3D&quot;Apple-style-span&qu=
> > ot; style=3D3D&quot;border-=3D<br>
> > &gt; collapse: collapse; white-space: pre;
> -webkit-border-horizontal-spacin=
> > g: 2p=3D<br>
> > &gt; x; -webkit-border-vertical-spacing: 2px; &quot;&gt;without running
> nma=
> > ke multiple t=3D<br>
> > &gt; imes with different=3DA0&lt;span
> class=3D3D&quot;Apple-style-span&quot=
> > ; style=3D3D&quot;border-coll=3D<br>
> > &gt; apse: separate; white-space: normal;
> -webkit-border-horizontal-spacing=
> > : 0px=3D<br>
> > &gt; ; -webkit-border-vertical-spacing: 0px; &quot;&gt;with
> different&lt;sp=
> > an class=3D3D&quot;Appl=3D<br>
> > &gt; e-style-span&quot; style=3D3D&quot;border-collapse: collapse;
> white-sp=
> > ace: pre; -webkit=3D<br>
> > &gt; -border-horizontal-spacing: 2px; -webkit-border-vertical-spacing:
> 2px;=
> >  &quot;&gt; L=3D<br>
> > &gt; DFLAGS?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;<br>
> > &gt; &lt;div&gt;&lt;span class=3D3D&quot;Apple-style-span&quot;
> style=3D3D&=
> > quot;border-collapse: collapse; w=3D<br>
> > &gt; hite-space: pre; -webkit-border-horizontal-spacing: 2px;
> -webkit-borde=
> > r-ver=3D<br>
> > &gt; tical-spacing: 2px;&quot;&gt;I do not want developers passing
> LDFLAGS =
> > as command li=3D<br>
> > &gt; ne arguments for our production application
> builds.&lt;/span&gt;&lt;/d=
> > iv&gt;<br>
> > &gt; &lt;div&gt;&lt;span class=3D3D&quot;Apple-style-span&quot;
> style=3D3D&=
> > quot;border-collapse: collapse; w=3D<br>
> > &gt; hite-space: pre; -webkit-border-horizontal-spacing: 2px;
> -webkit-borde=
> > r-ver=3D<br>
> > &gt; tical-spacing: 2px;&quot;&gt;But I need to some build applications
> wit=
> > h RPATH to el=3D<br>
> > &gt; iminate LD_LIBRARY_PATH.&lt;/span&gt;&lt;/div&gt;<br>
> > &gt; &lt;div&gt;&lt;span class=3D3D&quot;Apple-style-span&quot;
> style=3D3D&=
> > quot;border-collapse: collapse; w=3D<br>
> > &gt; hite-space: pre; -webkit-border-horizontal-spacing: 2px;
> -webkit-borde=
> > r-ver=3D<br>
> > &gt; tical-spacing:
> 2px;&quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;di=
> > v&gt;&lt;span class=3D3D&quot;Apple-style-span&quot;=3D<br>
> > &gt; =A0style=3D3D&quot;border-collapse: collapse; white-space: pre;
> -webki=
> > t-border-horiz=3D<br>
> > &gt; ontal-spacing: 2px; -webkit-border-vertical-spacing:
> 2px;&quot;&gt;Tha=
> > nks&lt;/span&gt;&lt;/d=3D<br>
> > &gt; iv&gt;<br>
> > &gt; &lt;div&gt;&lt;span class=3D3D&quot;Apple-style-span&quot;
> style=3D3D&=
> > quot;border-collapse: collapse; w=3D<br>
> > &gt; hite-space: pre; -webkit-border-horizontal-spacing: 2px;
> -webkit-borde=
> > r-ver=3D<br>
> > &gt; tical-spacing: 2px;&quot;&gt;Sang&lt;/span&gt;&lt;/div&gt;<br>
> > <br>
> > &gt; --001636c5a951c5e66c04711d8cec--<br>
> > <br>
> > &gt; --=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D0001873331=3D=3D<br>
> > &gt; Content-Type: text/plain; charset=3D&quot;us-ascii&quot;<br>
> > &gt; MIME-Version: 1.0<br>
> > &gt; Content-Transfer-Encoding: 7bit<br>
> > &gt; Content-Disposition: inline<br>
> > <br>
> > &gt; _______________________________________________<br>
> > &gt; ast-users mailing list<br>
> > &gt; <a href=3D"mailto:[email protected]
> ">[email protected]=
> > om</a><br>
> > &gt; <a href=3D"
> https://mailman.research.att.com/mailman/listinfo/ast-users=
> > " target=3D"_blank">
> https://mailman.research.att.com/mailman/listinfo/ast-u=
> > sers</a><br>
> > <br>
> > &gt;
> --=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D0001873331=3D=3D--<br>
> > <br>
> > </blockquote></div><br>
>
> > --0015175cf7721e311904711e8751--
>
>
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to