rpms/arm-gp2x-linux-gcc/devel gcc-4.1.2-compile-fix.patch, NONE, 1.1 arm-gp2x-linux-gcc.spec, 1.6, 1.7

Hans de Goede jwrdegoede at fedoraproject.org
Thu Oct 2 20:27:20 UTC 2008


Author: jwrdegoede

Update of /cvs/extras/rpms/arm-gp2x-linux-gcc/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23232

Modified Files:
	arm-gp2x-linux-gcc.spec 
Added Files:
	gcc-4.1.2-compile-fix.patch 
Log Message:
* Thu Oct  2 2008 Hans de Goede <hdegoede at redhat.com> 4.1.2-8
- Fix FTBFS (rh 464988)


gcc-4.1.2-compile-fix.patch:

--- NEW FILE gcc-4.1.2-compile-fix.patch ---
diff -up gcc-4.1.2/gcc/toplev.c~ gcc-4.1.2/gcc/toplev.c
--- gcc-4.1.2/gcc/toplev.c~	2008-10-02 21:47:40.000000000 +0200
+++ gcc-4.1.2/gcc/toplev.c	2008-10-02 21:47:40.000000000 +0200
@@ -517,6 +517,7 @@ read_integral_parameter (const char *p, 
   return atoi (p);
 }
 
+#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.  */
 
@@ -567,6 +568,8 @@ exact_log2 (unsigned HOST_WIDE_INT x)
 #endif
 }
 
+#endif
+
 /* Handler for fatal signals, such as SIGSEGV.  These are transformed
    into ICE messages, which is much more user friendly.  In case the
    error printer crashes, reset the signal to prevent infinite recursion.  */
diff -up gcc-4.1.2/gcc/toplev.h~ gcc-4.1.2/gcc/toplev.h
--- gcc-4.1.2/gcc/toplev.h~	2008-10-02 22:09:38.000000000 +0200
+++ gcc-4.1.2/gcc/toplev.h	2008-10-02 22:09:38.000000000 +0200
@@ -152,12 +152,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
@@ -171,17 +171,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


Index: arm-gp2x-linux-gcc.spec
===================================================================
RCS file: /cvs/extras/rpms/arm-gp2x-linux-gcc/devel/arm-gp2x-linux-gcc.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- arm-gp2x-linux-gcc.spec	19 Feb 2008 07:57:02 -0000	1.6
+++ arm-gp2x-linux-gcc.spec	2 Oct 2008 20:26:50 -0000	1.7
@@ -4,7 +4,7 @@
 
 Name:           %{target}-gcc
 Version:        4.1.2
-Release:        8%{?dist}
+Release:        9%{?dist}
 Summary:        Cross Compiling GNU GCC targeted at %{target}
 Group:          Development/Languages
 License:        GPLv2+
@@ -20,6 +20,7 @@
 Patch0:         arm-linux-soft-float.patch
 Patch1:         gcc40-cross-build-fixes.patch
 Patch2:         gcc-4.1.2-gcc_eh.patch
+Patch3:         gcc-4.1.2-compile-fix.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
 BuildRequires:  %{target}-binutils zlib-devel gawk
 Requires:       %{target}-binutils
@@ -60,6 +61,7 @@
 %if !%{bootstrap}
 %patch2 -p1
 %endif
+%patch3 -p1
 sed -i 's/VERSUFFIX ""/VERSUFFIX " (Fedora GP2X %{version}-%{release})"/' \
   gcc/version.c
 contrib/gcc_update --touch
@@ -190,6 +192,9 @@
 
 
 %changelog
+* Thu Oct  2 2008 Hans de Goede <hdegoede at redhat.com> 4.1.2-8
+- Fix FTBFS (rh 464988)
+
 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 4.1.2-8
 - Autorebuild for GCC 4.3
 




More information about the scm-commits mailing list