--- a/components/gcc45/Makefile Wed Mar 30 10:16:56 2016 -0700
+++ b/components/gcc45/Makefile Wed Mar 30 13:33:31 2016 -0700
@@ -18,15 +18,16 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+
#
+# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+#
+BUILD_BITS= 32
include ../../make-rules/shared-macros.mk
COMPONENT_NAME= gcc
COMPONENT_VERSION= 4.5.2
COMPONENT_PROJECT_URL= http://gcc.gnu.org/
-COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
-COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= \
sha256:07b880faf29f3f9d9c0953717002ac29f5d061427797d2487a7c9c169e6395b3
COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
@@ -39,11 +40,9 @@
TPNO= 4456
-include $(WS_MAKE_RULES)/prep.mk
-include $(WS_MAKE_RULES)/configure.mk
-include $(WS_MAKE_RULES)/ips.mk
+include $(WS_MAKE_RULES)/gnu-component.mk
-PATH=/usr/bin:/usr/gnu/bin:/usr/perl5/bin
+PATH=$(USRBINDIR):$(GNUBIN):/usr/perl5/bin
PARCH = $(MACH:i386=i386-pc)
GNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION)
@@ -53,6 +52,7 @@
# This product bootstraps itself. The gcc flags are not the same
# as Studio flags. -O2 means different things for the two compilers
CFLAGS=-g -O2
+CXXFLAGS=$(CFLAGS)
CFLAGS_FOR_BUILD=$(CFLAGS)
# CC_BITS may get in the way
@@ -60,26 +60,24 @@
CONFIG_SHELL = /bin/sh
-CONFIGURE_PREFIX = /usr/gcc/4.5
+CONFIGURE_PREFIX = /usr/gcc/4.5
+CONFIGURE_INFODIR = $(CONFIGURE_PREFIX)/share/info
-CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_PREFIX)/share/info
+CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
CONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib
CONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc"
CONFIGURE_OPTIONS += --enable-shared
-CONFIGURE_OPTIONS += --with-gmp-include=/usr/include/gmp
-CONFIGURE_OPTIONS += --with-mpfr-include=/usr/include/mpfr
-CONFIGURE_OPTIONS += --without-gnu-ld --with-ld=/usr/bin/ld
+CONFIGURE_OPTIONS += --with-gmp-include=$(USRINCDIR)/gmp
+CONFIGURE_OPTIONS += --with-mpfr-include=$(USRINCDIR)/mpfr
+CONFIGURE_OPTIONS += --without-gnu-ld --with-ld=$(LD)
COMPONENT_POST_UNPACK_ACTION = \
( cd $(COMPONENT_DIR) ; \
tar xf testsuite-$(COMPONENT_VERSION).tar.gz )
# sparc and x86 use different assemblers
-CONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=/usr/bin/as
-CONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=/usr/gnu/bin/as
-CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(MACH))
-
-CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
+CONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=$(USRBINDIR)/as
+CONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=$(GNUBIN)/as
# Keep ASLR disabled (the default) for gcc 4.5; build often core dumps with ASLR
ASLR_MODE = $(ASLR_DISABLE)
@@ -98,16 +96,6 @@
COMPONENT_TEST_CMD = ulimit -Ss 16384 ; $(GMAKE)
COMPONENT_TEST_ARGS = -k -i
-configure: $(CONFIGURE_32)
-
-build: $(BUILD_32)
-
-install: $(INSTALL_32)
-
-test: $(TEST_32)
-
-system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
-
REQUIRED_PACKAGES += developer/assembler
REQUIRED_PACKAGES += developer/gnu-binutils
@@ -115,7 +103,6 @@
REQUIRED_PACKAGES += library/mpc
REQUIRED_PACKAGES += library/mpfr
REQUIRED_PACKAGES += shell/ksh93
-REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/gcc-45-runtime
REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
REQUIRED_PACKAGES += system/library/math