hi all. i have an issue with crossdev. in my /usr/portage/profiles/embedded/make.defaults there is no ARCH set. i can set it manually for make things works, but every emerge sync will overwrite the file. i have to put ARCH="arm" on the top of that file. my /etc/make.profile in the /usr/arm-* points to /usr/portage/profiles/embedded. this is my first bug report here, i hope this is the right section.
the whole profile is designed to be smallest possible and it indeed requires extra steps from the user: embedded/ profile is not only for arm, so you should set it by hand to site-specific override directory such as /etc/portage/profile/make.defaults
ARCH is missing as the OP stated, which is fine, but due to PROFILE_ONLY_VARIABLES containing ARCH (and ELIBC and KERNEL) it is now impossible for setting it in make.conf to actually work. There's a thread about some of this already, https://archives.gentoo.org/gentoo-embedded/message/60df78b6244496d2bedd2aa1586e6203 , and although I agree with some points, there are cases where there is no good default profile to rely on instead of embedded/ (ie, for mingw{32,64}). As such, I'd like to usurp this bug to request that ARCH, ELIBC, and KERNEL be allowed to be set in make.conf when the 'embedded' profile is used. Note that in the particular case of mingw32 and mingw64 , emerge-wrapper --init already sets ARCH and ELIBC to custom values in /usr/[CHOST]/etc/portage/make.conf ; these values are then completely ignored and emerge-wrapper [pkg]'s don't work. There are a bunch of forum threads that show users mostly just edit /usr/portage/profiles/embedded/make.defaults themselves after every --sync. Since crossdev's are advanced-user tools for the most part anyways, can't we reduce this restriction to avoid the need for even more custom work? Patch to follow...
Created attachment 430334 [details, diff] patch to profiles/embedded/make.defaults This patch removes the restriction on the aforementioned variables, to allow make.conf to override them.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00265f477673d09607f074f61d2e0c8b2f2c7b32 commit 00265f477673d09607f074f61d2e0c8b2f2c7b32 Author: Ian Stakenvicius <axs@gentoo.org> AuthorDate: 2018-08-03 14:56:30 +0000 Commit: Ian Stakenvicius <axs@gentoo.org> CommitDate: 2018-08-03 16:46:19 +0000 profiles/embedded/make.defaults: drop some PROFILE_ONLY_VARIABLES ARCH, ELIBC, and KERNEL variables need to be set or overridden when using the embedded profile for special crossdev projects (i.e. mingw32/64). Crossdev tools often set the overrides already in make.conf, but they were previously ignored when the embedded profile is used. Also of note, none of those variables are set in the embedded profile itself. This commit allows for those variables to be defined in make.conf, so that the minimalist embedded profile can be used directly rather than needing to create a custom profile based on it instead. Bug: https://bugs.gentoo.org/487310 profiles/embedded/make.defaults | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
now that we can set these values in make.conf or via a custom / overridden profile, i think there should be enough flexibility on custom embedded builds to close this bug. If anyone thinks otherwise please re-open or re-file.
Maybe the same should be done also for USERLAND (e.g. to allow for crosscompilation from USERLAND="GNU" to USERLAND="BSD") ?