Re: Patch for MultiarchCross
On Wed, 23 Mar 2011 at 03:05:53 +0000, Wookey wrote:
> To make multiarch useful for cross-building as well as co-installation of
> libraries we need to install headers to /usr/include/<triplet>, which
> needs an FHS exception.
Some libraries (notably GLib and D-Bus) already isolate their arch-specific
headers into a subdirectory of /usr/lib:
% dpkg -L libglib2.0-dev
...
/usr/lib/glib-2.0/include/glibconfig.h <-- arch-dep (typedefs etc.)
...
/usr/include/glib-2.0/glib/gslice.h <-- identical on every arch
...
The pkg-config files then cause CFLAGS to contain both
-I/usr/lib/glib-2.0/include and -I/usr/include/glib-2.0.
Under multiarch, glibconfig.h would presumably move to
/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h or whatever, along
with the rest of the contents of ${libdir}.
Assuming you're not allowed to have, say, libglib2.0-dev:amd64 (= 2.28.0)
and libglib2.0-dev:armel (= 2.26.0) installed at the same time, these packages
could be handled via the existing special cases intended for /usr/share/doc
(identical files getting refcounted).
Making this work right would require pkg-config to look in multiarch locations
for the (current or cross) architecture; see
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=590992> and
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482884>.
S
Reply to: