Skip to content

Commit

Permalink
Include sysroots from Debian 6 up to 9
Browse files Browse the repository at this point in the history
Also allow cross-compiling software to these targets by adding wrappers that calls GCC/G++ with the appropriate --sysroot option.
  • Loading branch information
Kartatz committed Aug 21, 2024
1 parent 335914a commit b7ec248
Show file tree
Hide file tree
Showing 49 changed files with 488 additions and 1,323 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
id: check-cache
uses: actions/cache@main
with:
key: gcc-14.2.0
key: gcc-14.2.0-1
lookup-only: true
path: |
/tmp/x86_64-linux-gnu.tar.xz
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
if: ${{ steps.check-cache.outputs.cache-hit != 'true' }}
uses: actions/cache@main
with:
key: gcc-14.2.0
key: gcc-14.2.0-1
path: |
/tmp/x86_64-linux-gnu.tar.xz
/tmp/x86_64-linux-gnu.tar.xz.sha256
Expand Down Expand Up @@ -79,14 +79,10 @@ jobs:
- uses: actions/checkout@main
with:
submodules: true
- name: Setup Python
uses: actions/setup-python@main
with:
python-version: '3.12'
- name: Restore from cache
uses: actions/cache@main
with:
key: gcc-14.2.0
key: gcc-14.2.0-1
fail-on-cache-miss: true
path: |
/tmp/x86_64-linux-gnu.tar.xz
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "submodules/debian-sysroot"]
path = submodules/debian-sysroot
url = https://github.com/AmanoTeam/debian-sysroot
8 changes: 4 additions & 4 deletions aarch64-unknown-linux-gnu.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash

declare packages=(
'https://web.archive.org/web/0if_/https://archive.debian.org/debian/pool/main/l/linux/linux-libc-dev_3.16.56-1+deb8u1_arm64.deb'
'https://web.archive.org/web/0if_/https://archive.debian.org/debian/pool/main/g/glibc/libc6-dev_2.19-18+deb8u10_arm64.deb'
'https://web.archive.org/web/0if_/https://archive.debian.org/debian/pool/main/g/glibc/libc6_2.19-18+deb8u10_arm64.deb'
'https://web.archive.org/web/0if_/https://archive.debian.org/debian/pool/main/s/systemtap/systemtap-sdt-dev_2.6-0.2_arm64.deb'
'https://archive.debian.org/debian/pool/main/l/linux/linux-libc-dev_3.16.56-1+deb8u1_arm64.deb'
'https://archive.debian.org/debian/pool/main/g/glibc/libc6-dev_2.19-18+deb8u10_arm64.deb'
'https://archive.debian.org/debian/pool/main/g/glibc/libc6_2.19-18+deb8u10_arm64.deb'
'https://archive.debian.org/debian/pool/main/s/systemtap/systemtap-sdt-dev_2.6-0.2_arm64.deb'
)

declare extra_configure_flags=''
Expand Down
6 changes: 3 additions & 3 deletions alpha-unknown-linux-gnu.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

declare packages=(
'https://web.archive.org/web/0if_/https://archive.debian.org/debian/pool/main/l/linux-2.6/linux-libc-dev_2.6.26-29_alpha.deb'
'https://web.archive.org/web/0if_/https://archive.debian.org/debian/pool/main/g/glibc/libc6.1-dev_2.7-18lenny7_alpha.deb'
'https://web.archive.org/web/0if_/https://archive.debian.org/debian/pool/main/g/glibc/libc6.1_2.7-18lenny7_alpha.deb'
'https://archive.debian.org/debian/pool/main/l/linux-2.6/linux-libc-dev_2.6.26-29_alpha.deb'
'https://archive.debian.org/debian/pool/main/g/glibc/libc6.1-dev_2.7-18lenny7_alpha.deb'
'https://archive.debian.org/debian/pool/main/g/glibc/libc6.1_2.7-18lenny7_alpha.deb'
)

declare extra_configure_flags=''
Expand Down
6 changes: 3 additions & 3 deletions arm-unknown-linux-gnueabi.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

declare packages=(
'https://web.archive.org/web/0if_/https://archive.debian.org/debian/pool/main/l/linux-2.6/linux-libc-dev_2.6.26-29_armel.deb'
'https://web.archive.org/web/0if_/https://archive.debian.org/debian/pool/main/g/glibc/libc6-dev_2.7-18lenny7_armel.deb'
'https://web.archive.org/web/0if_/https://archive.debian.org/debian/pool/main/g/glibc/libc6_2.7-18lenny7_armel.deb'
'https://archive.debian.org/debian/pool/main/l/linux-2.6/linux-libc-dev_2.6.26-29_armel.deb'
'https://archive.debian.org/debian/pool/main/g/glibc/libc6-dev_2.7-18lenny7_armel.deb'
'https://archive.debian.org/debian/pool/main/g/glibc/libc6_2.7-18lenny7_armel.deb'
)

declare extra_configure_flags='--with-arch=armv4t --with-float=soft --disable-libsanitizer'
Expand Down
8 changes: 4 additions & 4 deletions arm-unknown-linux-gnueabihf.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash

declare packages=(
'https://web.archive.org/web/0if_/https://archive.debian.org/debian-security/pool/updates/main/l/linux/linux-libc-dev_3.2.102-1_armhf.deb'
'https://web.archive.org/web/0if_/https://archive.debian.org/debian-security/pool/updates/main/e/eglibc/libc6-dev_2.13-38+deb7u12_armhf.deb'
'https://web.archive.org/web/0if_/https://archive.debian.org/debian-security/pool/updates/main/e/eglibc/libc6_2.13-38+deb7u12_armhf.deb'
'https://web.archive.org/web/0if_/https://archive.debian.org/debian/pool/main/s/systemtap/systemtap-sdt-dev_1.7-1+deb7u1_armhf.deb'
'https://archive.debian.org/debian-security/pool/updates/main/l/linux/linux-libc-dev_3.2.102-1_armhf.deb'
'https://archive.debian.org/debian-security/pool/updates/main/e/eglibc/libc6-dev_2.13-38+deb7u12_armhf.deb'
'https://archive.debian.org/debian-security/pool/updates/main/e/eglibc/libc6_2.13-38+deb7u12_armhf.deb'
'https://archive.debian.org/debian/pool/main/s/systemtap/systemtap-sdt-dev_1.7-1+deb7u1_armhf.deb'
)

declare extra_configure_flags='--with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb'
Expand Down
32 changes: 31 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ for target in "${targets[@]}"; do
--with-static-standard-libraries \
--with-bugurl='https://github.com/AmanoTeam/obggcc/issues' \
--with-gcc-major-version-only \
--with-pkgversion="OBGGCC v0.8-${obggcc_revision}" \
--with-pkgversion="OBGGCC v0.9-${obggcc_revision}" \
--with-sysroot="${toolchain_directory}/${triple}" \
--with-native-system-header-dir='/include' \
--enable-__cxa_atexit \
Expand Down Expand Up @@ -301,3 +301,33 @@ for target in "${targets[@]}"; do
patchelf --add-rpath '$ORIGIN/../../../../lib' "${toolchain_directory}/libexec/gcc/${triple}/"*'/cc1plus'
patchelf --add-rpath '$ORIGIN/../../../../lib' "${toolchain_directory}/libexec/gcc/${triple}/"*'/lto1'
done

rm --recursive "${toolchain_directory}/${triple}"

declare cc='gcc'

if ! (( is_native )); then
cc="${CC}"
fi

declare -r sysroot_tarball='/tmp/sysroot.tar.xz'
declare -r executable='/tmp/gcc-wrapper'

while read item; do
declare glibc_version="$(jq '.glibc_version' <<< "${item}")"
declare triplet="$(jq --raw-output '.triplet' <<< "${item}")"

"${cc}" \
"${workdir}/tools/gcc-wrapper/filesystem.c" \
"${workdir}/tools/gcc-wrapper/main.c" \
"${workdir}/tools/gcc-wrapper/path.c" \
-Os \
-s \
-o "${executable}"

cp "${executable}" "${toolchain_directory}/bin/${triplet}${glibc_version}-gcc"
cp "${executable}" "${toolchain_directory}/bin/${triplet}${glibc_version}-g++"

wget --no-verbose "https://github.com/AmanoTeam/debian-sysroot/releases/latest/download/${triplet}${glibc_version}.tar.xz" --output-document="${sysroot_tarball}"
tar --directory="${toolchain_directory}" --extract --file="${sysroot_tarball}"
done <<< "$(jq --compact-output '.[]' "${workdir}/submodules/debian-sysroot/dist.json")"
6 changes: 3 additions & 3 deletions hppa-unknown-linux-gnu.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

declare packages=(
'https://web.archive.org/web/0if_/https://archive.debian.org/debian/pool/main/l/linux-2.6/linux-libc-dev_2.6.26-29_hppa.deb'
'https://web.archive.org/web/0if_/https://archive.debian.org/debian/pool/main/g/glibc/libc6-dev_2.7-18lenny7_hppa.deb'
'https://web.archive.org/web/0if_/https://archive.debian.org/debian/pool/main/g/glibc/libc6_2.7-18lenny7_hppa.deb'
'https://archive.debian.org/debian/pool/main/l/linux-2.6/linux-libc-dev_2.6.26-29_hppa.deb'
'/https://archive.debian.org/debian/pool/main/g/glibc/libc6-dev_2.7-18lenny7_hppa.deb'
'https://archive.debian.org/debian/pool/main/g/glibc/libc6_2.7-18lenny7_hppa.deb'
)

declare extra_configure_flags='--disable-libsanitizer'
Expand Down
1 change: 1 addition & 0 deletions submodules/debian-sysroot
Submodule debian-sysroot added at 8cd10c
7 changes: 4 additions & 3 deletions toolchains/aarch64-unknown-linux-gnu.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "aarch64")

set(TOOLCHAIN_PREFIX "${CMAKE_SYSTEM_PROCESSOR}-unknown-linux-gnu")
set(TARGET_GLIBC "2.19")
set(TOOLCHAIN_PREFIX "${CMAKE_SYSTEM_PROCESSOR}-unknown-linux-gnu${TARGET_GLIBC}")

set(TOOLCHAIN_PATH "$ENV{OBGGCC_TOOLCHAIN}")

set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-g++" CACHE FILEPATH "c++")
set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-g++" CACHE FILEPATH "c++")
set(CMAKE_AR "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ar" CACHE FILEPATH "ar")
set(CMAKE_RANLIB "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ranlib" CACHE FILEPATH "ranlib")
set(CMAKE_STRIP "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-strip" CACHE FILEPATH "strip")
Expand Down
5 changes: 3 additions & 2 deletions toolchains/aarch64-unknown-linux-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

set -eu

TARGET_GLIBC="2.19"
CROSS_COMPILE_TRIPLET='aarch64-unknown-linux-gnu'

CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-g++"
CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-g++"
AR="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ar"
AS="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-as"
LD="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ld"
Expand Down
5 changes: 3 additions & 2 deletions toolchains/alpha-unknown-linux-gnu.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "alpha")

set(TARGET_GLIBC "2.7")
set(TOOLCHAIN_PREFIX "${CMAKE_SYSTEM_PROCESSOR}-unknown-linux-gnu")

set(TOOLCHAIN_PATH "$ENV{OBGGCC_TOOLCHAIN}")

set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-g++" CACHE FILEPATH "c++")
set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-g++" CACHE FILEPATH "c++")
set(CMAKE_AR "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ar" CACHE FILEPATH "ar")
set(CMAKE_RANLIB "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ranlib" CACHE FILEPATH "ranlib")
set(CMAKE_STRIP "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-strip" CACHE FILEPATH "strip")
Expand Down
5 changes: 3 additions & 2 deletions toolchains/alpha-unknown-linux-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

set -eu

TARGET_GLIBC='2.7'
CROSS_COMPILE_TRIPLET='alpha-unknown-linux-gnu'

CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-g++"
CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-g++"
AR="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ar"
AS="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-as"
LD="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ld"
Expand Down
5 changes: 3 additions & 2 deletions toolchains/arm-unknown-linux-gnueabi.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "arm")

set(TARGET_GLIBC "2.7")
set(TOOLCHAIN_PREFIX "${CMAKE_SYSTEM_PROCESSOR}-unknown-linux-gnueabi")

set(TOOLCHAIN_PATH "$ENV{OBGGCC_TOOLCHAIN}")

set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-g++" CACHE FILEPATH "c++")
set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-g++" CACHE FILEPATH "c++")
set(CMAKE_AR "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ar" CACHE FILEPATH "ar")
set(CMAKE_RANLIB "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ranlib" CACHE FILEPATH "ranlib")
set(CMAKE_STRIP "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-strip" CACHE FILEPATH "strip")
Expand Down
5 changes: 3 additions & 2 deletions toolchains/arm-unknown-linux-gnueabi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

set -eu

TARGET_GLIBC='2.7'
CROSS_COMPILE_TRIPLET='arm-unknown-linux-gnueabi'

CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-g++"
CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-g++"
AR="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ar"
AS="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-as"
LD="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ld"
Expand Down
5 changes: 3 additions & 2 deletions toolchains/arm-unknown-linux-gnueabihf.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "arm")

set(TARGET_GLIBC "2.13")
set(TOOLCHAIN_PREFIX "${CMAKE_SYSTEM_PROCESSOR}-unknown-linux-gnueabihf")

set(TOOLCHAIN_PATH "$ENV{OBGGCC_TOOLCHAIN}")

set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-g++" CACHE FILEPATH "c++")
set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-g++" CACHE FILEPATH "c++")
set(CMAKE_AR "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ar" CACHE FILEPATH "ar")
set(CMAKE_RANLIB "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ranlib" CACHE FILEPATH "ranlib")
set(CMAKE_STRIP "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-strip" CACHE FILEPATH "strip")
Expand Down
5 changes: 3 additions & 2 deletions toolchains/arm-unknown-linux-gnueabihf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

set -eu

TARGET_GLIBC='2.13'
CROSS_COMPILE_TRIPLET='arm-unknown-linux-gnueabihf'

CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-g++"
CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-g++"
AR="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ar"
AS="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-as"
LD="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ld"
Expand Down
5 changes: 3 additions & 2 deletions toolchains/hppa-unknown-linux-gnu.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "hppa")

set(TARGET_GLIBC "2.7")
set(TOOLCHAIN_PREFIX "${CMAKE_SYSTEM_PROCESSOR}-unknown-linux-gnu")

set(TOOLCHAIN_PATH "$ENV{OBGGCC_TOOLCHAIN}")

set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-g++" CACHE FILEPATH "c++")
set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-g++" CACHE FILEPATH "c++")
set(CMAKE_AR "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ar" CACHE FILEPATH "ar")
set(CMAKE_RANLIB "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ranlib" CACHE FILEPATH "ranlib")
set(CMAKE_STRIP "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-strip" CACHE FILEPATH "strip")
Expand Down
5 changes: 3 additions & 2 deletions toolchains/hppa-unknown-linux-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

set -eu

TARGET_GLIBC='2.7'
CROSS_COMPILE_TRIPLET='hppa-unknown-linux-gnu'

CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-g++"
CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-g++"
AR="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ar"
AS="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-as"
LD="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ld"
Expand Down
5 changes: 3 additions & 2 deletions toolchains/i386-unknown-linux-gnu.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "i386")

set(TARGET_GLIBC "2.7")
set(TOOLCHAIN_PREFIX "${CMAKE_SYSTEM_PROCESSOR}-unknown-linux-gnu")

set(TOOLCHAIN_PATH "$ENV{OBGGCC_TOOLCHAIN}")

set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-g++" CACHE FILEPATH "c++")
set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-g++" CACHE FILEPATH "c++")
set(CMAKE_AR "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ar" CACHE FILEPATH "ar")
set(CMAKE_RANLIB "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ranlib" CACHE FILEPATH "ranlib")
set(CMAKE_STRIP "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-strip" CACHE FILEPATH "strip")
Expand Down
5 changes: 3 additions & 2 deletions toolchains/i386-unknown-linux-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

set -eu

TARGET_GLIBC='2.7'
CROSS_COMPILE_TRIPLET='i386-unknown-linux-gnu'

CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-g++"
CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-g++"
AR="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ar"
AS="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-as"
LD="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ld"
Expand Down
5 changes: 3 additions & 2 deletions toolchains/ia64-unknown-linux-gnu.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "ia64")

set(TARGET_GLIBC "2.7")
set(TOOLCHAIN_PREFIX "${CMAKE_SYSTEM_PROCESSOR}-unknown-linux-gnu")

set(TOOLCHAIN_PATH "$ENV{OBGGCC_TOOLCHAIN}")

set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-g++" CACHE FILEPATH "c++")
set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-g++" CACHE FILEPATH "c++")
set(CMAKE_AR "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ar" CACHE FILEPATH "ar")
set(CMAKE_RANLIB "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ranlib" CACHE FILEPATH "ranlib")
set(CMAKE_STRIP "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-strip" CACHE FILEPATH "strip")
Expand Down
5 changes: 3 additions & 2 deletions toolchains/ia64-unknown-linux-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

set -eu

TARGET_GLIBC='2.7'
CROSS_COMPILE_TRIPLET='ia64-unknown-linux-gnu'

CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-g++"
CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-g++"
AR="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ar"
AS="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-as"
LD="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ld"
Expand Down
5 changes: 3 additions & 2 deletions toolchains/mips-unknown-linux-gnu.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "mips")

set(TARGET_GLIBC "2.7")
set(TOOLCHAIN_PREFIX "${CMAKE_SYSTEM_PROCESSOR}-unknown-linux-gnu")

set(TOOLCHAIN_PATH "$ENV{OBGGCC_TOOLCHAIN}")

set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-g++" CACHE FILEPATH "c++")
set(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-gcc" CACHE FILEPATH "cc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}${TARGET_GLIBC}-g++" CACHE FILEPATH "c++")
set(CMAKE_AR "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ar" CACHE FILEPATH "ar")
set(CMAKE_RANLIB "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-ranlib" CACHE FILEPATH "ranlib")
set(CMAKE_STRIP "${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX}-strip" CACHE FILEPATH "strip")
Expand Down
5 changes: 3 additions & 2 deletions toolchains/mips-unknown-linux-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

set -eu

TARGET_GLIBC='2.7'
CROSS_COMPILE_TRIPLET='mips-unknown-linux-gnu'

CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-g++"
CC="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-gcc"
CXX="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}${TARGET_GLIBC}-g++"
AR="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ar"
AS="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-as"
LD="${OBGGCC_TOOLCHAIN}/bin/${CROSS_COMPILE_TRIPLET}-ld"
Expand Down
Loading

0 comments on commit b7ec248

Please sign in to comment.