[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Validity of "fake" convenience library
From: |
Peter O'Gorman |
Subject: |
Re: Validity of "fake" convenience library |
Date: |
Tue, 04 Mar 2008 09:43:31 -0600 |
User-agent: |
Thunderbird 2.0.0.9 (X11/20071115) |
Dan Nicholson wrote:
> On Mon, Mar 3, 2008 at 6:37 PM, Peter O'Gorman <address@hidden> wrote:
>> Dan Nicholson wrote:
>>
>> > I was just looking through the pic code evaluation in libtool.m4 and
>> > not getting real excited about recreating that.
>>
>> In xserver's configure.ac you can, somewhere after AC_PROG_LIBTOOL, put
>> something like:
>> CC_PIC_FLAG="$lt_prog_compiler_pic"
>> CXX_PIC_FLAG="$lt_prog_compiler_pic_CXX"
>> AC_SUBST([CC_PIC_FLAG])
>> AC_SUBST([CXX_PIC_FLAG])
>>
>> Then in the Makefile.am that descends into the mesa build, you can set
>> these vars as arguments to make (I guess you already set CC etc this
>> way?), and use them to build the pic objects.
>
> That's excellent, I had never thought of that. However, I may just
> have to add a macro anyway since we need pic when building mesa
> independently of Xorg. I may end up just borrowing some parts of
> libtool.m4 and refactoring them. Or just using AC_PROG_LIBTOOL and
> stripping out the values I need like above. What I have right now is
> essentially "if gcc, add -fPIC, else fill in later...".
>
>> I am pretty sure that you can similarly avoid the need for a fake
>> convenience .la, but can not work it out without actually attempting a
>> build :)
>
> How do you suppose that would work? Do I somehow tell libtool "this
> other static library is pic, I'd like you to disassemble the objects
> like a convenience library". If you actually want to try on
> xserver/mesa, I can point you to the necessary repos and what packages
> are necessary for the build.
Not sure, in order to avoid the need to have a fake .la file or a bunch
of fake .lo files, you would need to build with libtool. It might be
possible to do that by, for example, having a target in mesa that simply
outputs a list of sources to a file, and use that list in an xserver
makefile.am. I have not really thought about it, and unfortunately, do
not have the time to help you. I am very happy that someone is doing
this however, as I have run into problems building xserver and
attempting to use a newer mesa. symlink-mesa.sh or whatever it's called
is not pretty.
>
> Just to be sure, though: If I'm able to ensure that the static library
> is pic, are there any other barriers to the fake .la approach? I just
> want to make sure I know the limitations before proposing this.
It should work.
Peter
--
Peter O'Gorman
http://pogma.com
- Validity of "fake" convenience library, Dan Nicholson, 2008/03/03
- Re: Validity of "fake" convenience library, Peter O'Gorman, 2008/03/03
- Re: Validity of "fake" convenience library, Dan Nicholson, 2008/03/03
- Re: Validity of "fake" convenience library, Daniel Herring, 2008/03/04
- Re: Validity of "fake" convenience library, Dan Nicholson, 2008/03/04
- Re: Validity of "fake" convenience library,
Peter O'Gorman <=
- Re: Validity of "fake" convenience library, Dan Nicholson, 2008/03/04
- Re: Validity of "fake" convenience library (libtool: to exclusive), Daniel Herring, 2008/03/04
- Re: Validity of "fake" convenience library (libtool: to exclusive), Dan Nicholson, 2008/03/04