Skip to content

Commit

Permalink
Upgrade crosstool for loongarch64-unknown-linux-gnu target (#1540)
Browse files Browse the repository at this point in the history
Fixes #1538
  • Loading branch information
Emilgardis authored Aug 9, 2024
2 parents 7b79041 + c032534 commit 1901fd7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changes/1540.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"description": "Upgrade the crosstool for the loongarch64-unknown-linux-gnu target",
"issues": [1538],
"type": "fixed"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ terminate.
| `i686-linux-android` [1] | 9.0.8 | 9.0.8 || 6.1.0 ||
| `i686-pc-windows-gnu` | N/A | 9.4 || N/A ||
| `i686-unknown-linux-gnu` | 2.31 | 9.4.0 || 6.1.0 ||
| `loongarch64-unknown-linux-gnu` | 2.36 | 13.2.0 || 8.2.2 ||
| `loongarch64-unknown-linux-gnu` | 2.36 | 14.2.0 || 8.2.2 ||
| `mips-unknown-linux-gnu` | 2.30 | 9.4.0 || 6.1.0 ||
| `mips-unknown-linux-musl` | 1.2.3 | 9.2.0 || 6.1.0 ||
| `mips64-unknown-linux-gnuabi64` | 2.30 | 9.4.0 || 6.1.0 ||
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.loongarch64-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ FROM cross-base as build
ARG VERBOSE
COPY crosstool-ng.sh /
COPY crosstool-config/loongarch64-unknown-linux-gnu.config /
RUN /crosstool-ng.sh loongarch64-unknown-linux-gnu.config 5
RUN /crosstool-ng.sh loongarch64-unknown-linux-gnu.config 5 ed12fa68402f58e171a6f79500f73f4781fdc9e5

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

Expand Down
4 changes: 2 additions & 2 deletions docker/crosstool-config/loongarch64-unknown-linux-gnu.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ CT_GLIBC_VERSION="2.36"
CT_GLIBC_2_17_or_later=y
CT_GLIBC_later_than_2_14=y
CT_GLIBC_2_14_or_later=y
CT_GCC_V_13=y
CT_GCC_V_14=y
# CT_GCC_NO_VERSIONS is not set
CT_GCC_VERSION="13.2.0"
CT_GCC_VERSION="14.2.0"
CT_GCC_later_than_7=y
CT_GCC_7_or_later=y
CT_GCC_later_than_6=y
Expand Down
11 changes: 7 additions & 4 deletions docker/crosstool-ng.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ silence_stdout() {
main() {
local config="${1}"
local nproc="${2}"
local ctng_version=1.26.0
local ctng_url="https://github.com/crosstool-ng/crosstool-ng/archive/crosstool-ng-${ctng_version}.tar.gz"
local ctng_version=${3:-crosstool-ng-1.26.0}
local ctng_url="https://github.com/crosstool-ng/crosstool-ng"
local username=crosstool
local crosstooldir=/opt/crosstool
local buildir
Expand Down Expand Up @@ -51,8 +51,11 @@ main() {

pushd "${td}"

curl --retry 3 -sSfL "${ctng_url}" | tar xzf -
pushd "crosstool-ng-crosstool-ng-${ctng_version}"
mkdir "crosstool-ng-${ctng_version}"
pushd "crosstool-ng-${ctng_version}"
git init
git fetch --depth=1 "${ctng_url}" "${ctng_version}"
git reset --hard FETCH_HEAD
./bootstrap
./configure --prefix="${crosstooldir}"
make -j"${nproc}"
Expand Down

0 comments on commit 1901fd7

Please sign in to comment.