-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the need for devkitarm
- Loading branch information
Showing
8 changed files
with
64 additions
and
59 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
version=2.37 | ||
shasum=820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c | ||
src=binutils-$version | ||
tarball=binutils-$version.tar.xz | ||
|
||
checksum() { | ||
test -f "$1" || return 1 | ||
sha="$(sha256sum "$1" | cut -d ' ' -f 1)" | ||
test "$sha" = "$2" || return 1 | ||
return 0 | ||
} | ||
|
||
checksum "$tarball" "$shasum" || wget -c "https://ftp.gnu.org/gnu/binutils/$tarball" | ||
if ! checksum "$tarball" "$shasum"; then | ||
sha256sum "$tarball" 1>&2 | ||
echo "Checksum failed!" 1>&2 | ||
rm -f "$tarball" | ||
fi | ||
|
||
test -d "$src" || tar xf "$tarball" | ||
mkdir -p build | ||
cd build | ||
"../$src/configure" \ | ||
--prefix= \ | ||
--target=arm-none-eabi \ | ||
--disable-nls | ||
MAKEINFO=false make -j "${NPROC:-$(nproc)}" |
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,4 @@ | ||
#!/bin/sh | ||
|
||
rm -rf binutils-*/ | ||
rm -rf build |
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 |
---|---|---|
@@ -1,23 +1,26 @@ | ||
#!/bin/sh | ||
set -e | ||
CCOPT= | ||
CXXOPT= | ||
|
||
if [ ! -z "$CC" ]; then CCOPT=CC=$CC; fi | ||
if [ ! -z "$CXX" ]; then CXXOPT=CXX=$CXX; fi | ||
(cd binutils | ||
./clean.sh | ||
./build.sh | ||
) | ||
make -C gcc clean | ||
make -C gcc old $CCOPT $CXXOPT | ||
make -C gcc old | ||
mv gcc/old_agbcc . | ||
make -C gcc clean | ||
make -C gcc $CCOPT $CXXOPT | ||
make -C gcc | ||
mv gcc/agbcc . | ||
# not sure if the ARM compiler is the old one or the new one (-DOLD_COMPILER) | ||
rm -f gcc_arm/config.status gcc_arm/config.cache | ||
cd gcc_arm && ./configure --target=arm-elf --host=i386-linux-gnu && make cc1 && cd .. | ||
( cd gcc_arm | ||
rm -f config.status config.cache | ||
./configure --target=arm-elf --host=i386-linux-gnu | ||
make cc1 | ||
) | ||
mv gcc_arm/cc1 agbcc_arm | ||
make -C libgcc clean | ||
make -C libgcc $CCOPT $CXXOPT | ||
make -C libgcc | ||
mv libgcc/libgcc.a . | ||
make -C libc clean | ||
make -C libc $CCOPT $CXXOPT | ||
make -C libc | ||
mv libc/libc.a . |
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 |
---|---|---|
@@ -1,17 +1,12 @@ | ||
#!/bin/sh | ||
set -e | ||
if [ "$1" != "" ]; then | ||
mkdir -p $1/tools/agbcc | ||
mkdir -p $1/tools/agbcc/bin | ||
mkdir -p $1/tools/agbcc/include | ||
mkdir -p $1/tools/agbcc/lib | ||
cp agbcc $1/tools/agbcc/bin/ | ||
cp old_agbcc $1/tools/agbcc/bin/ | ||
cp agbcc_arm $1/tools/agbcc/bin/ | ||
cp -R libc/include $1/tools/agbcc/ #drop include, because we don't want include/include | ||
cp ginclude/* $1/tools/agbcc/include/ | ||
cp libgcc.a $1/tools/agbcc/lib/ | ||
cp libc.a $1/tools/agbcc/lib/ | ||
dest="$(realpath "$1/tools/agbcc")" | ||
install -Dm755 -t "$dest/bin" agbcc old_agbcc agbcc_arm | ||
install -Dm644 -t "$dest/lib" libgcc.a libc.a | ||
install -Dm644 -t "$dest/include" ginclude/* | ||
cp -R libc/include "$dest/" #drop include, because we don't want include/include | ||
make -C binutils/build DESTDIR="$dest" install | ||
else | ||
echo "Usage: install.sh PATH" | ||
fi |
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