Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] data/gentoo-news:master commit in: 2023-01-28-rap-prefix-sysroot/
Date: Sat, 28 Jan 2023 22:14:05
Message-Id: 1674943832.3adad1954b1463ddfe5c9f7d39e308d6b57b2769.chewi@gentoo
1 commit: 3adad1954b1463ddfe5c9f7d39e308d6b57b2769
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 28 22:10:13 2023 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 28 22:10:32 2023 +0000
6 URL: https://gitweb.gentoo.org/data/gentoo-news.git/commit/?id=3adad195
7
8 2023-01-28-rap-prefix-sysroot: Add news item
9
10 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
11
12 .../2023-01-28-rap-prefix-sysroot.en.txt | 67 ++++++++++++++++++++++
13 1 file changed, 67 insertions(+)
14
15 diff --git a/2023-01-28-rap-prefix-sysroot/2023-01-28-rap-prefix-sysroot.en.txt b/2023-01-28-rap-prefix-sysroot/2023-01-28-rap-prefix-sysroot.en.txt
16 new file mode 100644
17 index 0000000..205250b
18 --- /dev/null
19 +++ b/2023-01-28-rap-prefix-sysroot/2023-01-28-rap-prefix-sysroot.en.txt
20 @@ -0,0 +1,67 @@
21 +Title: Breaking changes to the RAP Prefix toolchain
22 +Author: James Le Cuirot <chewi@g.o>
23 +Posted: 2023-01-28
24 +Revision: 1
25 +News-Item-Format: 2.0
26 +Display-If-Profile: default/linux/amd64/17.0/no-multilib/prefix/*
27 +Display-If-Profile: default/linux/amd64/17.1/no-multilib/prefix/*
28 +Display-If-Profile: default/linux/amd64/23.0/no-multilib/prefix/*
29 +Display-If-Profile: default/linux/amd64/23.0/split-usr/no-multilib/prefix/*
30 +Display-If-Profile: default/linux/arm/17.0/armv7a/prefix/*
31 +Display-If-Profile: default/linux/arm/23.0/armv7a/prefix/*
32 +Display-If-Profile: default/linux/arm/23.0/split-usr/armv7a/prefix/*
33 +Display-If-Profile: default/linux/arm64/17.0/prefix/*
34 +Display-If-Profile: default/linux/arm64/23.0/prefix/*
35 +Display-If-Profile: default/linux/arm64/23.0/split-usr/prefix/*
36 +Display-If-Profile: default/linux/ppc64le/17.0/prefix/*
37 +Display-If-Profile: default/linux/riscv/20.0/rv64gc/lp64d/prefix/*
38 +Display-If-Profile: default/linux/riscv/23.0/rv64/lp64d/prefix/*
39 +Display-If-Profile: default/linux/riscv/23.0/rv64/split-usr/lp64d/prefix/*
40 +Display-If-Profile: default/linux/x86/17.0/prefix/*
41 +Display-If-Profile: default/linux/x86/23.0/prefix/*
42 +Display-If-Profile: default/linux/x86/23.0/split-usr/prefix/*
43 +
44 +We are changing the way the toolchain operates on RAP Prefix systems in order to
45 +reduce the number of hacks we need to apply and make cross-compiling easier.
46 +
47 +If you using a non-RAP "Prefix Guest" or "Prefix Stack" variant (e.g. macOS)
48 +then this does not apply.
49 +
50 +If you're not sure what kind of prefix you have, then check whether the
51 +prefix-guest USE flag is enabled.
52 +
53 + portageq envvar USE | grep prefix-guest
54 +
55 +If you are using a libc other than glibc (e.g. musl) then this *does* apply, but
56 +your libc will *not* break, so you should not carry out the following procedure.
57 +The only other package known to be affected is dev-libs/libbsd, which you can
58 +simply update. If you find another package affected by this, then please file a
59 +bug report.
60 +
61 +WARNING! It is important that you carry out the following procedure, otherwise
62 +your toolchain will break when you next update your compiler or glibc.
63 +
64 + 1. Run the following to create a temporary symlink:
65 +
66 + EPREFIX=$(portageq envvar EPREFIX)
67 + mkdir -p "${EPREFIX}${EPREFIX%/*}"
68 + ln -sn "${EPREFIX}" "${EPREFIX}${EPREFIX}"
69 +
70 + 2. Update or rebuild all installed slots of sys-devel/gcc and sys-devel/clang
71 + (if any). Feel free to remove any you no longer need.
72 +
73 + 3. Update or rebuild sys-libs/glibc.
74 +
75 + 4. Run the following to remove the symlink:
76 +
77 + EPREFIX=$(portageq envvar EPREFIX)
78 + rm "${EPREFIX}${EPREFIX}"
79 +
80 + 5. If dev-libs/libbsd is installed, then update it to 0.11.7-r2 or later.
81 +
82 +If you are reading this having updated glibc first and you are no longer able to
83 +build anything, then don't panic. Simply execute the lines below and then carry
84 +out the regular procedure above.
85 +
86 + EPREFIX=$(portageq envvar EPREFIX)
87 + portageq contents "${EPREFIX}" $(portageq best_version "${EPREFIX}" sys-libs/glibc) | xargs grep -lIF -d skip "GNU ld script" | xargs sed -i -r "s: /(usr|lib): ${EPREFIX}/\1:g"