On Tue, Feb 26, 2008 at 03:27:24PM -0800, Rod Evans wrote:
> Nicolas Williams wrote:
> 
> >>You can always set LD_OPTIONS=-Mmapfile before calling any makefiles
> >>or build shell scripts and pass additional information to the
> >>underling link-edit that will be called.
> >
> >I tried this, but this broke because SQLite3's build system builds
> >executable build tools.  So I could (and tried) making those targets
> >separately, but then I realized that I was encoding too much knowledge
> >of the internals of SQLite3's build system into the SFW makefile and
> >decided that was not good.
> 
> So when you set LD_OPTIONS at a high level, you're affecting many
> targets that are being created by ld(1), right?  You can't:
> 
>    LD_OPTIONS=-Mmapfile1  make  app1
>    LD_OPTIONS=-Mmapfile2  make  app2
>    ...
> 
> and build components individually?

I'd have to

    LD_OPTIONS=<options1> gmake <list of build tools private to SQLite3>
    LD_OPTIONS=<options2> gmake libsqlite3.la
    LD_OPTIONS=<options3> gmake libtclsqlite3.la
    LD_OPTIONS=<options1> gmake sqlite3

The makefile I wrote is rather simplistic too, and it'd need a bit of an
overhaul.  I did do it, actually, this weekend, and decided that I
didn't like having to write that list of build tools into the SFW
makefile.  Perhaps I should get over it.

> >Or perhaps I could add -z ignore to LD_OPTIONS too (to ignore the
> >symbols listed in the mapfile when building those interim executables).
> >And use a separate target for the one executable that is installed (so
> >it gets the noexecstack mapfile).
> 
> -z ignore isn't going to ignore unknown/unused mapfile entries, sorry.
> 
> Perhaps we need an LD_OPTIONS_<object name> variable :-)

Yes, I just suggested the same.  That'd rock!  Then I'd just:

    LD_OPTIONS=<options for executables> LD_OPTIONS_libsqlite_so=... \
    DESTDIR=... ... gmake install

one gmake, that's it.

Nico
-- 

Reply via email to