From accfd0bd4e13b25ef6505250cfd01a68aac894d6 Mon Sep 17 00:00:00 2001 From: Alexpux Date: Thu, 17 Apr 2014 08:37:34 +0400 Subject: [PATCH] gcc: Handle __USE_MINGW_ANSI_STDIO. --- mingw-w64-gcc/PKGBUILD | 10 +++++++--- mingw-w64-gcc/handle-use-mingw-ansi-stdio.patch | 13 +++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 mingw-w64-gcc/handle-use-mingw-ansi-stdio.patch diff --git a/mingw-w64-gcc/PKGBUILD b/mingw-w64-gcc/PKGBUILD index f46009449e..6743d0b39d 100644 --- a/mingw-w64-gcc/PKGBUILD +++ b/mingw-w64-gcc/PKGBUILD @@ -13,7 +13,7 @@ pkgname=( "${_mingw_suff}-${_realname}-objc" ) pkgver=4.8.2 -pkgrel=7 +pkgrel=8 pkgdesc="GCC for the MinGW-w64" arch=('any') url="http://gcc.gnu.org" @@ -41,7 +41,8 @@ source=("ftp://gcc.gnu.org/pub/gcc/releases/${_realname}-${pkgver}/${_realname}- '4.8-libatomic-cygwin.patch' 'build-more-gnattools.mingw.patch' 'libgomp-no-static.patch' - 'gcc-4.8.2-PR-middle-end-60484-fix-dump-path-problems.patch') + 'gcc-4.8.2-PR-middle-end-60484-fix-dump-path-problems.patch' + handle-use-mingw-ansi-stdio.patch) md5sums=('a3d7d63b9cb6b6ea049469a0c4a43c9d' '40cb437805e2f7a006aa0d0c3098ab0f' '6eb6e080dbf7bc6825f53a0aaa6c4ef9' @@ -57,7 +58,8 @@ md5sums=('a3d7d63b9cb6b6ea049469a0c4a43c9d' '9036f99b9ef9a6897a808266bbd57a12' 'fde1098e5c71963ec2ed4c5b2c4217bd' '0a78aaac959e212acb24bb38271804cb' - '5370ab0fee3bfdd3f7886a2139d78b8c') + '5370ab0fee3bfdd3f7886a2139d78b8c' + '03a9f701d86a8eeb01fb3435ae2c0e6b') _threads="posix" @@ -133,6 +135,8 @@ prepare() { # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60484 patch -p1 -i ${srcdir}/gcc-4.8.2-PR-middle-end-60484-fix-dump-path-problems.patch + patch -p1 -i ${srcdir}/handle-use-mingw-ansi-stdio.patch + if check_option "debug" "y"; then # Expose some libgomp internals for debugging. patch -p1 -i ${srcdir}/libgomp-no-static.patch diff --git a/mingw-w64-gcc/handle-use-mingw-ansi-stdio.patch b/mingw-w64-gcc/handle-use-mingw-ansi-stdio.patch new file mode 100644 index 0000000000..0ec2405eb0 --- /dev/null +++ b/mingw-w64-gcc/handle-use-mingw-ansi-stdio.patch @@ -0,0 +1,13 @@ +--- gcc-4.8.2/gcc/config/i386/xm-mingw32.h.orig 2013-01-11 00:38:27.000000000 +0400 ++++ gcc-4.8.2/gcc/config/i386/xm-mingw32.h 2014-04-14 22:32:15.278200000 +0400 +@@ -29,6 +29,10 @@ + /* The st_ino field of struct stat is always 0. */ + #define HOST_LACKS_INODE_NUMBERS + ++#ifndef __USE_MINGW_ANSI_STDIO + /* MSVCRT does not support the "ll" format specifier for printing + "long long" values. Instead, we use "I64". */ + #define HOST_LONG_LONG_FORMAT "I64" ++#else ++#define HOST_LONG_LONG_FORMAT "ll" ++#endif