autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using target-specific variables?


From: Tim Van Holder
Subject: Re: using target-specific variables?
Date: Fri, 13 May 2005 10:24:21 +0200
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Harald Dunkel wrote:
> Ralf Wildenhues wrote:
> 
>>I believe we are misunderstanding each other completely.
>>
>>Do you need more than one compiler simultaneously within one build tree?
>>If not: forget my answer.
>>If so: please explain why you would need this.
>>Then we can discuss further.
>>
> 
> Yes, I have to build libraries for gcc 2.95.x, gcc 3.x
> and icc within one build. It is OK to give these libraries
> different names, e.g. libmylib_gcc3.a.

To build the entire thing with 3 compilers, you typically need 3
separately configured build trees; you can still do the build in
one go though:

cd /.../my-package
mkdir build
cd build
mkdir gcc295
(cd gcc295; ../../configure CC='gcc -V 2.95.x')
mkdir gcc3
(cd gcc3; ../../configure CC='gcc -V 3.x')
mkdir icc
(cd icc; ../../configure CC='icc')

and then have a simple Makefile in 'build' that runs make in the
subdirs.  This way you can optimally tune the build trees for
each compiler (extra CFLAGS, LDFLAGS, whatever) as needed.
It's not typically recommended to build stuff inside the
source tree though; but this way the forwarding Makefile can be
in your CVS repos and in the tarball.

Of course, it sounds like you just need a release procedure - if a
release requires builds for X separate compilers, so be it.
The above could just as easily be handled by a script that, given a
source tarball, configures & builds the sources for each needed
compiler and then packages up the resulting binaries (e.g. by
running 'make install' with a DESTDIR and then creating a tarball
of that location).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]