gcc: Handle __USE_MINGW_ANSI_STDIO.

This commit is contained in:
Alexpux
2014-04-17 08:37:34 +04:00
parent 983c86508d
commit accfd0bd4e
2 changed files with 20 additions and 3 deletions

View File

@@ -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

View File

@@ -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