mirror of
https://github.com/google/cpu_features.git
synced 2025-07-02 13:43:18 +02:00
tools: Rework cross compilation scripts
- Use stderr for issues - Add usage to run_integration.sh (-h or --help) - deduce toolchain and qemu config from TARGET - Bump QEMU from 2.11.1 to 5.2.0 - fix qemu build on Archlinux - Bump Linaro: toolchain 7.2-2017.11 -> 7.5-2019.12 sysroot 2.25-2017.11 -> 2.25-2019.12 - Bump codescape from 2017.10-08 to 2020.06-01 - migrate from mips-r2-hard to mips-r6-hard
This commit is contained in:

committed by
Mizux

parent
239c2e5660
commit
8971bf0b0e
@ -1,84 +1,58 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source "$(dirname -- "$0")"/run_integration.sh
|
||||
|
||||
# Toolchains for little-endian, 64-bit ARMv8 for GNU/Linux systems
|
||||
function set_aarch64-linux-gnu() {
|
||||
TOOLCHAIN=LINARO
|
||||
TARGET=aarch64-linux-gnu
|
||||
QEMU_ARCH=aarch64
|
||||
export TARGET=aarch64-linux-gnu
|
||||
}
|
||||
|
||||
# Toolchains for little-endian, hard-float, 32-bit ARMv7 (and earlier) for GNU/Linux systems
|
||||
function set_arm-linux-gnueabihf() {
|
||||
TOOLCHAIN=LINARO
|
||||
TARGET=arm-linux-gnueabihf
|
||||
QEMU_ARCH=arm
|
||||
export TARGET=arm-linux-gnueabihf
|
||||
}
|
||||
|
||||
# Toolchains for little-endian, 32-bit ARMv8 for GNU/Linux systems
|
||||
function set_armv8l-linux-gnueabihf() {
|
||||
TOOLCHAIN=LINARO
|
||||
TARGET=armv8l-linux-gnueabihf
|
||||
QEMU_ARCH=arm
|
||||
export TARGET=armv8l-linux-gnueabihf
|
||||
}
|
||||
|
||||
# Toolchains for little-endian, soft-float, 32-bit ARMv7 (and earlier) for GNU/Linux systems
|
||||
function set_arm-linux-gnueabi() {
|
||||
TOOLCHAIN=LINARO
|
||||
TARGET=arm-linux-gnueabi
|
||||
QEMU_ARCH=arm
|
||||
export TARGET=arm-linux-gnueabi
|
||||
}
|
||||
|
||||
# Toolchains for big-endian, 64-bit ARMv8 for GNU/Linux systems
|
||||
function set_aarch64_be-linux-gnu() {
|
||||
TOOLCHAIN=LINARO
|
||||
TARGET=aarch64_be-linux-gnu
|
||||
QEMU_ARCH=DISABLED
|
||||
export TARGET=aarch64_be-linux-gnu
|
||||
}
|
||||
|
||||
# Toolchains for big-endian, hard-float, 32-bit ARMv7 (and earlier) for GNU/Linux systems
|
||||
function set_armeb-linux-gnueabihf() {
|
||||
TOOLCHAIN=LINARO
|
||||
TARGET=armeb-linux-gnueabihf
|
||||
QEMU_ARCH=DISABLED
|
||||
export TARGET=armeb-linux-gnueabihf
|
||||
}
|
||||
|
||||
# Toolchains for big-endian, soft-float, 32-bit ARMv7 (and earlier) for GNU/Linux systems
|
||||
function set_armeb-linux-gnueabi() {
|
||||
TOOLCHAIN=LINARO
|
||||
TARGET=armeb-linux-gnueabi
|
||||
QEMU_ARCH=DISABLED
|
||||
export TARGET=armeb-linux-gnueabi
|
||||
}
|
||||
|
||||
function set_mips32() {
|
||||
TOOLCHAIN=CODESCAPE
|
||||
TARGET=mips32
|
||||
QEMU_ARCH=mips
|
||||
export TARGET=mips32
|
||||
}
|
||||
|
||||
function set_mips32el() {
|
||||
TOOLCHAIN=CODESCAPE
|
||||
TARGET=mips32el
|
||||
QEMU_ARCH=mipsel
|
||||
export TARGET=mips32el
|
||||
}
|
||||
|
||||
function set_mips64() {
|
||||
TOOLCHAIN=CODESCAPE
|
||||
TARGET=mips64
|
||||
QEMU_ARCH=mips64
|
||||
export TARGET=mips64
|
||||
}
|
||||
|
||||
function set_mips64el() {
|
||||
TOOLCHAIN=CODESCAPE
|
||||
TARGET=mips64el
|
||||
QEMU_ARCH=mips64el
|
||||
export TARGET=mips64el
|
||||
}
|
||||
|
||||
function set_native() {
|
||||
TOOLCHAIN=NATIVE
|
||||
TARGET=native
|
||||
QEMU_ARCH=""
|
||||
function set_x86_64() {
|
||||
export TARGET=x86_64
|
||||
}
|
||||
|
||||
ENVIRONMENTS="
|
||||
@ -93,14 +67,13 @@ ENVIRONMENTS="
|
||||
set_mips32el
|
||||
set_mips64
|
||||
set_mips64el
|
||||
set_native
|
||||
set_x86_64
|
||||
"
|
||||
|
||||
set -e
|
||||
|
||||
CMAKE_GENERATOR="Ninja"
|
||||
|
||||
for SET_ENVIRONMENT in ${ENVIRONMENTS}; do
|
||||
echo "testing ${SET_ENVIRONMENT}"
|
||||
${SET_ENVIRONMENT}
|
||||
expand_environment_and_integrate
|
||||
./"$(dirname -- "$0")"/run_integration.sh
|
||||
done
|
||||
|
Reference in New Issue
Block a user