mirror of
https://github.com/grumpycoders/pcsx-redux.git
synced 2025-04-02 10:41:54 -04:00
51 lines
1.9 KiB
Ruby
51 lines
1.9 KiB
Ruby
class MipselNoneElfGcc < Formula
|
|
desc "The GNU compiler collection for mipsel"
|
|
homepage "https://gcc.gnu.org"
|
|
url "https://ftp.gnu.org/gnu/gcc/gcc-12.2.0/gcc-12.2.0.tar.xz"
|
|
sha256 "e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff"
|
|
|
|
depends_on "gmp"
|
|
depends_on "mipsel-none-elf-binutils"
|
|
depends_on "libmpc"
|
|
depends_on "mpfr"
|
|
depends_on "gnu-sed"
|
|
|
|
def install
|
|
ENV.prepend_path "PATH", Formula["gnu-sed"].opt_libexec/"gnubin"
|
|
mkdir "mipsel-none-elf-gcc-build" do
|
|
system "../configure", "--target=mipsel-none-elf",
|
|
"--prefix=#{prefix}",
|
|
"--without-isl",
|
|
"--disable-nls",
|
|
"--disable-threads",
|
|
"--disable-shared",
|
|
"--disable-libssp",
|
|
"--disable-libstdcxx-pch",
|
|
"--disable-libgomp",
|
|
"--disable-werror",
|
|
"--without-headers",
|
|
"--disable-hosted-libstdcxx",
|
|
"--with-as=#{Formula["mipsel-none-elf-binutils"].bin}/mipsel-none-elf-as",
|
|
"--with-ld=#{Formula["mipsel-none-elf-binutils"].bin}/mipsel-none-elf-ld",
|
|
"--enable-languages=c,c++"
|
|
system "make", "all-gcc"
|
|
system "make", "install-strip-gcc"
|
|
system "make", "all-target-libgcc"
|
|
system "make", "install-strip-target-libgcc"
|
|
system "make", "all-target-libstdc++-v3"
|
|
system "make", "install-strip-target-libstdc++-v3"
|
|
end
|
|
end
|
|
|
|
test do
|
|
(testpath/"test-c.c").write <<~EOS
|
|
int main(void)
|
|
{
|
|
int i=0;
|
|
while(i<10) i++;
|
|
return i;
|
|
}
|
|
EOS
|
|
system "#{bin}/mipsel-none-elf-gcc", "-c", "-o", "test-c.o", "test-c.c"
|
|
end
|
|
end
|