Base Directory Specification and plugins
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Sep 1 04:17:43 PDT 2011
On Thu, 01 Sep 2011 at 00:28:37 +0400, Yury G. Kudryashov wrote:
> I'm replying to an old thread. The original thread can be found here:
> http://lists.freedesktop.org/archives/xdg/2010-November/011722.html
>
> Simon McVittie wrote:
> > The most general and widely used naming scheme for ABIs in Free
> > Software seems to be the "GNU triplets" used by autoconf and gcc, which
> > look like CPU-OS or CPU-KERNEL-OS (e.g. x86_64-linux-gnu for Linux with
> > GNU libc on x86-64, arm-linux-uclibc for Linux with uclibc on ARM,
> > i486-freebsd for FreeBSD (both kernel and libc) on x86, or whatever).
>
> What do you think about $XDG_LIBRARY_DIRS${LIB_SUFFIX},
> $XDG_LIBRARY_HOME${LIB_SUFFIX}, where LIB_SUFFIX is fixed during library
> compilation and should be available through
> MyLib.pc/MyLibConfig.cmake/whatever? This looks easier to implement.
Perhaps; or "/${LIB_SUFFIX}", which is essentially Debian-style multiarch.
I can't help thinking that the ABI naming should be the same for the whole
platform rather than being something you query per-library, but hopefully one
day everyone will be using multiarch anyway.
Since the old thread, Debian multiarch support has gone from "will happen one
day" to "actually happening" - it's in Ubuntu 11.04 (released), and
mostly in Debian 7 (under development). The names we use for architectures
are now defined as the GNU tuple for the most generic member of a compatible
family of ABIs: for instance:
* i386-linux-gnu (never a specific processor level like i486, even though
Debian binaries actually require i486 and Ubuntu binaries require i686)
* arm-linux-gnueabi (never a specific processor like armv4t-linux-gnueabi,
even though the actual binaries have a minimum CPU level, currently ARM v4
I think)
* x86_64-kfreebsd-gnu (there's only one GNU CPU name for x86-64 anyway)
* arm-linux-gnueabihf
* arm-linux-gnu (the incompatible ARM "old ABI" - which was dropped after
Debian 5, but if we still supported it, this is what it'd be called)
* i386-freebsd (hypothetically, if FreeBSD adopted Debian-style multiarch,
this is what they'd use)
I think the best-practice should be to use the same "GNU tuple made generic"
for the library suffix that Debian is using for multiarch; or failing that,
the next best thing would be to use the GNU tuple for which the library
was built (which is something the compiler already knows), and query it from
the library's pkg-config file.
In the common case of x86-64 on GNU/Linux, the Debian multiarch tuple is the
same as the GNU triplet anyway.
S
More information about the xdg
mailing list