You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The prefixed scripts are symlinks to a wrapper that sets PKG_CONFIG_LIBDIR to the appropriate multilib directory to point to the correct package architecture. Since that is how libraries for cross-compilation toolchains are normally installed, it should work out of the box with them.
So I'd like to suggest to:
If $TARGET != $HOST, look for $TARGET-pkg-config and $GCC_TARGET-pkg-config script instead of pkg-config and
If it exists, the target_supported() function should return true and the script would be called.
The mapping from llvm-style $TARGET and gcc-style $GCC_TARGET is unfortunately not uniform, but looking at the list of targets both Rust and Debian know, two replacement rules should be sufficient:
1.-unknown- → - and
2. -pc-windows-gnu → -w64-mingw32
The scripts seem to be created when multi-arch is enabled for given target (with mingw/windows being a special case) and I only have that for amd64 (native), i386 and x32, but I believe these days it should work for qemu-emulated architectures too, so somebody can conceivably have arm-linux-gnueabi-pkg-config or aarch64-linux-gnu-pkg-config and if they do, it is going to work with the corresponding prefixed gcc linker.
(The curious x86_64-pc-linux-gnu-pkg-config is strangely a plain hardlink to pkg-config though the default gcc target is as expected just x86_64-linux-gnu with no -pc-; I believe it can be safely ignored)
The text was updated successfully, but these errors were encountered:
`pkg-config-rs` does not support dynamically linking against a non-host target (see rust-lang/pkg-config-rs#53).
If librdkafka isn't found we will continue regardless.
My Debian system has following scripts in
/usr/bin
:The prefixed scripts are symlinks to a wrapper that sets
PKG_CONFIG_LIBDIR
to the appropriate multilib directory to point to the correct package architecture. Since that is how libraries for cross-compilation toolchains are normally installed, it should work out of the box with them.So I'd like to suggest to:
$TARGET != $HOST
, look for$TARGET-pkg-config
and$GCC_TARGET-pkg-config
script instead ofpkg-config
andtarget_supported()
function should return true and the script would be called.The mapping from llvm-style
$TARGET
and gcc-style$GCC_TARGET
is unfortunately not uniform, but looking at the list of targets both Rust and Debian know, two replacement rules should be sufficient:1.
-unknown-
→-
and2.
-pc-windows-gnu
→-w64-mingw32
The scripts seem to be created when multi-arch is enabled for given target (with mingw/windows being a special case) and I only have that for
amd64
(native),i386
andx32
, but I believe these days it should work for qemu-emulated architectures too, so somebody can conceivably havearm-linux-gnueabi-pkg-config
oraarch64-linux-gnu-pkg-config
and if they do, it is going to work with the corresponding prefixedgcc
linker.(The curious
x86_64-pc-linux-gnu-pkg-config
is strangely a plain hardlink topkg-config
though the default gcc target is as expected justx86_64-linux-gnu
with no-pc-
; I believe it can be safely ignored)The text was updated successfully, but these errors were encountered: