Skip to content

Commit

Permalink
tools: remove linaro toolchains
Browse files Browse the repository at this point in the history
not working anymore, no update, bootlin can replace them...
  • Loading branch information
Mizux committed Jul 8, 2024
1 parent 53e1275 commit ca1f63b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 80 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/aarch64_toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:
# https://go.dev/doc/install/source#environment
arm64, # alias to aarch64
arm64be, # alias to aarch64be
aarch64-linux-gnu, # linaro
aarch64_be-linux-gnu, # linaro
aarch64, # bootlin
aarch64be # bootlin
]
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/arm_toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ jobs:
# https://go.dev/doc/install/source#environment
arm, # alias to armv7-eabihf
armeb, # alias to armv7eb-eabihf
arm-linux-gnueabihf, # linaro
armv8l-linux-gnueabihf, # linaro
arm-linux-gnueabi, # linaro
armeb-linux-gnueabihf, # linaro
armeb-linux-gnueabi, # linaro
armv7-eabihf, # bootlin
armebv7-eabihf #bootlin
]
Expand Down
17 changes: 4 additions & 13 deletions ci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,6 @@ help:
@echo -e "\t${BOLD}clean_toolchains${RESET}: Remove ALL cache and docker image."
@echo
@echo -e "\tWith ${BOLD}<toolchain>${RESET}:"
@echo -e "\t\t${BOLD}arm-linux-gnueabihf${RESET} (linaro toolchain)"
@echo -e "\t\t${BOLD}armv8l-linux-gnueabihf${RESET} (linaro toolchain)"
@echo -e "\t\t${BOLD}arm-linux-gnueabi${RESET} (linaro toolchain)"
@echo -e "\t\t${BOLD}armeb-linux-gnueabihf${RESET} (linaro toolchain)"
@echo -e "\t\t${BOLD}armeb-linux-gnueabi${RESET} (linaro toolchain)"
@echo -e "\t\t${BOLD}aarch64-linux-gnu${RESET} (linaro toolchain)"
@echo -e "\t\t${BOLD}aarch64_be-linux-gnu${RESET} (linaro toolchain)"
@echo -e "\t\t${BOLD}armv7-eabihf${RESET} (alias: arm) (bootlin toolchain)"
@echo -e "\t\t${BOLD}armebv7-eabihf${RESET} (alias: armeb) (bootlin toolchain)"
@echo -e "\t\t${BOLD}aarch64${RESET} (alias: arm64) (bootlin toolchain)"
Expand Down Expand Up @@ -289,16 +282,14 @@ clean_platforms: $(addprefix clean_, $(PLATFORMS))
## TOOLCHAIN ##
###############
TOOLCHAIN_TARGETS = \
arm-linux-gnueabihf armv8l-linux-gnueabihf arm-linux-gnueabi armeb-linux-gnueabihf armeb-linux-gnueabi \
aarch64-linux-gnu aarch64_be-linux-gnu \
mips mips32-r6 mips32-r2 \
mipsle mips32el-r6 mips32el-r2 \
mips64 mips64-r6 mips64-r2 \
mips64le mips64el-r6 mips64el-r2 \
arm armv7-eabihf \
armeb armebv7-eabihf \
arm64 aarch64 \
arm64be aarch64be \
mips mips32-r6 mips32-r2 \
mipsle mips32el-r6 mips32el-r2 \
mips64 mips64-r6 mips64-r2 \
mips64le mips64el-r6 mips64el-r2 \
ppc ppc-440fp ppc-e500mc \
ppc64 ppc64-power8 \
ppc64le ppc64le-power8 \
Expand Down
60 changes: 0 additions & 60 deletions tools/cross_compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -311,50 +311,6 @@ local -r LIBC_DIR=${GCC_DIR}/${GCC_PREFIX}/lib/${FLAVOUR}/${LIBC_DIR_SUFFIX}
QEMU_ARGS+=( -E LD_PRELOAD="${LIBC_DIR}/libstdc++.so.6:${LIBC_DIR}/libgcc_s.so.1" )
}

function expand_linaro_config() {
#ref: https://releases.linaro.org/components/toolchain/binaries/
local -r LINARO_VERSION=7.5-2019.12
local -r LINARO_ROOT_URL=https://releases.linaro.org/components/toolchain/binaries/${LINARO_VERSION}

local -r GCC_VERSION=7.5.0-2019.12
local -r GCC_URL=${LINARO_ROOT_URL}/${TARGET}/gcc-linaro-${GCC_VERSION}-x86_64_${TARGET}.tar.xz
local -r GCC_RELATIVE_DIR="gcc-linaro-${GCC_VERSION}-x86_64_${TARGET}"
unpack "${GCC_URL}" "${GCC_RELATIVE_DIR}"

local -r SYSROOT_VERSION=2.25-2019.12
local -r SYSROOT_URL=${LINARO_ROOT_URL}/${TARGET}/sysroot-glibc-linaro-${SYSROOT_VERSION}-${TARGET}.tar.xz
local -r SYSROOT_RELATIVE_DIR=sysroot-glibc-linaro-${SYSROOT_VERSION}-${TARGET}
unpack "${SYSROOT_URL}" "${SYSROOT_RELATIVE_DIR}"

local -r SYSROOT_DIR=${ARCHIVE_DIR}/${SYSROOT_RELATIVE_DIR}
local -r STAGING_DIR=${ARCHIVE_DIR}/${SYSROOT_RELATIVE_DIR}-stage
local -r GCC_DIR=${ARCHIVE_DIR}/${GCC_RELATIVE_DIR}

# Write a Toolchain file
# note: This is manadatory to use a file in order to have the CMake variable
# 'CMAKE_CROSSCOMPILING' set to TRUE.
# ref: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-linux
cat >"$TOOLCHAIN_FILE" <<EOL
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR ${TARGET})
set(CMAKE_SYSROOT ${SYSROOT_DIR})
set(CMAKE_STAGING_PREFIX ${STAGING_DIR})
set(tools ${GCC_DIR})
set(CMAKE_C_COMPILER \${tools}/bin/${TARGET}-gcc)
set(CMAKE_CXX_COMPILER \${tools}/bin/${TARGET}-g++)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
EOL
CMAKE_ADDITIONAL_ARGS+=( -DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN_FILE}" )
QEMU_ARGS+=( -L "${SYSROOT_DIR}" )
QEMU_ARGS+=( -E LD_LIBRARY_PATH=/lib )
}

function build() {
cd "${PROJECT_DIR}" || exit 2
set -x
Expand Down Expand Up @@ -398,9 +354,6 @@ DESCRIPTION
\t\tx86_64
\t\tarmv7-eabihf(arm) armebv7-eabihf(armeb) (bootlin)
\t\taarch64(arm64) aarch64be(arm64be) (bootlin)
\t\taarch64-linux-gnu aarch64_be-linux-gnu (linaro)
\t\tarm-linux-gnueabihf armv8l-linux-gnueabihf arm-linux-gnueabi (linaro)
\t\tarmeb-linux-gnueabihf armeb-linux-gnueabi (linaro)
\t\tmips32-r6(mips) mips32el-r6(mipsle) mips32-r2 mips32el-r2 (codespace)
\t\tmips64-r6(mips64) mips64el-r6(mips64le) mips64-r2 mips64el-r2 (codespace)
\t\tppc-440fp(ppc) ppc-e500mc (bootlin)
Expand Down Expand Up @@ -456,19 +409,6 @@ function main() {
x86_64)
declare -r QEMU_ARCH=x86_64 ;;

arm-linux-gnueabihf | armv8l-linux-gnueabihf | arm-linux-gnueabi)
expand_linaro_config
declare -r QEMU_ARCH=arm ;;
armeb-linux-gnueabihf | armeb-linux-gnueabi)
expand_linaro_config
declare -r QEMU_ARCH=DISABLED ;;
aarch64-linux-gnu)
expand_linaro_config
declare -r QEMU_ARCH=aarch64 ;;
aarch64_be-linux-gnu)
expand_linaro_config
declare -r QEMU_ARCH=aarch64_be ;;

arm | armv7-eabihf)
expand_bootlin_config
declare -r QEMU_ARCH=arm ;;
Expand Down

0 comments on commit ca1f63b

Please sign in to comment.