--- a/components/gcc47/Makefile Fri Mar 21 00:13:55 2014 -0700
+++ b/components/gcc47/Makefile Fri Mar 21 00:13:55 2014 -0700
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
#
include ../../make-rules/shared-macros.mk
@@ -44,6 +44,13 @@
PKG_MACROS += GNU_ARCH="$(GNU_ARCH)"
+VERSION_NUMBERS = $(subst ., ,$(COMPONENT_VERSION))
+GCC_VERSION=$(word 1,$(VERSION_NUMBERS)).$(word 2,$(VERSION_NUMBERS))
+PKG_MACROS += GCC_VERSION=$(GCC_VERSION)
+PKG_MACROS += GCC_V=$(word 1,$(VERSION_NUMBERS))$(word 2,$(VERSION_NUMBERS))
+PKG_MACROS += GCC_BASEDIR=usr/gcc/$(GCC_VERSION)
+
+
# 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