From: Daniel P. Berrange <"Daniel P. Berrange "> Date: Wed, 3 Sep 2008 11:27:46 +0000 (-0400) Subject: Update to 4.3.2 and patch to workaround build problems on Fedora 10 X-Git-Url: http://git.annexia.org/?p=fedora-mingw.git;a=commitdiff_plain;h=af7674126de2e245878bddb46900d5578e17f9d1 Update to 4.3.2 and patch to workaround build problems on Fedora 10 --- diff --git a/gcc/mingw-gcc-build.patch b/gcc/mingw-gcc-build.patch new file mode 100644 index 0000000..5ef4de1 --- /dev/null +++ b/gcc/mingw-gcc-build.patch @@ -0,0 +1,54 @@ +diff -rup mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.c mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.c +--- mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.c 2008-04-24 13:59:01.000000000 -0400 ++++ mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.c 2008-09-02 07:31:12.000000000 -0400 +@@ -536,7 +536,7 @@ read_integral_parameter (const char *p, + for floor_log2 and exact_log2; see toplev.h. That construct, however, + conflicts with the ISO C++ One Definition Rule. */ + +-#if GCC_VERSION < 3004 || !defined (__cplusplus) ++#if GCC_VERSION < 3004 + + /* Given X, an unsigned number, return the largest int Y such that 2**Y <= X. + If X is 0, return -1. */ +diff -rup mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.h mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.h +--- mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.h 2007-09-23 15:18:27.000000000 -0400 ++++ mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.h 2008-09-03 07:08:46.000000000 -0400 +@@ -154,12 +154,6 @@ extern void decode_d_option (const char + /* Return true iff flags are set as if -ffast-math. */ + extern bool fast_math_flags_set_p (void); + +-/* Return log2, or -1 if not exact. */ +-extern int exact_log2 (unsigned HOST_WIDE_INT); +- +-/* Return floor of log2, with -1 for zero. */ +-extern int floor_log2 (unsigned HOST_WIDE_INT); +- + /* Inline versions of the above for speed. */ + #if GCC_VERSION >= 3004 + # if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG +@@ -173,17 +167,23 @@ extern int floor_log2 ( + # define CTZ_HWI __builtin_ctz + # endif + +-extern inline int ++static inline int + floor_log2 (unsigned HOST_WIDE_INT x) + { + return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1; + } + +-extern inline int ++static inline int + exact_log2 (unsigned HOST_WIDE_INT x) + { + return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1; + } ++#else ++/* Return log2, or -1 if not exact. */ ++extern int exact_log2 (unsigned HOST_WIDE_INT); ++ ++/* Return floor of log2, with -1 for zero. */ ++extern int floor_log2 (unsigned HOST_WIDE_INT); + #endif /* GCC_VERSION >= 3004 */ + + /* Functions used to get and set GCC's notion of in what directory diff --git a/gcc/mingw-gcc.spec b/gcc/mingw-gcc.spec index 63691f7..57a16ea 100644 --- a/gcc/mingw-gcc.spec +++ b/gcc/mingw-gcc.spec @@ -1,7 +1,7 @@ %define __os_install_post /usr/lib/rpm/brp-compress %{nil} Name: mingw-gcc -Version: 4.3.1 +Version: 4.3.2 Release: 3%{?dist} Summary: MinGW Windows cross-compiler (GCC) for C and C++ @@ -10,7 +10,7 @@ Group: Development/Libraries URL: http://www.mingw.org/ Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-core-%{version}.tar.bz2 Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-g++-%{version}.tar.bz2 - +Patch1: %{name}-build.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: texinfo @@ -33,7 +33,7 @@ MinGW Windows cross-compiler (GCC) for C and C++. %prep %setup -q -c %setup -q -D -T -a1 - +%patch1 -p1 %build cd gcc-%{version}