Skip to content

Commit

Permalink
Add sysroots of Debian 10 and 11
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartatz committed Aug 23, 2024
1 parent 8a33c47 commit 930d12a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,20 @@ fi
declare -r sysroot_tarball='/tmp/sysroot.tar.xz'
declare -r executable='/tmp/gcc-wrapper'

declare -r libraries=(
'libstdc++'
'libatomic'
'libssp'
'libitm'
'libsupc++'
'libgcc'
)

declare -r bits=(
''
'64'
)

while read item; do
declare glibc_version="$(jq '.glibc_version' <<< "${item}")"
declare triplet="$(jq --raw-output '.triplet' <<< "${item}")"
Expand All @@ -329,6 +343,18 @@ while read item; do
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}"

pushd "${toolchain_directory}/${triplet}${glibc_version}/lib"

for library in "${libraries[@]}"; do
for bit in "${bits[@]}"; do
for file in "../../${triplet}/lib${bit}/${library}"*; do
ln --symbolic "${file}" './'
done
done
done

pushd

# cp --recursive --no-dereference "${toolchain_directory}/${triplet}/bin" "${toolchain_directory}/${triplet}${glibc_version}"
done <<< "$(jq --compact-output '.[]' "${workdir}/submodules/debian-sysroot/dist.json")"

Expand Down
2 changes: 1 addition & 1 deletion submodules/debian-sysroot
Submodule debian-sysroot updated 2 files
+260 −0 dist.json
+7 −3 main.sh

0 comments on commit 930d12a

Please sign in to comment.