17389830 guile fails to build with gcc4.7
17531161 greenlet doesn't build with gcc 4.7.X
17967710 Update various Userland components to use gcc4 rather than gcc3
--- a/components/acpidump/Makefile Tue Dec 17 15:19:48 2013 -0800
+++ b/components/acpidump/Makefile Tue Dec 17 15:59:46 2013 -0800
@@ -48,7 +48,11 @@
PKG_PROTO_DIRS += $(BUILD_DIR_32)
+COMPILER = gcc
+# Parfait doesn't work with the GNU 4.7 compilers yet.
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
COMPILER = gcc3
+endif
COMPONENT_BUILD_ENV += CC=$(CC)
--- a/components/autogen/Makefile Tue Dec 17 15:19:48 2013 -0800
+++ b/components/autogen/Makefile Tue Dec 17 15:59:46 2013 -0800
@@ -40,7 +40,11 @@
COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D))
# built in SFW with gcc and builds cleanly now only with gcc
-COMPILER = gcc3
+COMPILER = gcc
+# Parfait doesn't work with the GNU 4.7 compilers yet.
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
+COMPILER = gcc3
+endif
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
# strip the environment or install target fails
--- a/components/bcc/Makefile Tue Dec 17 15:19:48 2013 -0800
+++ b/components/bcc/Makefile Tue Dec 17 15:59:46 2013 -0800
@@ -39,7 +39,11 @@
include ../../make-rules/justmake.mk
include ../../make-rules/ips.mk
-COMPILER=gcc3
+COMPILER = gcc
+# Parfait doesn't work with the GNU 4.7 compilers yet.
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
+COMPILER = gcc3
+endif
COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D))
--- a/components/erlang/Makefile Tue Dec 17 15:19:48 2013 -0800
+++ b/components/erlang/Makefile Tue Dec 17 15:59:46 2013 -0800
@@ -70,7 +70,11 @@
IPS_COMPONENT_VERSION= $(COMPONENT_VERSION_MAJOR).2.3
# Built in SFW with gcc and builds cleanly now only with gcc
-COMPILER = gcc3
+COMPILER = gcc
+# Parfait doesn't work with the GNU 4.7 compilers yet.
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
+COMPILER = gcc3
+endif
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
--- a/components/guile/Makefile Tue Dec 17 15:19:48 2013 -0800
+++ b/components/guile/Makefile Tue Dec 17 15:59:46 2013 -0800
@@ -37,7 +37,11 @@
include ../../make-rules/ips.mk
# Built in SFW with gcc and builds cleanly now only with gcc
-COMPILER = gcc3
+COMPILER = gcc
+# Parfait doesn't work with the GNU 4.7 compilers yet.
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
+COMPILER = gcc3
+endif
CONFIGURE_OPTIONS += CPPFLAGS="-I/usr/include/gmp -D__USE_LEGACY_PROTOTYPES__"
CONFIGURE_OPTIONS += --disable-static
CONFIGURE_OPTIONS += --disable-error-on-warning
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/guile/patches/gcc4-fix.patch Tue Dec 17 15:59:46 2013 -0800
@@ -0,0 +1,33 @@
+gcc 4.7 breaks guile 1.8.6
+
+Upstream bug is: http://savannah.gnu.org/bugs/?29583
+bug #29583: gcc 4.5 breaks guile 1.8.7
+
+ fix doc snarfing with fedora 12
+
+ * module/scripts/snarf-check-and-output-texi.scm
+ (process-multiline-directive): Be more accepting of source location
+ markers in the preprocessed source, by adding a couple cases in which
+ they can appear. Not foolproof, but it does adapt to what new GCCs are
+ putting out (e.g. cpp (GCC) 4.4.2 20091222 (Red Hat 4.4.2-20)).
+
+--- guile-1.8.4/scripts/snarf-check-and-output-texi.orig 2013-12-17 08:05:14.466575700 -0800
++++ guile-1.8.4/scripts/snarf-check-and-output-texi 2013-12-17 08:06:34.623311834 -0800
[email protected]@ -267,6 +267,17 @@
+ (set! *file* file)
+ (set! *line* line))
+
++ ;; newer gccs like to throw around more location markers into the
++ ;; preprocessed source; these (hash . hash) bits are what they translate to
++ ;; in snarfy terms.
++ (('location ('string . file) ('int . line) ('hash . 'hash))
++ (set! *file* file)
++ (set! *line* line))
++
++ (('location ('hash . 'hash) ('string . file) ('int . line) ('hash . 'hash))
++ (set! *file* file)
++ (set! *line* line))
++
+ (('arglist rest ...)
+ (set! *args* (do-arglist rest)))
+
--- a/components/jsl/Makefile Tue Dec 17 15:19:48 2013 -0800
+++ b/components/jsl/Makefile Tue Dec 17 15:59:46 2013 -0800
@@ -39,7 +39,11 @@
# Preferred compiler set to gcc and not Studio as on Sparc architecture
# some assembler code is required for locking which fails to compile on
# solaris, when using gcc this is inlined (see jslock.c)
-COMPILER= gcc3
+COMPILER = gcc
+# Parfait doesn't work with the GNU 4.7 compilers yet.
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
+COMPILER = gcc3
+endif
COMPONENT_BUILD_ARGS += -f src/Makefile
COMPONENT_BUILD_ARGS += CC="$(CC)"
--- a/components/libnet/Makefile Tue Dec 17 15:19:48 2013 -0800
+++ b/components/libnet/Makefile Tue Dec 17 15:59:46 2013 -0800
@@ -43,7 +43,11 @@
($(CLONEY) $(SOURCE_DIR) $(@D))
PKG_PROTO_DIRS += $(COMPONENT_SRC)/doc/man/man3
-COMPILER= gcc3
+COMPILER = gcc
+# Parfait doesn't work with the GNU 4.7 compilers yet.
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
+COMPILER = gcc3
+endif
CFLAGS += -g -fPIC
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
CONFIGURE_OPTIONS.32 += --srcdir=$(BUILD_DIR_32)
--- a/components/openscap/Makefile Tue Dec 17 15:19:48 2013 -0800
+++ b/components/openscap/Makefile Tue Dec 17 15:59:46 2013 -0800
@@ -34,7 +34,11 @@
COMPONENT_ARCHIVE_URL= $(COMPONENT_DOWNLOAD_URL)/$(COMPONENT_ARCHIVE)
COMPONENT_BUGDB= utility/openscap
-COMPILER= gcc3
+COMPILER = gcc
+# Parfait doesn't work with the GNU 4.7 compilers yet.
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
+COMPILER = gcc3
+endif
CFLAGS+= -std=c99
CFLAGS+= -DNDEBUG
--- a/components/openusb/Makefile Tue Dec 17 15:19:48 2013 -0800
+++ b/components/openusb/Makefile Tue Dec 17 15:59:46 2013 -0800
@@ -42,7 +42,11 @@
COMPONENT_PRE_CONFIGURE_ACTION = \
($(CLONEY) $(SOURCE_DIR) $(@D))
-COMPILER = gcc3
+COMPILER = gcc
+# Parfait doesn't work with the GNU 4.7 compilers yet.
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
+COMPILER = gcc3
+endif
PATCH_LEVEL = 1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/greenlet/CC.sh Tue Dec 17 15:59:46 2013 -0800
@@ -0,0 +1,21 @@
+#! /bin/sh
+
+# Wrapper script to work-around the fact that for Python 2.6,
+# /usr/lib/python2.6/config/Makefile always inserts -KPIC when
+# building shared objects regardless of the compiler version.
+
+GCC=/usr/gcc/4.7/bin/gcc
+
+newargs=""
+for arg in [email protected]; do
+ case ${arg} in
+ '-KPIC')
+ continue
+ ;;
+ *)
+ newargs="${newargs} ${arg}"
+ ;;
+ esac
+done
+
+exec ${GCC} ${newargs}
--- a/components/python/greenlet/Makefile Tue Dec 17 15:19:48 2013 -0800
+++ b/components/python/greenlet/Makefile Tue Dec 17 15:59:46 2013 -0800
@@ -38,8 +38,12 @@
ASLR_MODE = $(ASLR_NOT_APPLICABLE)
+COMPILER = gcc
+CC = $(COMPONENT_DIR)/CC.sh
+# Parfait doesn't work with the GNU 4.7 compilers yet.
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
COMPILER = gcc3
-gcc_OPT = -O2
+endif
COMPONENT_PRE_BUILD_ACTION = \
$(MKDIR) $(SOURCE_DIR)/64
--- a/components/rsyslog/Makefile Tue Dec 17 15:19:48 2013 -0800
+++ b/components/rsyslog/Makefile Tue Dec 17 15:59:46 2013 -0800
@@ -35,7 +35,11 @@
include ../../make-rules/configure.mk
include ../../make-rules/ips.mk
-COMPILER = gcc3
+COMPILER = gcc
+# Parfait doesn't work with the GNU 4.7 compilers yet.
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
+COMPILER = gcc3
+endif
# This is needed for things to be built correctly.
CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
--- a/components/samba/samba/Makefile Tue Dec 17 15:19:48 2013 -0800
+++ b/components/samba/samba/Makefile Tue Dec 17 15:59:46 2013 -0800
@@ -52,7 +52,11 @@
ifeq ($(MACH), sparc)
COMPILER = studio
else
-COMPILER = gcc3
+COMPILER = gcc
+# Parfait doesn't work with the GNU 4.7 compilers yet.
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
+COMPILER = gcc3
+endif
endif
include ../../../make-rules/prep.mk
@@ -118,6 +122,7 @@
cd $(BUILD_DIR) ; $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2)
CFLAGS.studio += $(studio_C99_ENABLE)
+CFLAGS.gcc += -std=c99
CFLAGS.gcc3 += -std=c99
#CPPFLAGS += -DSAMBA_VERSION_VENDOR_SUFFIX=\\\"Placeholder_for_vendor_suffix\\\"
--- a/components/squid/Makefile Tue Dec 17 15:19:48 2013 -0800
+++ b/components/squid/Makefile Tue Dec 17 15:59:46 2013 -0800
@@ -41,7 +41,11 @@
include ../../make-rules/configure.mk
include ../../make-rules/ips.mk
-COMPILER = gcc3
+COMPILER = gcc
+# Parfait doesn't work with the GNU 4.7 compilers yet.
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
+COMPILER = gcc3
+endif
CFLAGS += -I/usr/include/kerberosv5
CFLAGS += $(CPP_LARGEFILES)
--- a/components/webalizer/Makefile Tue Dec 17 15:19:48 2013 -0800
+++ b/components/webalizer/Makefile Tue Dec 17 15:59:46 2013 -0800
@@ -48,7 +48,11 @@
$(GSED) -i -e 's?lib/httpd/logs/?apache2/2.2/logs/?' \
$(SOURCE_DIR)/sample.conf
+COMPILER = gcc
+# Parfait doesn't work with the GNU 4.7 compilers yet.
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
COMPILER = gcc3
+endif
CONFIGURE_OPTIONS += --enable-dns
CONFIGURE_OPTIONS += --with-gd=/usr/include/gd2
@@ -56,12 +60,9 @@
CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)"
# webalizer is defining u_int64_t but also uses db.h
-# which typedefs it, and parfait isn't happy.
-# gcc4 may not be as well.
-ifeq ($(strip $(PARFAIT_BUILD)),yes)
+# which typedefs it, and parfait and gcc 4.7 aren't happy.
CC += -Du_int64_t=uint64_t
CONFIGURE_OPTIONS += c_cv_type_u_int64_t=yes
-endif
# Needed to correctly build that 64-bit library.
LDFLAGS += $(CC_BITS)