From f29d569cd33a73da5ad675f43a34ad53c5cc9bc6 Mon Sep 17 00:00:00 2001 From: davidovski Date: Thu, 2 Feb 2023 14:10:02 +0000 Subject: Work --- skip/mingw-w64-gcc/mingw-w64-gcc.xibuild | 72 ++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 skip/mingw-w64-gcc/mingw-w64-gcc.xibuild (limited to 'skip/mingw-w64-gcc/mingw-w64-gcc.xibuild') diff --git a/skip/mingw-w64-gcc/mingw-w64-gcc.xibuild b/skip/mingw-w64-gcc/mingw-w64-gcc.xibuild new file mode 100644 index 0000000..285a7cb --- /dev/null +++ b/skip/mingw-w64-gcc/mingw-w64-gcc.xibuild @@ -0,0 +1,72 @@ +#!/bin/sh + +NAME="mingw-w64-gcc" +DESC="Cross GCC for the MinGW-w64 cross-compiler" + +MAKEDEPS=" zlib mpc1 gmp mpfr" + +PKG_VER=12.2.0 +SOURCE="https://ftp.gnu.org/gnu/gcc/gcc-$PKG_VER/gcc-$PKG_VER.tar.xz" + +islver=0.25 + +ADDITIONAL=" +http://libisl.sourceforge.io/isl-$islver.tar.bz2 +0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch +" +target="x86_64-w64-mingw32" + +prepare() { + apply_patches + + # link isl for in-tree builds + tar xf isl-$islver.tar.bz2 + ln -sf isl-$islver isl + + mkdir -p "$_gccdir" +} + +build() { + export CFLAGS="$CFLAGS -O2" + export CXXFLAGS="$CXXFLAGS -O2" + export CPPFLAGS="$CPPFLAGS -O2" + "$BUILD_ROOT"/configure \ + --prefix=/usr \ + --target=$target \ + --libexecdir=/usr/libexec \ + --disable-dw2-exceptions \ + --disable-multilib \ + --disable-nls \ + --disable-sjlj-exceptions \ + --disable-werror \ + --enable-checking=release \ + --enable-cloog-backend=isl \ + --enable-fully-dynamic-string \ + --enable-languages=c,lto,c++ \ + --enable-libgomp \ + --enable-libstdcxx-time=yes \ + --enable-lto \ + --enable-shared \ + --enable-static \ + --enable-threads=posix \ + --with-system-zlib + make +} + +package() { + cd "$_gccdir" + make DESTDIR="$PKG_DEST" install + + #$target-strip "$PKG_DEST"/usr/$target/lib/*.dll + + ln -s $target-gcc "$PKG_DEST"/usr/bin/$target-cc + + # Move DLLs + mkdir -p "$PKG_DEST"/usr/$target/bin + mv "$PKG_DEST"/usr/$target/lib/*.dll "$PKG_DEST"/usr/$target/bin + + # Unnecessary files + rm -rf "$PKG_DEST"/usr/share + rm "$PKG_DEST"/usr/lib/libcc1.* +} + -- cgit v1.2.1