Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 803170 - sys-apps/portage doesn't pick up negation of LLVM_TARGETS in package.use
Summary: sys-apps/portage doesn't pick up negation of LLVM_TARGETS in package.use
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Profiles (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-21 05:33 UTC by ta2002
Modified: 2021-11-26 17:57 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 ta2002 2021-07-21 05:33:47 UTC
Default:

# emerge -1p llvm

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] sys-devel/llvm-common-12.0.0::gentoo  131,081 KiB
[ebuild  N     ] sys-devel/llvm-12.0.0:12::gentoo  USE="libffi ncurses test xml -debug -doc -exegesis -gold -libedit -xar -z3" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARC -ARM -AVR (-CSKY) -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ -VE -WebAssembly -XCore" 193 KiB

Total: 2 packages (2 new), Size of downloads: 131,274 KiB


Add to package.use: */* LLVM_TARGETS: ARM -NVPTX

# emerge -1p llvm

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] sys-devel/llvm-common-12.0.0::gentoo  131,081 KiB
[ebuild  N     ] sys-devel/llvm-12.0.0:12::gentoo  USE="libffi ncurses test xml -debug -doc -exegesis -gold -libedit -xar -z3" LLVM_TARGETS="AMDGPU ARM BPF NVPTX (X86) -AArch64 -ARC -AVR (-CSKY) -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ -VE -WebAssembly -XCore" 193 KiB

Total: 2 packages (2 new), Size of downloads: 131,274 KiB


Portage picks up the additional ARM target, but not the negation of the NVPTX target.
Comment 1 Marco Scardovi (scardracs) 2021-07-21 07:25:05 UTC
Have you tried to add it inside /etc/portage/profile/package.use.force too?
Comment 2 ta2002 2021-07-21 08:02:44 UTC
(In reply to Marco Scardovi (scardracs) from comment #1)
> Have you tried to add it inside /etc/portage/profile/package.use.force too?

No. I can get it to work with USE=-llvm_targets_NVPTX on the command line (or in package.use), but I just sort of expected portage to handle LLVM_TARGETS the same way it handles all other expansions.
Comment 3 Ben Kohler gentoo-dev 2021-07-21 14:18:05 UTC
This works for me:

# # emerge -pvO llvm

These are the packages that would be merged, in order:

[ebuild   R    ] sys-devel/llvm-12.0.1:12::gentoo  USE="libffi ncurses xml -debug -doc -exegesis -gold -libedit -test -xar -z3" ABI_X86="(64) -32 (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARC -ARM -AVR -CSKY -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ -VE -WebAssembly -XCore" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

# echo "*/* LLVM_TARGETS: -AMDGPU" >> /etc/portage/package.use/test
# emerge -pvO llvm

These are the packages that would be merged, in order:

[ebuild   R    ] sys-devel/llvm-12.0.1:12::gentoo  USE="libffi ncurses xml -debug -doc -exegesis -gold -libedit -test -xar -z3" ABI_X86="(64) -32 (-x32)" LLVM_TARGETS="BPF NVPTX (X86) -AArch64 -AMDGPU* -ARC -ARM -AVR -CSKY -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ -VE -WebAssembly -XCore" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

#
Comment 4 Ben Kohler gentoo-dev 2021-07-21 14:18:41 UTC
Is it possible you have a later package.use entry which turns it back on?

Can you check "grep -ri llvm_targets /etc/portage" output?