Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit 42da841

Browse files
committed
update docs for system-build-tools
1 parent 8c82318 commit 42da841

File tree

2 files changed

+26
-11
lines changed

2 files changed

+26
-11
lines changed

docs/en/develop/system-build-tools.md

+13-5
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ endif
124124
COMMON_CONFIG += CFLAGS="${FLAG}" CXXFLAGS="${FLAG}" LDFLAGS="${STAT}"
125125

126126
BINUTILS_CONFIG += --enable-gold=yes --enable-gprofng=no
127-
GCC_CONFIG += --enable-static-pie --disable-cet
127+
GCC_CONFIG += --enable-static-pie --disable-cet --enable-default-pie
128128
#--enable-default-pie
129129

130130
CONFIG_SUB_REV = 888c8e3d5f7b
131-
GCC_VER = 11.4.0
131+
GCC_VER = 13.2.0
132132
BINUTILS_VER = 2.40
133133
MUSL_VER = 1.2.4
134134
GMP_VER = 6.2.1
@@ -137,10 +137,16 @@ MPFR_VER = 4.2.0
137137
LINUX_VER = 6.1.36
138138
```
139139

140+
And also you need to add `gcc-13.2.0.tar.xz.sha1` file, contents here:
141+
142+
```
143+
5f95b6d042fb37d45c6cbebfc91decfbc4fb493c gcc-13.2.0.tar.xz
144+
```
145+
140146
If you are using Docker to build, create a new `Dockerfile` file and write the following content:
141147

142148
```dockerfile
143-
FROM alpine:3.18.4
149+
FROM alpine:edge
144150

145151
RUN apk add --no-cache \
146152
gcc g++ git make curl perl \
@@ -158,9 +164,10 @@ WORKDIR /opt
158164
RUN git clone https://git.zv.io/toolchains/musl-cross-make.git
159165
WORKDIR /opt/musl-cross-make
160166
COPY config.mak /opt/musl-cross-make
167+
COPY gcc-13.2.0.tar.xz.sha1 /opt/musl-cross-make/hashes
161168

162169
RUN make TARGET=x86_64-linux-musl -j || :
163-
RUN sed -i 's/poison calloc/poison/g' ./gcc-11.4.0/gcc/system.h
170+
RUN sed -i 's/poison calloc/poison/g' ./gcc-13.2.0/gcc/system.h
164171
RUN make TARGET=x86_64-linux-musl -j
165172
RUN make TARGET=x86_64-linux-musl install -j
166173
RUN tar cvzf x86_64-musl-toolchain.tgz output/*
@@ -184,9 +191,10 @@ git clone https://git.zv.io/toolchains/musl-cross-make.git
184191
# Copy config.mak to the working directory of musl-cross-make.
185192
# You need to replace /path/to/config.mak with your config.mak file path.
186193
cp /path/to/config.mak musl-cross-make/
194+
cp /path/to/gcc-13.2.0.tar.xz.sha1 musl-cross-make/hashes
187195

188196
make TARGET=x86_64-linux-musl -j || :
189-
sed -i 's/poison calloc/poison/g' ./gcc-11.4.0/gcc/system.h
197+
sed -i 's/poison calloc/poison/g' ./gcc-13.2.0/gcc/system.h
190198
make TARGET=x86_64-linux-musl -j
191199
make TARGET=x86_64-linux-musl install -j
192200
tar cvzf x86_64-musl-toolchain.tgz output/*

docs/zh/develop/system-build-tools.md

+13-6
Original file line numberDiff line numberDiff line change
@@ -99,24 +99,29 @@ endif
9999
COMMON_CONFIG += CFLAGS="${FLAG}" CXXFLAGS="${FLAG}" LDFLAGS="${STAT}"
100100

101101
BINUTILS_CONFIG += --enable-gold=yes --enable-gprofng=no
102-
GCC_CONFIG += --enable-static-pie --disable-cet
102+
GCC_CONFIG += --enable-static-pie --disable-cet --enable-default-pie
103103
#--enable-default-pie
104104

105105
CONFIG_SUB_REV = 888c8e3d5f7b
106-
GCC_VER = 11.4.0
106+
GCC_VER = 13.2.0
107107
BINUTILS_VER = 2.40
108108
MUSL_VER = 1.2.4
109109
GMP_VER = 6.2.1
110110
MPC_VER = 1.2.1
111111
MPFR_VER = 4.2.0
112-
113112
LINUX_VER = 6.1.36
114113
```
115114

115+
同时,你需要新建一个 `gcc-13.2.0.tar.xz.sha1` 文件,文件内容如下:
116+
117+
```
118+
5f95b6d042fb37d45c6cbebfc91decfbc4fb493c gcc-13.2.0.tar.xz
119+
```
120+
116121
如果你使用的是 Docker 构建,新建一个 `Dockerfile` 文件,写入以下内容:
117122

118123
```dockerfile
119-
FROM alpine:3.18.4
124+
FROM alpine:edge
120125

121126
RUN apk add --no-cache \
122127
gcc g++ git make curl perl \
@@ -134,9 +139,10 @@ WORKDIR /opt
134139
RUN git clone https://git.zv.io/toolchains/musl-cross-make.git
135140
WORKDIR /opt/musl-cross-make
136141
COPY config.mak /opt/musl-cross-make
142+
COPY gcc-13.2.0.tar.xz.sha1 /opt/musl-cross-make/hashes
137143

138144
RUN make TARGET=x86_64-linux-musl -j || :
139-
RUN sed -i 's/poison calloc/poison/g' ./gcc-11.4.0/gcc/system.h
145+
RUN sed -i 's/poison calloc/poison/g' ./gcc-13.2.0/gcc/system.h
140146
RUN make TARGET=x86_64-linux-musl -j
141147
RUN make TARGET=x86_64-linux-musl install -j
142148
RUN tar cvzf x86_64-musl-toolchain.tgz output/*
@@ -159,9 +165,10 @@ ccache libarchive-tools zip
159165
git clone https://git.zv.io/toolchains/musl-cross-make.git
160166
# 将 config.mak 拷贝到 musl-cross-make 的工作目录内,你需要将 /path/to/config.mak 替换为你的 config.mak 文件路径
161167
cp /path/to/config.mak musl-cross-make/
168+
cp /path/to/gcc-13.2.0.tar.xz.sha1 musl-cross-make/hashes
162169

163170
make TARGET=x86_64-linux-musl -j || :
164-
sed -i 's/poison calloc/poison/g' ./gcc-11.4.0/gcc/system.h
171+
sed -i 's/poison calloc/poison/g' ./gcc-13.2.0/gcc/system.h
165172
make TARGET=x86_64-linux-musl -j
166173
make TARGET=x86_64-linux-musl install -j
167174
tar cvzf x86_64-musl-toolchain.tgz output/*

0 commit comments

Comments
 (0)