[Gdal-dev] new build strategy for org/orgsf_frmts/

Alessandro Amici alexamici at tiscali.it
Wed Jul 16 19:58:27 EDT 2003


Frank,

On Tuesday 15 July 2003 15:34, Frank Warmerdam wrote:
> Alessandro Amici wrote:
> > i think a list is already maintained in ogr/GNUmakefile and i plan to use
> > that one. a cleaner solution is certainly welcome (but i'm not working on
> > that at the moment).
>
> Alessandro,
>
> But how do we take advantage of that list from the top level GNUmakefile?
>

my plan is to use partial linking (ld -r) for sub-directory dependencies.
with the attached patch i fase out ogrsf_frmts.a which is inserted into ogr.a 
as a single object (ogrsf_frmts.o).
the idea is to leave the detailed info on the files to be build in only one 
directory and treat inter directory dependecies via a standard mechanism. 
this technique is used in the linux kernel build system for the build-in.o 
partially linked objects.

i need to do the thing in steps, because there are a lot of non-trivial 
dependencies. however, the idea is to link the content of every subdir via 
$(subdir)/$(subdir).o. so next step would be to convert ogr.a to ogr.o and 
link it into gdal.a.

this procedure should be libtool friendly (and libtool should take care to 
issue an 'ld -r' in the correct unix dialect)

another possibility is to add to an ar archive the content of another archive 
(i.e. in oder to insert ogrsf_frmts.a into ogr.a), but i didn't find a nice 
way to do it.

> >>Despite my conservative nature, I am willing to suffer a little
> >> disruption at this point if it will be helpful in the future.

after battling with the subtle details i fully understand where your 
'conservative nature' come from ;).

> > ok, i'll prepare a patch for the unification of the various static
> > libraries in the next few days.
> > if you agree i'd also take the chance to change the static library name
> > to the more standard libgdal.a. better one big application build breakage
> > than two
> >
> > :).
>
> Sigh.  Yes, I suppose you are right.
>

this is a rather big choice to be made, so i'll refrain from committing this 
patch to cvs until you give the ok. BTW the full patch is actually bigger due 
to the removal into the ogrsf_frmts/*/GNUmakefile of the ar-after-compile 
rules.

NOTE: that the current patch has been tested on linux, but it assumes that 'ld 
-r' works on all supported plattorms!

cheers,
alessandro
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ogrsf_frmts-partial-linking.diff
Type: text/x-diff
Size: 2831 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20030717/55be3d1f/ogrsf_frmts-partial-linking.bin


More information about the Gdal-dev mailing list