Package Details: gcc44 4.4.7-6

Git Clone URL: https://aur.archlinux.org/gcc44.git (read-only)
Package Base: gcc44
Description: The GNU Compiler Collection (4.4.x)
Upstream URL: http://gcc.gnu.org/
Licenses: GPL, custom, LGPL
Submitter: None
Maintainer: Gryffyn
Last Packager: xyproto
Votes: 69
Popularity: 0.001032
First Submitted: 2010-05-28 14:46
Last Updated: 2015-06-10 12:40

Required by (3)

Sources (4)

Latest Comments

hv15 commented on 2016-03-02 16:09

Hi Gryffyn, I was having the same issue as mentatf and found that the
patched given by GloW wasn't working for me.

So I had a look and found another patch from https://github.com/gccxml/gccxml/issues/11, which has solved the issue for me. The patch can be found at http://pastebin.com/tujjVNCs.

For convenience I have created a new PKGBUILD: http://pastebin.com/1K1jN6gZ

mentatf commented on 2015-11-25 17:11

@marker5a the patch given below doesn't work for me, the same error message posted by @agwblack remains. The steps I've followed are:
1) download the snapshot
2) extract it in some directory
3) add fix_gcc5.patch in it
4) add 3 lines in the PKGBUILD: 'fix_gcc5.patch', '"the checksum"' and "patch -Np0 -i "$srcdir/fix_gcc5.patch"
5) makepkg -sri

edit: in the meantime, I manage to install it by downgrading gcc to 4.9.

marker5a commented on 2015-10-21 21:03

@GloW, thanks for handling that. I was trying to figure out ways to get the patch posted... didn't even think about pastebin :)

Pardon the n00b question, is there a more elegant way to get patches submitted for aur packages? Or is that still a wip with the transition to git for managing the packages?

Anyways, thanks again for your help GloW!

GloW commented on 2015-10-21 15:36

here is a corrected version of fix_gcc5.patch :
http://pastebin.com/kUwW19Zj

GloW commented on 2015-10-21 07:22

@marker5a

can't really use your patch, since identation is brokeN

marker5a commented on 2015-10-14 19:41

@agwblack, dieghen89... I did some digging and found a solution. You need to apply the following patch which adds a new patch file to the package and PKGBUILD. The patch addresses the issue of compiling this package using the newer versions of gcc

diff --git a/PKGBUILD b/PKGBUILD
index 77967f1..ec8abc8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,11 +20,14 @@ options=('!libtool' '!buildflags' 'staticlibs')
source=("http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2"
'gcc-hash-style-both.patch'
'gcc_pure64.patch'
- 'siginfo_t_fix.patch')
+ 'siginfo_t_fix.patch'
+ 'fix_gcc5.patch')
sha256sums=('5ff75116b8f763fa0fb5621af80fc6fb3ea0f1b1a57520874982f03f26cd607f'
'a600550d3d2b2fb8ee6a547c68c3a08a2af7579290b340c35ee5598c9bb305a5'
'2d369cf93c6e15c3559c3560bce581e0ae5f1f34dc86bca013ac67ef1c1a9ff9'
- '4df866dcfd528835393d2b6897651158faf6d84852158fbf2e4ffc113ec7d201')
+ '4df866dcfd528835393d2b6897651158faf6d84852158fbf2e4ffc113ec7d201'
+ 'e4f1f0f7616ad5c72db4b0b02bce33c79b101277b705ec90da957dee14091d5e')
+

prepare() {
cd "gcc-$pkgver"
@@ -34,6 +37,7 @@ prepare() {
# Do not run fixincludes
sed -i -e 's:\./fixinc\.sh:-c true:' gcc/Makefile.in

+ patch -Np0 -i "$srcdir/fix_gcc5.patch"
patch -Np0 -i "$srcdir/gcc-hash-style-both.patch"
patch -Np1 -i "$srcdir/siginfo_t_fix.patch"
if [[ "$CARCH" == "x86_64" ]]; then
diff --git a/fix_gcc5.patch b/fix_gcc5.patch
new file mode 100644
index 0000000..4959a77
--- /dev/null
+++ b/fix_gcc5.patch
@@ -0,0 +1,99 @@
+diff --git a/gcc/toplev.c b/gcc/toplev.c
+index 267df59..4836238 100644
+--- gcc/toplev.c
++++ gcc/toplev.c
+@@ -532,11 +532,11 @@ read_integral_parameter (const char *p, const char *pname, const int defval)
+ return atoi (p);
+ }
+
+-/* When compiling with a recent enough GCC, we use the GNU C "extern inline"
+- for floor_log2 and exact_log2; see toplev.h. That construct, however,
+- conflicts with the ISO C++ One Definition Rule. */
++#if GCC_VERSION < 3004
+
+-#if GCC_VERSION < 3004 || !defined (__cplusplus)
++/* The functions floor_log2 and exact_log2 are defined as inline
++ functions in toplev.h if GCC_VERSION >= 3004. The definitions here
++ are used for older versions of gcc. */
+
+ /* Given X, an unsigned number, return the largest int Y such that 2**Y <= X.
+ If X is 0, return -1. */
+@@ -549,9 +549,6 @@ floor_log2 (unsigned HOST_WIDE_INT x)
+ if (x == 0)
+ return -1;
+
+-#ifdef CLZ_HWI
+- t = HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x);
+-#else
+ if (HOST_BITS_PER_WIDE_INT > 64)
+ if (x >= (unsigned HOST_WIDE_INT) 1 << (t + 64))
+ t += 64;
+@@ -568,7 +565,6 @@ floor_log2 (unsigned HOST_WIDE_INT x)
+ t += 2;
+ if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 1))
+ t += 1;
+-#endif
+
+ return t;
+ }
+@@ -581,14 +577,10 @@ exact_log2 (unsigned HOST_WIDE_INT x)
+ {
+ if (x != (x & -x))
+ return -1;
+-#ifdef CTZ_HWI
+- return x ? CTZ_HWI (x) : -1;
+-#else
+ return floor_log2 (x);
+-#endif
+ }
+
+-#endif /* GCC_VERSION < 3004 || !defined (__cplusplus) */
++#endif /* GCC_VERSION < 3004 */
+
+ /* Handler for fatal signals, such as SIGSEGV. These are transformed
+ into ICE messages, which is much more user friendly. In case the
+diff --git a/gcc/toplev.h b/gcc/toplev.h
+index e62aa727..cca6867 100644
+--- gcc/toplev.h
++++ gcc/toplev.h
+@@ -169,14 +169,17 @@ extern void decode_d_option (const char *);
+ extern bool fast_math_flags_set_p (void);
+ extern bool fast_math_flags_struct_set_p (struct cl_optimization *);
+
++/* Inline versions of the above for speed. */
++#if GCC_VERSION < 3004
++
+ /* 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
++#else /* GCC_VERSION >= 3004 */
++
+ # if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
+ # define CLZ_HWI __builtin_clzl
+ # define CTZ_HWI __builtin_ctzl
+@@ -188,17 +191,18 @@ extern int floor_log2 (unsigned HOST_WIDE_INT);
+ # 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;
+ }
++
+ #endif /* GCC_VERSION >= 3004 */
+
+ /* Functions used to get and set GCC's notion of in what directory

gajjanag commented on 2015-08-15 12:57

Thanks a lot for maintaining this old version.

@agwblack, dieghen89: Built and tested successfully with oldest ARM (arch rollback machine) version of GCC, namely 4.8.1 (modulo the linker errors, see the recent discussion https://aur.archlinux.org/packages/gcc43/).

agwblack commented on 2015-07-20 14:37

I have the following error:

../../gcc/toplev.c: At top level:
../../gcc/toplev.c:536:1: error: redefinition of ‘floor_log2’
floor_log2 (unsigned HOST_WIDE_INT x)
^
In file included from ../../gcc/toplev.c:58:0:
../../gcc/toplev.h:190:1: note: previous definition of ‘floor_log2’ was here
floor_log2 (unsigned HOST_WIDE_INT x)
^
../../gcc/toplev.c:571:1: error: redefinition of ‘exact_log2’
exact_log2 (unsigned HOST_WIDE_INT x)
^
In file included from ../../gcc/toplev.c:58:0:
../../gcc/toplev.h:196:1: note: previous definition of ‘exact_log2’ was here
exact_log2 (unsigned HOST_WIDE_INT x)
^
Makefile:2470: recipe for target 'toplev.o' failed
make[3]: *** [toplev.o] Error 1
make[3]: Leaving directory '/tmp/makepkg/gcc44/src/gcc-4.4.7/build/gcc'
Makefile:5142: recipe for target 'all-stage1-gcc' failed
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory '/tmp/makepkg/gcc44/src/gcc-4.4.7/build'
Makefile:17112: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/tmp/makepkg/gcc44/src/gcc-4.4.7/build'
Makefile:739: recipe for target 'all' failed
make: *** [all] Error 2

dieghen89 commented on 2015-07-10 20:13

I have the following error:

../../gcc/tree-call-cdce.c: At top level:
../../gcc/tree-call-cdce.c:928:3: warning: enum constant defined in struct or union is not visible in C++ [-Wc++-compat]
GIMPLE_PASS,
^
In file included from ../../gcc/tree-dump.h:26:0,
from ../../gcc/tree-call-cdce.c:39:
../../gcc/tree-pass.h:102:5: note: enum constant defined here
GIMPLE_PASS,
^
rm gcc.pod
make[3]: Leaving directory '/tmp/makepkg/gcc44/src/gcc-4.4.7/build/gcc'
Makefile:5142: recipe for target 'all-stage1-gcc' failed
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory '/tmp/makepkg/gcc44/src/gcc-4.4.7/build'
Makefile:17112: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/tmp/makepkg/gcc44/src/gcc-4.4.7/build'
Makefile:739: recipe for target 'all' failed
make: *** [all] Error 2

It seems something related to gcc5, do somebody have this problem too?

xyproto commented on 2013-11-08 15:10

Updated the package and added 'staticlibs' to the options array. Thanks, mauro2.

All comments