Skip to content

Commit 1901fd7

Browse files
authored
Upgrade crosstool for loongarch64-unknown-linux-gnu target (#1540)
Fixes #1538
2 parents 7b79041 + c032534 commit 1901fd7

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

.changes/1540.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"description": "Upgrade the crosstool for the loongarch64-unknown-linux-gnu target",
3+
"issues": [1538],
4+
"type": "fixed"
5+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ terminate.
224224
| `i686-linux-android` [1] | 9.0.8 | 9.0.8 || 6.1.0 ||
225225
| `i686-pc-windows-gnu` | N/A | 9.4 || N/A ||
226226
| `i686-unknown-linux-gnu` | 2.31 | 9.4.0 || 6.1.0 ||
227-
| `loongarch64-unknown-linux-gnu` | 2.36 | 13.2.0 || 8.2.2 ||
227+
| `loongarch64-unknown-linux-gnu` | 2.36 | 14.2.0 || 8.2.2 ||
228228
| `mips-unknown-linux-gnu` | 2.30 | 9.4.0 || 6.1.0 ||
229229
| `mips-unknown-linux-musl` | 1.2.3 | 9.2.0 || 6.1.0 ||
230230
| `mips64-unknown-linux-gnuabi64` | 2.30 | 9.4.0 || 6.1.0 ||

docker/Dockerfile.loongarch64-unknown-linux-gnu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ FROM cross-base as build
1515
ARG VERBOSE
1616
COPY crosstool-ng.sh /
1717
COPY crosstool-config/loongarch64-unknown-linux-gnu.config /
18-
RUN /crosstool-ng.sh loongarch64-unknown-linux-gnu.config 5
18+
RUN /crosstool-ng.sh loongarch64-unknown-linux-gnu.config 5 ed12fa68402f58e171a6f79500f73f4781fdc9e5
1919

2020
ENV PATH /x-tools/loongarch64-unknown-linux-gnu/bin/:$PATH
2121

docker/crosstool-config/loongarch64-unknown-linux-gnu.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ CT_GLIBC_VERSION="2.36"
2121
CT_GLIBC_2_17_or_later=y
2222
CT_GLIBC_later_than_2_14=y
2323
CT_GLIBC_2_14_or_later=y
24-
CT_GCC_V_13=y
24+
CT_GCC_V_14=y
2525
# CT_GCC_NO_VERSIONS is not set
26-
CT_GCC_VERSION="13.2.0"
26+
CT_GCC_VERSION="14.2.0"
2727
CT_GCC_later_than_7=y
2828
CT_GCC_7_or_later=y
2929
CT_GCC_later_than_6=y

docker/crosstool-ng.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ silence_stdout() {
1717
main() {
1818
local config="${1}"
1919
local nproc="${2}"
20-
local ctng_version=1.26.0
21-
local ctng_url="https://github.com/crosstool-ng/crosstool-ng/archive/crosstool-ng-${ctng_version}.tar.gz"
20+
local ctng_version=${3:-crosstool-ng-1.26.0}
21+
local ctng_url="https://github.com/crosstool-ng/crosstool-ng"
2222
local username=crosstool
2323
local crosstooldir=/opt/crosstool
2424
local buildir
@@ -51,8 +51,11 @@ main() {
5151

5252
pushd "${td}"
5353

54-
curl --retry 3 -sSfL "${ctng_url}" | tar xzf -
55-
pushd "crosstool-ng-crosstool-ng-${ctng_version}"
54+
mkdir "crosstool-ng-${ctng_version}"
55+
pushd "crosstool-ng-${ctng_version}"
56+
git init
57+
git fetch --depth=1 "${ctng_url}" "${ctng_version}"
58+
git reset --hard FETCH_HEAD
5659
./bootstrap
5760
./configure --prefix="${crosstooldir}"
5861
make -j"${nproc}"

0 commit comments

Comments
 (0)