improved cross-compile/multiarch support using personality files #166
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: ariadne/pkgconf#166
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Right now the preferred approach for cross-compiling with pkgconf is to write a wrapper script that describes the target to pkgconf. By adding a simple shim layer, we could replace this with a simple configuration file instead.
Using
argv[0]
we can deduce whether or not we are running in native mode or cross mode.If we are in native mode, we just load
default.personality
from the configuration dir. If we are in cross mode, then we just load*triplet*.personality
from the configuration dir.A cross-compiler config may look something like:
In this example, the cross-compiler is actually just the i386 compiler running on an x86_64 host, but it is important to note that the paths are relative to the sysroot, like you would do with a real cross-compiler. In other words, multi-arch and cross-compilers should be handled the same by pkgconf.
I would like to move the compiled-in data to the
default.personality
file so that the site administrator can more easily configure the tool's default behaviour. Perhaps a combination of/usr/share/pkgconf/personalities/default.personality
and/etc/pkgconf-personalities.d/default.personality
to allow site-specific customization of any personality.cc @ignatenkobrain
Yes, it'd be quite nice to be able to replace what I've done here:
cf41f5098b
This sounds good to me!
Just to note, since this seems related, I am getting build failures on the current commit (
ab8df57205
)Using Linux and glibc, so no
strlcpy
here, butPERSONALITY_PATH
not being defined is problematic:yes i need to sort out meson and cmake files. i'll do it in a bit.