[Libclc-dev] Install location for the pkg-config file

Michał Górny mgorny at gentoo.org
Tue Aug 13 08:43:58 PDT 2013


Dnia 2013-08-13, o godz. 07:49:18
Tom Stellard <tom at stellard.net> napisał(a):

> On Tue, Aug 13, 2013 at 11:45:58AM +0200, Michał Górny wrote:
> > Hello,
> > 
> > I'm working on bringing a better multilib experience for Gentoo users,
> > and I've tripped a bit on default install layout of libclc. By default,
> > libclc configure.py uses $prefix/lib/pkgconfig which is not really
> > a valid location on a multilib system.
> > 
> > As far as I can see, libclc installs only LLVM bytecode and headers,
> > and explicitly uses libexecdir rather than libdir. Does that mean that
> > libclc is completely ABI-agnostic? In that case, the proper install
> > location for pkg-config would be $prefix/share/pkgconfig.
> > 
> 
> Yes, libclc only installs LLVM bytecode and headers.  Currently, only
> GPU targets are supported, so it is ABI-agnostic in the sense that the
> ABI of the host machine doesn't matter.  However, it is possible that it
> could support CPU targets in the future which might not be ABI-agnostic.

Well, I suspect that those targets would still be selectable in such
a way that having separate 64-bit and 32-bit libclc wouldn't be needed.
And in the worst case, pkg-config can be moved freely.

> > Could you please tell me if I'm correct? And if I am, I think it would
> > be really beneficial to change the default within libclc sources
> > as well.
> 
> I don't know much about system layout best practices, but I am in favor of changing the
> install prefix if it makes things easier for distros.  I'm not sure how
> the current install prefixes were selected.

Well, there are two valid pkg-config file locations:

$libdir/pkgconfig is for pkg-config that refer directly to libraries
and other ABI-specific stuff. That is, there can be
e.g. /usr/lib64/pkgconfig/libfoo.pc for 64-bit libfoo
and /usr/lib/pkgconfig/libfoo.pc for 32-bit libfoo (exact directories
depend on arch and multilib layout, if any).

$datarootdir/pkgconfig for ABI-agnostic stuff (usually things that are
installed in /usr/share, /usr/libexec or /usr/lib, or pure headers
which are guaranteed not to change depending on arch/ABI).

The current choice of 'lib/pkgconfig' hits quite a random ABI
on multilib distros (native on standard Gentoo, 32-bit on Fedora).
Choice of $libdir/pkgconfig would limit libclc to the specific ABI it
was built with, and -- to be honest -- it seems that libclc's build
system is thoroughly confused by our multilib attempts. Using
$datarootdir/pkgconfig would allow us to simply use libclc for multilib
mesa.

I will send a patch implementing that solution in reply to this mail.
I assumed there's no point in implementing whole --datarootdir here,
and just replaced the default path.

-- 
Best regards,
Michał Górny
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20130813/a0fc1d3f/attachment.sig>


More information about the Libclc-dev mailing list