Boost logo

Boost-Build :

From: Raoul Gough (raoulgough_at_[hidden])
Date: 2003-01-22 09:08:25


"David Abrahams" <dave_at_[hidden]> wrote in message
news:uk7gx27ik.fsf_at_boost-consulting.com...
> "Raoul Gough" <raoulgough_at_[hidden]> writes:
> > "David Abrahams" <dave_at_[hidden]> wrote in message
> > news:u7kcy2igf.fsf_at_boost-consulting.com...
> >> "Raoul Gough" <raoulgough_at_[hidden]> writes:
> > [snip]
> >> > The change is easy for mingw-tools.jam (just add the option to
> >> > IMPLIB_COMMAND), but I'm not sure about gcc-tools.jam, since I
> > don't
> >> > know if the option is available on platforms other than Win32.
> >>
> >> Can't you just make it conditional on $(NT)?
> >
> > Yes, I guess that would be the way to go. I don't really know
enough
> > about jam to do this with any confidence. The only way I could
think
> > of would be to introduce a new variable, which is either empty or
set
> > to enable-auto-image, and include this in the assignment to
> > IMPLIB_COMMAND somehow.
>
> That's the usual strategy.

OK, I'll go with that (see the attached diff - it does the trick on
Win2000). David, do you mind if I check this in?

>
> > I've tried doing something like the following *after* the current
> > assignment:
> >
> > if $(NT) {
> > # Give the enable-auto-image-base option to the linker as well
> > IMPLIB_COMMAND on $(<) = "-Wl,--enable-auto-image-base " +
> > IMPLIB_COMMAND ;
> ^^^^^^^^^^^^^^
> Missing $(...) here at least
> > }
> >
> > But this doesn't seem to pick up the previous value. Is this even
> > possible? How would a real jam programmer do this kind of thing?
>
>
> if $(NT)
> {
> # Give the enable-auto-image-base option to the linker as well
> IMPLIB_COMMAND on $(<) += "-Wl,--enable-auto-image-base " ;
> }
>
> would be more likely to work.

I initially wanted to do this as well, but I think the tail end of
IMPLIB_COMMAND ("-Wl,--out-implib,") has to bind to the library name
on the right of it, so any changes would have to be prepended to the
value instead of appended.

Regards,
Raoul Gough.
 ------=_NextPart_000_0025_01C2C21F.BB084010 Content-Type: text/plain;
name="diff1.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="diff1.txt"

*** gcc-tools_1_63.jam Tue Jan 21 23:08:32 2003
--- gcc-tools.jam Wed Jan 22 14:04:30 2003
*************** rule Link-action
*** 346,355 ****
SOTAG on $(<) =3D ;
ACTION_1 on $(<) =3D ;
}
# This will appear before the import library name when building a DLL=
, but
# will be "multiplied away" otherwise. The --exclude-symbols directiv=
e
# proved to be neccessary with some versions of Cygwin.
! IMPLIB_COMMAND on $(<) =3D "-Wl,--export-all-symbols -Wl,--exclude-sy=
mbols,_bss_end__:_bss_start__:_data_end__:_data_start__ -Wl,--out-implib," =
;
DEPENDS $(<) : $(NEEDLIBS) $(NEEDIMPS) ;
gRUN_LD_LIBRARY_PATH($(<)) +=3D $(STDLIBPATH:T) ;
=20=20=20=20=20=20
--- 346,364 ----
SOTAG on $(<) =3D ;
ACTION_1 on $(<) =3D ;
}
+=20
+ # On Win32, choose different image bases for load-time efficiency
+ if $(NT) {
+ DLL_LINK_FLAGS =3D "-Wl,--enable-auto-image-base " ;
+ }
+ else {
+ DLL_LINK_FLAGS =3D "" ;
+ }
+=20
# This will appear before the import library name when building a DLL=
, but
# will be "multiplied away" otherwise. The --exclude-symbols directiv=
e
# proved to be neccessary with some versions of Cygwin.
! IMPLIB_COMMAND on $(<) =3D "$(DLL_LINK_FLAGS)-Wl,--export-all-symbols=
-Wl,--exclude-symbols,_bss_end__:_bss_start__:_data_end__:_data_start__ -W=
l,--out-implib," ;
DEPENDS $(<) : $(NEEDLIBS) $(NEEDIMPS) ;
gRUN_LD_LIBRARY_PATH($(<)) +=3D $(STDLIBPATH:T) ;
=20=20=20=20=20=20
 ------=_NextPart_000_0025_01C2C21F.BB084010--


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk