[Slackbuilds-users] Fixes for mingw
Markus Rinne
markus.ka.rinne at gmail.com
Mon May 6 20:03:24 UTC 2013
Hi,
There is no x86-mingw32-build SlackBuild for Slackware 14. Mingw has been
removed from git. The commit message says "build failure". Here are some
changes to the SlackBuild to make it build.
The SlackBuild used to create file x86-mingw32-build.sh.conf from files:
* x86-mingw32-build.sh.conf_src_1
* x86-mingw32-build.sh.conf_src_2
However, these src files were not in version control. Instead, the result file
x86-mingw32-build.sh.conf was. The fix is as follows: Copy to file
x86-mingw32-build.sh.conf_src_1 everything before these three lines
assume WORKING_DIR //tmp/SBo/x86-mingw32-build/mingw32
assume PACKAGE_DIR /home/gizzmo/build/stage1/x86-mingw32-build
assume INSTALL_DIR /tmp/SBo/package-x86-mingw32-build/usr/share/mingw32
from x86-mingw32-build.sh.conf. Then copy everything after those lines to
x86-mingw32-build.sh.conf_src_2. Then remove x86-mingw32-build.sh.conf from
version control.
Another issue is that the compilation fails because of compiler flag -Werror.
I made it compile with this patch:
diff -urN x86-mingw32-build-1.0.1/x86-mingw32-build.sh x86-mingw32-build/x86-mingw32-build.sh
--- x86-mingw32-build-1.0.1/x86-mingw32-build.sh 2010-03-11 00:16:55.000000000 +0200
+++ x86-mingw32-build/x86-mingw32-build.sh 2013-05-05 12:40:13.386181375 +0300
@@ -122,6 +122,13 @@
else
$RUN prepare binutils-$BINUTILS_VERSION
$RUN setbuilddir binutils*
+
+ sed -i 's/GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"//' ../bfd/configure
+ sed -i 's/GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"//' ../binutils/configure
+ sed -i 's/GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"//' ../gas/configure
+ sed -i 's/GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"//' ../ld/configure
+ sed -i 's/GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"//' ../opcodes/configure
+
$RUN ../configure --prefix="$INSTALL_DIR" --target="$TARGET" \
$GLOBAL_BASE_OPTIONS $BINUTILS_BASE_OPTIONS \
--with-sysroot="${INSTALL_DIR}" || die $? \
I tested package creation successfully on both 32-bit and 64-bit systems.
Markus
More information about the SlackBuilds-users
mailing list