Compare commits
No commits in common. "dev" and "main" have entirely different histories.
|
@ -1,40 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
if which i686-elf-gcc && which i686-elf-as; then
|
|
||||||
echo "Cross Compiler Already Built"
|
|
||||||
echo "Exiting"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir opt
|
|
||||||
cd opt
|
|
||||||
|
|
||||||
CCFLAGS="-j 8"
|
|
||||||
PREFIX="$PWD"
|
|
||||||
TARGET="i686-elf"
|
|
||||||
|
|
||||||
# binutils
|
|
||||||
curl -o binutils.tar.xz https://sourceware.org/pub/binutils/snapshots/binutils-2.40.90.tar.xz
|
|
||||||
tar -xf binutils.tar.xz
|
|
||||||
cd binutils-2.40.90
|
|
||||||
mkdir build-binutils
|
|
||||||
cd build-binutils
|
|
||||||
../configure --target=$TARGET --prefix=$PREFIX --with-sysroot --disable-nls --disable-werror
|
|
||||||
make $CCFLAGS
|
|
||||||
make $CCFLAGS install
|
|
||||||
|
|
||||||
# gcc
|
|
||||||
curl -o gcc.tar.xz https://mirrorservice.org/sites/sourceware.org/pub/gcc/snapshots/LATEST-12/gcc-12-20240322.tar.xz
|
|
||||||
tar -xf gcc.tar.xz
|
|
||||||
cd gcc-12-20240322
|
|
||||||
mkdir build-gcc
|
|
||||||
cd build-gcc
|
|
||||||
../configure --target=$TARGET --prefix=$PREFIX --disable-nls --enable-languages=c,c++ --without-headers
|
|
||||||
make $CCFLAGS all-gcc
|
|
||||||
make $CCFLAGS all-target-libgcc
|
|
||||||
make $CCFLAGS install-gcc
|
|
||||||
make $CCFLAGS install-target-libgcc
|
|
||||||
|
|
||||||
echo "All done :)"
|
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ pkgs.mkShell rec {
|
||||||
mpfr
|
mpfr
|
||||||
texinfo
|
texinfo
|
||||||
isl
|
isl
|
||||||
zlib
|
|
||||||
];
|
];
|
||||||
RUSTC_VERSION = "nightly"; # Required for some experimental cargo features
|
RUSTC_VERSION = "nightly"; # Required for some experimental cargo features
|
||||||
hardeningDisable = [ "all" ]; # Required to compile gcc
|
hardeningDisable = [ "all" ]; # Required to compile gcc
|
||||||
|
@ -26,7 +25,6 @@ pkgs.mkShell rec {
|
||||||
export PATH=$PATH:''${CARGO_HOME:-~/.cargo}/bin
|
export PATH=$PATH:''${CARGO_HOME:-~/.cargo}/bin
|
||||||
export PATH=$PATH:''${RUSTUP_HOME:-~/.rustup}/toolchains/nightly-x86_64-unknown-linux-gnu/bin/
|
export PATH=$PATH:''${RUSTUP_HOME:-~/.rustup}/toolchains/nightly-x86_64-unknown-linux-gnu/bin/
|
||||||
export PATH="$PATH:$PWD/opt/bin"
|
export PATH="$PATH:$PWD/opt/bin"
|
||||||
NIX_ENFORCE_PURITY=0 ./build-cross-compiler.sh # Stupid fucking shit hack
|
|
||||||
'';
|
'';
|
||||||
# Add glibc, clang, glib, and other headers to bindgen search path
|
# Add glibc, clang, glib, and other headers to bindgen search path
|
||||||
BINDGEN_EXTRA_CLANG_ARGS =
|
BINDGEN_EXTRA_CLANG_ARGS =
|
||||||
|
|
Loading…
Reference in a new issue