From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 350E915806E for ; Wed, 31 May 2023 05:54:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7780DE08C3; Wed, 31 May 2023 05:54:16 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5A41EE08C3 for ; Wed, 31 May 2023 05:54:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6E144340F5F for ; Wed, 31 May 2023 05:54:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 04D58990 for ; Wed, 31 May 2023 05:54:14 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1685512449.8eed426e460d51a59353895d574d7d4b2d4b1388.sam@gentoo> Subject: [gentoo-commits] proj/gcc-config:master commit in: / X-VCS-Repository: proj/gcc-config X-VCS-Files: README README.md X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 8eed426e460d51a59353895d574d7d4b2d4b1388 X-VCS-Branch: master Date: Wed, 31 May 2023 05:54:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 33d8a019-a90a-45e0-be0c-380ac625bef4 X-Archives-Hash: 79132ee7e15b6841d27645626fe3f63c commit: 8eed426e460d51a59353895d574d7d4b2d4b1388 Author: Berin Aniesh gmail com> AuthorDate: Tue May 30 01:45:03 2023 +0000 Commit: Sam James gentoo org> CommitDate: Wed May 31 05:54:09 2023 +0000 URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=8eed426e README: Convert README from rST to markdown Signed-off-by: Berin Aniesh gmail.com> Closes: https://github.com/gentoo/gcc-config/pull/4 Signed-off-by: Sam James gentoo.org> README | 77 -------------------------------------------------- README.md | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 77 deletions(-) diff --git a/README b/README deleted file mode 100644 index 1321f63..0000000 --- a/README +++ /dev/null @@ -1,77 +0,0 @@ -What is gcc-config? -------------------- - -gcc-config allows Gentoo users to switch active gcc safely -and allows querying facts about installed toolchains. - -To switch active gcc while system runs: - $ gcc-config x86_64-pc-linux-gnu-8.1.0 - $ gcc-config x86_64-pc-linux-gnu-7.2.0 - - Ideally changes should be visible instantly and atomically - without shell restart. - -To query where real gcc binaries are hiding: - $ gcc-config -B $(gcc-config -c) - -To parse a profile into TARGET and toolchain version: - $ gcc-config -S sparc64-unknown-linux-gnu-9.2.0 - -Files, variables, things. -------------------------- - -- Wrappers (symlinks to compiler binary like /usr/${CTARGET}/gcc-bin/${GCC_VERSION}/gcc) - /usr/bin/gcc (native) - /usr/bin/g++ (native) - /usr/bin/${CTARGET}-gcc (native and cross) - ... - (all files from /usr/${CTARGET}/gcc-bin/$GCC_VERSION/*) - - See `gcc-config` script for wrapping details. - - /usr/bin/c89 (native) - /usr/bin/c99 (native) - -- private gcc configs (provided by `toolchain.eclass`, gcc ebuilds) - - /etc/env.d/gcc/x86_64-pc-linux-gnu-8.1.0 - - Contains variables that describe toolchain layout: - - LDPATH="/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0" - MANPATH="/usr/share/gcc-data/x86_64-pc-linux-gnu/8.1.0/man" - INFOPATH="/usr/share/gcc-data/x86_64-pc-linux-gnu/8.1.0/info" - STDCXX_INCDIR="g++-v8" - CTARGET="x86_64-pc-linux-gnu" - GCC_SPECS="" - MULTIOSDIRS="../lib64" - GCC_PATH="/usr/x86_64-pc-linux-gnu/gcc-bin/8.1.0" - - Used by gcc-config to generate wrappers and 05gcc- env.d files. - -- gcc env.d compiler entries (provided by gcc-config) - - /etc/env.d/04gcc-${CTARGET} (native) - - Populates paths for native-compilers - - GCC_SPECS="" - MANPATH="/usr/share/gcc-data/x86_64-pc-linux-gnu/8.2.0/man" - INFOPATH="/usr/share/gcc-data/x86_64-pc-linux-gnu/8.2.0/info" - - Used by env-update to populate PATH and more (TODO: remove PATH population). - -TODOs ------ - -- Write proper `gcc-config` manpage off this readme to be more discoverable. - -- Figure out symlink ownership story. Today symlinks don't belong to any package. - - See https://bugs.gentoo.org/626606 - -Releasing ---------- - - $ release=2.3.1; git tag -a -s -m "release ${release}" v${release}; make dist PV=${release} - $ git push --tags origin diff --git a/README.md b/README.md new file mode 100644 index 0000000..e4effa0 --- /dev/null +++ b/README.md @@ -0,0 +1,96 @@ +# What is gcc-config? + +`gcc-config` allows Gentoo users to switch active gcc safely +and allows querying facts about installed toolchains. + +## Usage + +To switch active `gcc` while system runs: + +``` + $ gcc-config x86_64-pc-linux-gnu-8.1.0 + $ gcc-config x86_64-pc-linux-gnu-7.2.0 +``` + +Ideally changes should be visible instantly and atomically +without shell restart. + +To query where real `gcc` binaries are hiding: + +``` + $ gcc-config -B $(gcc-config -c) +``` + +To parse a profile into TARGET and toolchain version: + +``` + $ gcc-config -S sparc64-unknown-linux-gnu-9.2.0 +``` + +## Files, variables, things. + +- Wrappers (symlinks to compiler binary like `/usr/${CTARGET}/gcc-bin/${GCC_VERSION}/gcc`) + + `/usr/bin/gcc` (native) + + `/usr/bin/g++` (native) + + `/usr/bin/${CTARGET}-gcc` (native and cross) + + ... + + (all files from `/usr/${CTARGET}/gcc-bin/$GCC_VERSION/*`) + + See `gcc-config` script for wrapping details. + + `/usr/bin/c89` (native) + + `/usr/bin/c99` (native) + +- private `gcc` configs (provided by `toolchain.eclass`, gcc ebuilds) + + `/etc/env.d/gcc/x86_64-pc-linux-gnu-8.1.0` + +Contains variables that describe toolchain layout: + +``` + LDPATH="/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0" + MANPATH="/usr/share/gcc-data/x86_64-pc-linux-gnu/8.1.0/man" + INFOPATH="/usr/share/gcc-data/x86_64-pc-linux-gnu/8.1.0/info" + STDCXX_INCDIR="g++-v8" + CTARGET="x86_64-pc-linux-gnu" + GCC_SPECS="" + MULTIOSDIRS="../lib64" + GCC_PATH="/usr/x86_64-pc-linux-gnu/gcc-bin/8.1.0" +``` + + Used by `gcc-config` to generate wrappers and `05gcc-` `env.d` files. + +- `gcc` `env.d` compiler entries (provided by `gcc-config`) + + `/etc/env.d/04gcc-${CTARGET}` (native) + + Populates paths for native-compilers + +``` + GCC_SPECS="" + MANPATH="/usr/share/gcc-data/x86_64-pc-linux-gnu/8.2.0/man" + INFOPATH="/usr/share/gcc-data/x86_64-pc-linux-gnu/8.2.0/info" +``` + +Used by `env-update` to populate `$PATH` and more (TODO: remove `$PATH` population). + +## TODOs + +- Write proper `gcc-config` manpage off this readme to be more discoverable. + +- Figure out symlink ownership story. Today symlinks don't belong to any package. + + See [bug 626606](https://bugs.gentoo.org/626606) + +## Releasing + +``` + $ release=2.3.1; git tag -a -s -m "release ${release}" v${release}; make dist PV=${release} + $ git push --tags origin +```