Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 907416 - sys-devel/crossdev: Add --ex-lib argument
Summary: sys-devel/crossdev: Add --ex-lib argument
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Crossdev team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-30 14:55 UTC by Raul Rangel
Modified: 2023-05-30 17:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raul Rangel 2023-05-30 14:55:49 UTC
Today, the only method to add additional packages is --ex-pkg. This causes the package to be compiled with the host's MULTILIB ABI. I propose we add a `--ex-lib` argument that will compile the package with the targets MULTILIB ABI.

For example:
$ sudo crossdev --stable --show-fail-log --env 'FEATURES=splitdebug' -P --oneshot --overlays '/mnt/host/source/src/third_party/chromiumos-overlay /mnt/host/source/src/third_party/eclass-overlay /mnt/host/source/src/third_party/portage-stable' --ov-output /usr/local/portage/crossdev -t armv7a-cros-linux-gnueabihf --ex-pkg sys-libs/libxcrypt --ex-pkg sys-libs/compiler-rt --ex-pkg sys-libs/llvm-libunwind --ex-pkg sys-libs/libcxx --ex-pkg dev-lang/go --binutils '[stable]' --gcc '[stable]' --kernel '[stable]' --libc '[stable]' --ex-gdb --init-target

`sys-libs/libcxx` should have an ABI of `default`, but instead we generate the following:
```
FEATURES=splitdebug
TARGET_ABI='default'
TARGET_MULTILIB_ABIS='default'
TARGET_DEFAULT_ABI='default'
CFLAGS_amd64='-m64'
CFLAGS_default=''
CFLAGS_x32='-mx32'
CFLAGS_x86='-m32'
CHOST_amd64='x86_64-pc-linux-gnu'
CHOST_default=''
CHOST_x32='x86_64-pc-linux-gnux32'
CHOST_x86='i686-pc-linux-gnu'
CTARGET_amd64='x86_64-pc-linux-gnu'
CTARGET_default='armv7a-cros-linux-gnueabihf'
CTARGET_x32='x86_64-pc-linux-gnux32'
CTARGET_x86='i686-pc-linux-gnu'
LDFLAGS_amd64=''
LDFLAGS_default=''
LIBDIR_amd64='lib64'
LIBDIR_default='lib'
LIBDIR_x32='libx32'
LIBDIR_x86='lib'
ABI='amd64'
MULTILIB_ABIS='amd64'
DEFAULT_ABI='amd64'
```

We currently work around this issue by calling `multilib_env` inside `pkg_setup` to set the proper ABI.

Here is where we decide which ABI we target: https://gitweb.gentoo.org/proj/crossdev.git/tree/crossdev#n1295

Reproducible: Always