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

Re: Dependencies of -dev packages

On Mon, Oct 24, 2005 at 07:13:02PM +0200, Goswin von Brederlow wrote:

> That is indeed the problem. But how would a wraper help? You still
> have to somehow tell the wraper if gcc will later be invoked with -m32
> or -m64.

Whatever build system you use, there must be some logic somewhere to
decide what arcitecture to build for, and what other settings that
architecture needs. This logic may be in the user (by explicitely
setting PKG_CONFIG_LIBDIR and CFLAGS) or some script that decides that
"if we are running on x86_64 and we want to build for ix86 then we
should add -m32 to CFLAGS". This component should be extended to handle
pkg-config as well. (I'm carefully trying to avoid being
autoconf-centric here :-)

> Only solutions I see sofar is to either pass the gnu tripple to
> pkgconfig, to have configure set some environment variable or to
> include some variable in all paths that gcc later fills in.

Yes, the easiest solution is just to pass the target system tripple to
pkg-config. Support for this can be added to /usr/share/aclocal/pkg.m4
so autoconf-using packages can benefit from it automatically (after
re-running aclocal & autoconf, of course).

An idea independent of pkg-config: do we have an utility that takes a
system tripple and outputs the gcc flags (-m32/-m64) needed for building
for that arch? That would be useful to verify that the value given for
--host= is consistent with the value of CFLAGS/CXXFLAGS/FFLAGS.


     MTA SZTAKI Computer and Automation Research Institute
                Hungarian Academy of Sciences

Reply to: