Re: Dependencies of -dev packages
Gabor Gombas <email@example.com> writes:
> 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.
dpkg-libinfo or dpkg-multiarch both implement that with different
interfaces. Both have been tested but not uploaded to sid yet. The
later is more flexible and I will probably upload it at some point.
dpkg-multiarch takes the debian arch that we build debs for (e.g
x86_64-linux-gnu for amd64) and the target arch the binary code is for
(e.g. i486-linux-gnu for 32bit code on amd64) and then outputs CFLAGS,
LIBDIR, ... appropriate for that specific combination in the same
manner dpkg-architecture work. Both deb arch and code arch default to
the arch from dpkg-architecture.