Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917396 - Get rid of -gentoo- in musl CHOST setting
Summary: Get rid of -gentoo- in musl CHOST setting
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Profiles (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords:
Depends on: profile-23.0
Blocks:
  Show dependency tree
 
Reported: 2023-11-15 22:38 UTC by Andreas K. Hüttel
Modified: 2024-04-11 14:56 UTC (History)
4 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 Andreas K. Hüttel archtester gentoo-dev 2023-11-15 22:38:50 UTC
Currently many arches use in CHOST "gentoo" as vendor field for musl only, e.g., on amd64 "x86_64-gentoo-linux-musl".

This is
* unnecessary
* somewhat silly
* and may lead to trouble once other toolchains come into play (llvm, rust, ...)

As discussed already with Sam, let's get rid of this (and use the same vendor as for glibc, i.e., -pc- or -unknown-) in profiles 23.0.

Bug filed for tracking
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2023-11-15 22:47:56 UTC
Relevant profile dirs: 

default/linux/amd64/23.0/musl
default/linux/amd64/23.0/split-usr/musl
default/linux/arm/23.0/musl
default/linux/arm/23.0/split-usr/musl
default/linux/arm64/23.0/musl
default/linux/arm64/23.0/split-usr/musl
default/linux/mips/23.0/mipsel/n64/musl
default/linux/mips/23.0/mipsel/o32/musl
default/linux/mips/23.0/n64/musl
default/linux/mips/23.0/o32/musl
default/linux/mips/23.0/split-usr/musl
default/linux/riscv/23.0/rv64/lp64d/musl
default/linux/riscv/23.0/rv64/lp64/musl
default/linux/riscv/23.0/rv64/split-usr/lp64d/musl
default/linux/riscv/23.0/rv64/split-usr/lp64/musl
default/linux/x86/23.0/musl
default/linux/x86/23.0/split-usr/musl

(subdirs like "hardened" inherit "..")
Comment 2 Larry the Git Cow gentoo-dev 2023-11-15 22:53:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2070994f02f6d790dc9e391e2c2f837596b7925b

commit 2070994f02f6d790dc9e391e2c2f837596b7925b
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2023-11-15 22:52:25 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2023-11-15 22:52:25 +0000

    profiles, 23.0, musl, amd64: fix CHOST vendor field
    
    Bug: https://bugs.gentoo.org/917396
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 profiles/default/linux/amd64/23.0/musl/make.defaults           | 2 +-
 profiles/default/linux/amd64/23.0/split-usr/musl/make.defaults | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2023-11-15 22:55:14 UTC
> default/linux/arm/23.0/musl
> default/linux/arm/23.0/split-usr/musl

already have -unknown-
Comment 4 Larry the Git Cow gentoo-dev 2023-11-15 22:59:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f31c7288f45563cce83759615db8442d64010eec

commit f31c7288f45563cce83759615db8442d64010eec
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2023-11-15 22:58:57 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2023-11-15 22:58:57 +0000

    profiles, 23.0, musl, arm64: fix CHOST vendor field
    
    Bug: https://bugs.gentoo.org/917396
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 profiles/default/linux/arm64/23.0/musl/make.defaults           | 2 +-
 profiles/default/linux/arm64/23.0/split-usr/musl/make.defaults | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2023-11-16 01:12:14 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa6a042ccd6cfa5af9d8ac97f87eb704021dea34

commit fa6a042ccd6cfa5af9d8ac97f87eb704021dea34
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2023-11-16 01:10:47 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2023-11-16 01:12:03 +0000

    profiles, 23.0, musl, mips: fix CHOST vendor field
    
    Bug: https://bugs.gentoo.org/917396
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 profiles/default/linux/mips/23.0/mipsel/n64/musl/make.defaults          | 2 +-
 profiles/default/linux/mips/23.0/mipsel/o32/musl/make.defaults          | 2 +-
 profiles/default/linux/mips/23.0/n64/musl/make.defaults                 | 2 +-
 profiles/default/linux/mips/23.0/o32/musl/make.defaults                 | 2 +-
 .../default/linux/mips/23.0/split-usr/musl/mipsel/n64/make.defaults     | 2 +-
 .../default/linux/mips/23.0/split-usr/musl/mipsel/o32/make.defaults     | 2 +-
 profiles/default/linux/mips/23.0/split-usr/musl/n64/make.defaults       | 2 +-
 profiles/default/linux/mips/23.0/split-usr/musl/o32/make.defaults       | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
Comment 6 Larry the Git Cow gentoo-dev 2023-11-16 01:17:35 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1712999af6af2a4abed57481ab49c899e8c4770

commit c1712999af6af2a4abed57481ab49c899e8c4770
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2023-11-16 01:16:48 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2023-11-16 01:16:48 +0000

    profiles, 23.0, musl, x86: fix CHOST vendor field
    
    Bug: https://bugs.gentoo.org/917396
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 profiles/default/linux/x86/23.0/musl/make.defaults           | 2 +-
 profiles/default/linux/x86/23.0/split-usr/musl/make.defaults | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f96745f4e4ce3ed5c67ceb24263fec02afc052a8

commit f96745f4e4ce3ed5c67ceb24263fec02afc052a8
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2023-11-16 01:14:24 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2023-11-16 01:14:24 +0000

    profiles, 23.0, musl, riscv: fix CHOST vendor field
    
    Bug: https://bugs.gentoo.org/917396
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 profiles/default/linux/riscv/23.0/rv64/lp64/musl/make.defaults        | 4 ++--
 profiles/default/linux/riscv/23.0/rv64/lp64d/musl/make.defaults       | 4 ++--
 .../default/linux/riscv/23.0/rv64/split-usr/lp64/musl/make.defaults   | 4 ++--
 .../default/linux/riscv/23.0/rv64/split-usr/lp64d/musl/make.defaults  | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
Comment 7 tt_1 2023-11-16 05:07:10 UTC
Hi, will it still be possible to override the CHOST values in make.conf? I'm still using an older musl install with -gentoo- prefix, can I still upgrade it to the 23.0 profiles once they get stabilized? thanks
Comment 8 Mike Gilbert gentoo-dev 2023-11-16 19:14:04 UTC
Setting CHOST in make.conf should still work.

If you want to switch to the new CHOST value, see the wiki page below.

https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable
Comment 9 Andreas K. Hüttel archtester gentoo-dev 2023-11-16 19:17:49 UTC
(In reply to tt_1 from comment #7)
> Hi, will it still be possible to override the CHOST values in make.conf? I'm
> still using an older musl install with -gentoo- prefix, can I still upgrade
> it to the 23.0 profiles once they get stabilized? thanks

Essentially, the upgrade instructions will (for everyone, and because of several different reasons) be more or less identical to the CHOST switching instructions (cited in comment #8). 

So, yes, sure you will be able to upgrade.

See the work-in-progess page,
https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_update_instructions
Comment 10 Vic Kerr (wikky) 2024-02-21 13:57:42 UTC
(In reply to Larry the Git Cow from comment #2)
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=2070994f02f6d790dc9e391e2c2f837596b7925b
> 
>     profiles, 23.0, musl, amd64: fix CHOST vendor field

Why -pc-? Rust seems to prefer *-unknown-linux-musl[0], so does Void on x86_64[1]. Void on i686[2], as well as Sabotage[3], use i686-linux-musl.

I'm not aware of any musl-based distro that uses *-pc-linux-musl, so we seem to be trading one incompatibility for another.

In my experience of running Gentoo with musl for almost a decade now, *-gentoo-* has been nothing but problems. I have since dropped the vendor field altogether from all my systems and migrated them to *-linux-musl (arm, aarch64, i686, x86_64). All relevant tools seem to correctly equate the missing vendor field to 'unknown' which is the generally supported tuple.

I think we should either:
(a) get rid of the (IMHO deprecated and definitely useless in the context of Gentoo) vendor field, or
(b) set the vendor field to unknown for all arches.

[0] https://doc.rust-lang.org/nightly/rustc/platform-support.html
[1] https://github.com/void-linux/void-packages/blob/master/common/build-profiles/x86_64-musl.sh
[2] https://github.com/void-linux/void-packages/blob/master/common/build-profiles/i686-musl.sh
[3] https://github.com/sabotage-linux/sabotage/blob/master/KEEP/config.cross#L25
Comment 11 Andreas K. Hüttel archtester gentoo-dev 2024-04-10 03:50:06 UTC
This is fixed in the 23.0 profiles (available and stable now). Closing.