-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc04cd9
commit 4a19fe4
Showing
7 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env sh | ||
set -e | ||
cmake -G Ninja -DCMAKE_VERIFY_HEADER_SETS=On -DCMAKE_SYSTEM_NAME="Linux" -DCMAKE_C_COMPILER="s390x-linux-musl-gcc" -DCMAKE_CXX_COMPILER="s390x-linux-musl-g++" -DCMAKE_BUILD_TYPE=Release -DDISCOVER_TESTS=Off -DCMAKE_EXE_LINKER_FLAGS="-static -Wl,--gc-sections" -DBUILD_VSIX=Off -DUSE_PRE_GENERATED_GRAMMAR="generated_parser" ../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env sh | ||
set -e | ||
apk update && apk add --no-cache git cmake ninja qemu-s390x tar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env sh | ||
set -e | ||
qemu-s390x $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -e | ||
|
||
apk update | ||
apk add git curl g++ bison make patch tar xz | ||
|
||
mkdir /toolchain | ||
|
||
git clone https://github.com/richfelker/musl-cross-make.git | ||
|
||
cd musl-cross-make | ||
|
||
git checkout -f e149c31c48b4f4a4c9349ddf7bc0027b90245afc | ||
|
||
echo "TARGET = s390x-linux-musl" >> config.mak | ||
echo "OUTPUT = /toolchain/" >> config.mak | ||
echo "BINUTILS_VER = 2.41" >> config.mak | ||
echo "GCC_VER = 14.1.0" >> config.mak | ||
echo "DL_CMD = curl -C - -L -o" >> config.mak | ||
echo "COMMON_CONFIG += CFLAGS=\"-fdata-sections -ffunction-sections -O2 -g0\" CXXFLAGS=\"-fdata-sections -ffunction-sections -O2 -g0\"" >> config.mak | ||
echo "BINUTILS_CONFIG = --enable-gprofng=no" >> config.mak | ||
|
||
echo "0aec8d432b8473559942a45c12459a5db3a04618 *gcc-14.1.0.tar.xz" > hashes/gcc-14.1.0.tar.xz.sha1 | ||
echo "0e008260a958bbd10182ee3384672ae0a310eece *binutils-2.41.tar.xz" > hashes/binutils-2.41.tar.xz.sha1 | ||
|
||
mkdir patches/gcc-14.1.0 | ||
cp patches/gcc-11.2.0/0002-posix_memalign.diff patches/gcc-14.1.0/ | ||
|
||
make -j 8 | ||
make install | ||
|
||
cd .. | ||
|
||
tar czvf toolchain.tar.gz /toolchain | ||
|