18268971 gmake test broken in gcc47 s11-update
authorNorm Jacobs <Norm.Jacobs@Oracle.COM>
Fri, 21 Mar 2014 00:13:55 -0700
branchs11-update
changeset 2995 818a00a3e899
parent 2994 3705b92dce6a
child 2996 9d8e1fd67549
18268971 gmake test broken in gcc47
components/gcc47/Makefile
components/gcc47/developer-gcc4-gcc-c++-47.p5m
components/gcc47/gcc_post_install_processing.sh
--- a/components/gcc47/Makefile	Thu Mar 20 12:07:13 2014 -0700
+++ b/components/gcc47/Makefile	Fri Mar 21 00:13:55 2014 -0700
@@ -47,21 +47,24 @@
 # 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 
-CFLAGS_FOR_BUILD=$(CFLAGS)
+CXXFLAGS=-g -O2 
 
-# CC_BITS may get in the way
-CC_BITS=
+# direct binding cause various testsuite failures
+LD_B_DIRECT=
 
-# LD_OPTIONS
+# /usr/lib/ld/map.noexdata destroys Intel
+LD_MAP_NOEXDATA.i386=
+
 # /usr/lib/ld/map.noexbss  destroys SPARC
-# /usr/lib/ld/map.noexdata destroys Intel
-GCC_LD_OPTIONS.sparc=-M /usr/lib/ld/map.noexstk -M /usr/lib/ld/map.pagealign -z ignore
-GCC_LD_OPTIONS.i386=-M /usr/lib/ld/map.noexstk -M /usr/lib/ld/map.pagealign -z ignore
-GCC_LD_OPTIONS = $(GCC_LD_OPTIONS.$(MACH))
-LD_OPTIONS := $(GCC_LD_OPTIONS)
+ifeq ($(MACH),sparc)
+LD_MAP_NOEXBSS=
+endif
 
+# for some reason the fixincludes target fails with bash on Solaris.
 CONFIG_SHELL = /bin/sh
 MAKESHELL = /bin/sh
+COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL)
+COMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL)
 
 CONFIGURE_PREFIX = /usr/gcc/4.7
 
@@ -74,7 +77,6 @@
 CONFIGURE_OPTIONS +=	--without-gnu-ld --with-ld=/usr/bin/ld
 
 CONFIGURE_ENV     += PYTHON="$(PYTHON)"
-CONFIGURE_ENV     += LD_OPTIONS="$(LD_OPTIONS)"
 
 # sparc and x86 use different assemblers
 CONFIGURE_OPTIONS.sparc +=	--without-gnu-as --with-as=/usr/bin/as
@@ -82,25 +84,18 @@
 CONFIGURE_OPTIONS +=    $(CONFIGURE_OPTIONS.$(MACH))
 
 CONFIGURE_OPTIONS +=	CFLAGS="$(CFLAGS)"
-
-COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL)
-COMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL)
+CONFIGURE_OPTIONS +=	CXXFLAGS="$(CXXFLAGS)"
 
 COMPONENT_BUILD_TARGETS=bootstrap
 
+# compile python modules
 COMPONENT_POST_INSTALL_ACTION = \
-    ( cd $(PROTOUSRDIR)/gcc/4.7/lib  ; \
-	$(PYTHON) -m compileall . ; \
-      cd $(PROTOUSRDIR)/gcc/4.7/lib/$(MACH64) ; \
-	$(PYTHON) -m compileall . ; \
-      cd $(PROTOUSRDIR)/gcc/4.7/share/gcc-4.7.3/python/libstdcxx ; \
-	$(PYTHON) -m compileall . ; \
-      cd $(PROTOUSRDIR)/gcc/4.7/share/gcc-4.7.3/python/libstdcxx/v6 ; \
-	$(PYTHON) -m compileall . ; \
-      cd $(COMPONENT_DIR) ; \
-	chmod 0755 ./gcc_post_install_processing.sh ; \
-	$(SHELL) ./gcc_post_install_processing.sh -protodir=$(PROTO_DIR) \
-	  -python=$(PYTHON) -gccversion=$(COMPONENT_VERSION) )
+    ( gfind $(PROTOUSRDIR) -name '*.py' | xargs -n 1 dirname | sort -u | \
+        xargs $(PYTHON) -m compileall )
+# strip elves, strip ignores non-elf files
+COMPONENT_POST_INSTALL_ACTION += ; \
+    ( gfind $(PROTOUSRDIR) -type f -perm /0111 | xargs /usr/bin/strip -x \
+        2>/dev/null ; exit 0 )
 
 # ASLR has side-effects with libitm and libgomp.
 # Disable ASLR for now.
@@ -111,17 +106,16 @@
 install:	$(INSTALL_32)
 
 # To ensure that all tests that are expected to pass actually
-# pass, we have to increase the stacksize limit to at least 
-# 16384 Kb. Otherwise we'll get spurious failures in the test
+# pass, we have to increase the stacksize limit to at least
+# 16MB. Otherwise we'll get spurious failures in the test
 # harness (gcc.c-torture/compile/limits-exprparen.c and others).
-# With the soft stacksize limit set to 16384 we get very good
+# With the soft stacksize limit set to 16384 we get reasonably good
 # test results.
-test:
-	( cd $(BUILD_DIR_32)/gcc ; \
-	    ulimit -Ss 16384 ; \
-	    env - LD_OPTIONS=$(LD_OPTIONS) $(GMAKE) -k -i check ; \
-	    cd $(BUILD_DIR_32) ; \
-	    env - LD_OPTIONS=$(LD_OPTIONS) $(GMAKE) -k -i check-target )
+COMPONENT_PRE_TEST_ACTION = ulimit -Ss 16384
+COMPONENT_TEST_ARGS = -k -i
+COMPONENT_TEST_TARGETS = check check-target
+
+test:	$(TEST_32)
 
 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
 
--- a/components/gcc47/developer-gcc4-gcc-c++-47.p5m	Thu Mar 20 12:07:13 2014 -0700
+++ b/components/gcc47/developer-gcc4-gcc-c++-47.p5m	Fri Mar 21 00:13:55 2014 -0700
@@ -740,14 +740,18 @@
 #
 # GNU C++ Standard Library Python gdb support
 #
+
+<transform file path=usr/(share/gcc.+\.py) -> \
+    set action.hash usr/gcc/4.7/%<1> >
+<transform file path=usr/share/gdb/auto-load/usr/(lib/.+\.py) -> \
+    set action.hash usr/gcc/4.7/%<1> >
+
 file path=usr/gcc/4.7/lib/libstdc++.so.6.0.17-gdb.py
 file path=usr/gcc/4.7/lib/$(MACH64)/libstdc++.so.6.0.17-gdb.py
 
-file usr/gcc/4.7/lib/libstdc++.so.6.0.17-gdb.py \
-  path=usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.17-gdb.py
+file path=usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.17-gdb.py
 
-file usr/gcc/4.7/lib/$(MACH64)/libstdc++.so.6.0.17-gdb.py \
-  path=usr/share/gdb/auto-load/usr/lib/$(MACH64)/libstdc++.so.6.0.17-gdb.py
+file path=usr/share/gdb/auto-load/usr/lib/$(MACH64)/libstdc++.so.6.0.17-gdb.py
 
 file path=usr/gcc/4.7/lib/libsupc++.a
 
@@ -757,14 +761,11 @@
 
 file path=usr/gcc/4.7/share/gcc-$(COMPONENT_VERSION)/python/libstdcxx/v6/printers.py
 
-file usr/gcc/4.7/share/gcc-$(COMPONENT_VERSION)/python/libstdcxx/__init__.py \
-  path=usr/share/gcc-$(COMPONENT_VERSION)/python/libstdcxx/__init__.py
+file path=usr/share/gcc-$(COMPONENT_VERSION)/python/libstdcxx/__init__.py
 
-file usr/gcc/4.7/share/gcc-$(COMPONENT_VERSION)/python/libstdcxx/v6/__init__.py \
-  path=usr/share/gcc-$(COMPONENT_VERSION)/python/libstdcxx/v6/__init__.py
+file path=usr/share/gcc-$(COMPONENT_VERSION)/python/libstdcxx/v6/__init__.py
 
-file usr/gcc/4.7/share/gcc-$(COMPONENT_VERSION)/python/libstdcxx/v6/printers.py \
-  path=usr/share/gcc-$(COMPONENT_VERSION)/python/libstdcxx/v6/printers.py
+file path=usr/share/gcc-$(COMPONENT_VERSION)/python/libstdcxx/v6/printers.py
 
 file path=usr/gcc/4.7/share/man/man1/g++.1
 link path=usr/share/man/man1/c++.1 \
--- a/components/gcc47/gcc_post_install_processing.sh	Thu Mar 20 12:07:13 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-#!/bin/bash
-
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
-#
-
-PROTODIR=""
-PYTHON=""
-INSTALLDIR=""
-LIBGCCDIR=""
-MACH="`uname -p`"
-SED="/usr/gnu/bin/sed"
-STRIP="/usr/bin/strip -x"
-# Solaris 11 uname does not support -o
-UNAME="/usr/gnu/bin/uname"
-GCC_FULL_VERSION=""
-
-UNKNOWN_ARG=yes
-PRINT_HELP=no
-
-while [ "$#" -gt 0 ] ; do
-  UNKNOWN_ARG=no
-  case "$1" in
-    -protodir=*)
-      export PROTODIR=`echo $1 | ${SED} "s,^-protodir=\(.*\),\1,"`
-      ;;
-    -python=*)
-      export PYTHON=`echo $1 | ${SED} "s,^-python=\(.*\),\1,"`
-      ;;
-    -gccversion=*)
-      export GCC_FULL_VERSION=`echo $1 | ${SED} "s,^-gccversion=\(.*\),\1,"`
-      ;;
-    *)
-      UNKNOWN_ARG=yes
-      ;;
-  esac
-
-  if [ "$UNKNOWN_ARG" = "yes" ] ; then
-    echo "$1: Invalid argument"
-    PRINT_HELP=yes
-    shift
-    continue
-  fi
-  shift
-done
-
-if [ "$PRINT_HELP" = "yes" ] || [ "$UNKNOWN_ARG" = "yes" ] ; then
-  echo ""
-  echo "Usage: `basename $0` -protodir=[ build area prototype directory ]"
-  echo "        -python=[ Python interpreter to use ]"
-  echo ""
-  exit 1
-fi
-
-if [ ${MACH} = "i386" ] ; then
-  export MACH64="amd64"
-  export VENDOR="pc"
-else
-  export MACH64="sparcv9"
-  export VENDOR="sun"
-fi
-
-gcc_maj="`echo ${GCC_FULL_VERSION} | cut -d . -f 1`"
-gcc_min="`echo ${GCC_FULL_VERSION} | cut -d . -f 2`"
-GCC_VERSION="${gcc_maj}.${gcc_min}"
-
-export RELEASE="`${UNAME} -r | cut -d . -f 2`"
-export OS="`${UNAME} -o | /usr/gnu/bin/tr -s '[:upper:]' '[:lower:]'`"
-export GCC_TRIPLE="${MACH}-${VENDOR}-${OS}2.${RELEASE}"
-
-export MACH MACH64 SED STRIP GCC_VERSION GCC_FULL_VERSION PYTHON
-
-export BINDIR="${PROTODIR}/usr/gcc/${GCC_VERSION}/bin"
-export LIBDIR="${PROTODIR}/usr/gcc/${GCC_VERSION}/lib"
-export LIB64DIR="${PROTODIR}/usr/gcc/${GCC_VERSION}/lib/${MACH64}"
-export GCCSHAREDIR="${PROTODIR}/usr/gcc/${GCC_VERSION}/share"
-export GCCUSRSHAREDIR="${PROTODIR}/usr/share/gcc-${GCC_FULL_VERSION}"
-export GDBSHAREDIR="${PROTODIR}/usr/share/gdb"
-export LIBGCCDIR="${PROTODIR}/usr/gcc/${GCC_VERSION}/lib/gcc"
-export GCCTRIPLEDIR="${LIBGCCDIR}/${GCC_TRIPLE}/${GCC_FULL_VERSION}"
-export LIBTRIPLEDIR="${LIBDIR}/gcc/${GCC_TRIPLE}/${GCC_FULL_VERSION}"
-
-echo "Stripping GCC binaries ... "
-
-for file in \
-  c++ \
-  cpp \
-  g++ \
-  gcc \
-  gcc-ar \
-  gcc-nm \
-  gcc-ranlib \
-  gcov \
-  gfortran \
-  ${GCC_TRIPLE}-c++ \
-  ${GCC_TRIPLE}-g++ \
-  ${GCC_TRIPLE}-gcc \
-  ${GCC_TRIPLE}-gcc-${GCC_FULL_VERSION} \
-  ${GCC_TRIPLE}-gcc-ar \
-  ${GCC_TRIPLE}-gcc-nm \
-  ${GCC_TRIPLE}-gcc-ranlib \
-  ${GCC_TRIPLE}-gfortran
-do
-  ${STRIP} ${BINDIR}/${file}
-done
-
-for file in \
-  libgfortran.so.3.0.0 \
-  libgomp.so.1.0.0 \
-  libitm.so.1.0.0 \
-  libobjc.so.4.0.0 \
-  libssp.so.0.0.0
-do
-  ${STRIP} ${LIBDIR}/${file}
-  ${STRIP} ${LIB64DIR}/${file}
-done
-
-# libquadmath is not available on SPARC.
-if [ "${MACH}" = "i386" ] ; then
-  ${STRIP} ${LIBDIR}/libquadmath.so.0.0.0
-  ${STRIP} ${LIB64DIR}/libquadmath.so.0.0.0
-fi
-
-for file in \
-  cc1 \
-  cc1obj \
-  cc1plus \
-  collect2 \
-  f951 \
-  liblto_plugin.so.0.0.0 \
-  lto-wrapper \
-  lto1
-do
-  ${STRIP} ${GCCTRIPLEDIR}/${file}
-done
-
-echo "... Done."
-echo ""
-echo "Copying GCC's gdb Python files ... "
-
-mkdir -p ${GDBSHAREDIR}/auto-load/usr/lib/${MACH64}
-mkdir -p ${GCCUSRSHAREDIR}/python/libstdcxx/v6
-
-cp -p ${LIBDIR}/libstdc++.so.6.0.17-gdb.py ${GDBSHAREDIR}/auto-load/usr/lib/
-cp -p ${LIB64DIR}/libstdc++.so.6.0.17-gdb.py ${GDBSHAREDIR}/auto-load/usr/lib/${MACH64}
-cp -p ${GCCSHAREDIR}/gcc-${GCC_FULL_VERSION}/python/libstdcxx/__init__.py \
-  ${GCCUSRSHAREDIR}/python/libstdcxx/
-cp -p ${GCCSHAREDIR}/gcc-${GCC_FULL_VERSION}/python/libstdcxx/v6/__init__.py \
-  ${GCCUSRSHAREDIR}/python/libstdcxx/v6/
-cp -p ${GCCSHAREDIR}/gcc-${GCC_FULL_VERSION}/python/libstdcxx/v6/printers.py \
-  ${GCCUSRSHAREDIR}/python/libstdcxx/v6/printers.py
-
-cd ${GDBSHAREDIR}/auto-load/usr/lib/
-${PYTHON} -m compileall .
-
-cd ${GCCUSRSHAREDIR}/python/libstdcxx/
-${PYTHON} -m compileall .
-
-cd ${GCCUSRSHAREDIR}/python/libstdcxx/v6/
-${PYTHON} -m compileall .
-
-echo "... Done."
-echo""
-exit 0