components/gcc5/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Thu, 23 Feb 2017 13:46:52 -0800
changeset 7687 1093e2a9adbd
parent 7297 fbb1e830e28f
child 7812 ffe9ca8c9421
permissions -rw-r--r--
25590368 Userland components should include "upstream" release tracking information
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     1
#
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     3
#
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     7
#
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    12
#
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    18
#
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    20
#
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
    21
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
    22
#
7687
1093e2a9adbd 25590368 Userland components should include "upstream" release tracking information
Rich Burridge <rich.burridge@oracle.com>
parents: 7297
diff changeset
    23
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    24
#
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    25
export PARFAIT_BUILD=no
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
    26
BUILD_BITS= 64
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
    27
COMPILER= gcc
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    28
include ../../make-rules/shared-macros.mk
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    29
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    30
COMPONENT_NAME=		gcc
6943
88b49026f0cc 23076921 GCC 5.4 upgrade for cilk-plus patches
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 6859
diff changeset
    31
COMPONENT_VERSION=	5.4.0
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    32
COMPONENT_PROJECT_URL=	http://gcc.gnu.org/
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    33
COMPONENT_ARCHIVE_HASH= \
6943
88b49026f0cc 23076921 GCC 5.4 upgrade for cilk-plus patches
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 6859
diff changeset
    34
    sha256:37089e80c3f2e9a0663d7ccc51c2a6c7dbbf3275bc1e4ed1ed3b1460cd5b3030
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    35
COMPONENT_ARCHIVE_URL=	http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    36
COMPONENT_BUGDB=        utility/gnu-compiler
7687
1093e2a9adbd 25590368 Userland components should include "upstream" release tracking information
Rich Burridge <rich.burridge@oracle.com>
parents: 7297
diff changeset
    37
COMPONENT_ANITYA_ID=	6502
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    38
6943
88b49026f0cc 23076921 GCC 5.4 upgrade for cilk-plus patches
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 6859
diff changeset
    39
TPNO=			29354
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    40
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
    41
# Use gcc's default flags instead of userland's.
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
    42
CFLAGS=
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
    43
CPPFLAGS=
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
    44
CXXFLAGS=
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
    45
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
    46
include $(WS_MAKE_RULES)/common.mk
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    47
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    48
# The GNU compiler wants the GNU utilities.
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
    49
PATH=$(GNUBIN):$(USRBINDIR):$(USRDIR)/perl5/bin
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    50
7126
c0715e78cafb 24912627 gcc5 uses wrong triple on sparc
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 6943
diff changeset
    51
PARCH =         $(MACH:i386=x86_64-pc)
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    52
GNU_ARCH =      $(PARCH:sparc=sparcv9-sun)-solaris$(SOLARIS_VERSION)
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    53
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    54
PKG_MACROS +=   GNU_ARCH="$(GNU_ARCH)"
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    55
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    56
VERSION_NUMBERS = $(subst ., ,$(COMPONENT_VERSION))
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    57
GCC_VERSION=$(word 1,$(VERSION_NUMBERS)).$(word 2,$(VERSION_NUMBERS))
6859
569bef81e3c4 22991497 /usr/gcc/5.3 should be /usr/gcc/5
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 5682
diff changeset
    58
GCC_MAJOR_VERSION=$(word 1,$(VERSION_NUMBERS))
569bef81e3c4 22991497 /usr/gcc/5.3 should be /usr/gcc/5
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 5682
diff changeset
    59
PKG_MACROS +=	GCC_MAJOR_VERSION=$(GCC_MAJOR_VERSION)
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    60
PKG_MACROS +=	GCC_VERSION=$(GCC_VERSION)
6859
569bef81e3c4 22991497 /usr/gcc/5.3 should be /usr/gcc/5
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 5682
diff changeset
    61
PKG_MACROS +=	GCC_BASEDIR=$(CONFIGURE_PREFIX)
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    62
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    63
# direct binding causes various testsuite failures
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    64
LD_B_DIRECT=
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    65
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    66
# /usr/lib/ld/map.noexdata destroys Intel
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    67
LD_MAP_NOEXDATA.i386=
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    68
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
    69
# /usr/lib/ld/map.noexbss destroys SPARC
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
    70
LD_MAP_NOEXBSS.sparc=
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    71
7245
934578b959f0 20029192 Userland should build with ld -z sx=nx* flags instead of map.noexstk
Enrico Perla <enrico.perla@oracle.com>
parents: 7126
diff changeset
    72
# Mapfiles map.noexdata and map.noexbss mark the data + bss and bss
934578b959f0 20029192 Userland should build with ld -z sx=nx* flags instead of map.noexstk
Enrico Perla <enrico.perla@oracle.com>
parents: 7126
diff changeset
    73
# segments non executable on x86 and SPARC respectively. The protection
934578b959f0 20029192 Userland should build with ld -z sx=nx* flags instead of map.noexstk
Enrico Perla <enrico.perla@oracle.com>
parents: 7126
diff changeset
    74
# extends to the heap segment, if the heap is brk based, as is the case
934578b959f0 20029192 Userland should build with ld -z sx=nx* flags instead of map.noexstk
Enrico Perla <enrico.perla@oracle.com>
parents: 7126
diff changeset
    75
# with gcc. Since the introduction of NXHEAP, this is controlled
934578b959f0 20029192 Userland should build with ld -z sx=nx* flags instead of map.noexstk
Enrico Perla <enrico.perla@oracle.com>
parents: 7126
diff changeset
    76
# separately by the NXHEAP extension itself. Whether the heap should be
934578b959f0 20029192 Userland should build with ld -z sx=nx* flags instead of map.noexstk
Enrico Perla <enrico.perla@oracle.com>
parents: 7126
diff changeset
    77
# executable or not should be reevaluated. For now, try to avoid
934578b959f0 20029192 Userland should build with ld -z sx=nx* flags instead of map.noexstk
Enrico Perla <enrico.perla@oracle.com>
parents: 7126
diff changeset
    78
# "destruction" as hinted above.
934578b959f0 20029192 Userland should build with ld -z sx=nx* flags instead of map.noexstk
Enrico Perla <enrico.perla@oracle.com>
parents: 7126
diff changeset
    79
NXHEAP_MODE = $(NXHEAP_DISABLE)
934578b959f0 20029192 Userland should build with ld -z sx=nx* flags instead of map.noexstk
Enrico Perla <enrico.perla@oracle.com>
parents: 7126
diff changeset
    80
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    81
# for some reason the fixincludes target fails with bash on Solaris.
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    82
CONFIG_SHELL = /bin/sh
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    83
MAKESHELL = /bin/sh
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    84
COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL)
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    85
COMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL)
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    86
6859
569bef81e3c4 22991497 /usr/gcc/5.3 should be /usr/gcc/5
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 5682
diff changeset
    87
CONFIGURE_PREFIX =	/usr/gcc/$(GCC_MAJOR_VERSION)
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
    88
CONFIGURE_INFODIR =	$(CONFIGURE_PREFIX)/share/info
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    89
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    90
# We are going to build the 64-bit version of the compiler and tools, but we
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    91
# want it to install in the normal .../{bin|lib}/... locations.  GCC will
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    92
# take care of building and putting 32/64 bit objects in the right place
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    93
# under there.
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    94
CONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    95
CONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    96
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
    97
CONFIGURE_OPTIONS +=	--infodir=$(CONFIGURE_INFODIR)
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    98
CONFIGURE_OPTIONS +=	--libexecdir=$(CONFIGURE_PREFIX)/lib
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    99
CONFIGURE_OPTIONS +=	--enable-languages="c,c++,fortran,objc"
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   100
CONFIGURE_OPTIONS +=	--enable-shared
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   101
CONFIGURE_OPTIONS +=	--enable-initfini-array
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   102
CONFIGURE_OPTIONS +=	--disable-rpath
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   103
CONFIGURE_OPTIONS +=	--with-system-zlib
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   104
CONFIGURE_OPTIONS +=	--with-build-config=no
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
   105
CONFIGURE_OPTIONS +=	--with-gmp-include=$(USRINCDIR)/gmp
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
   106
CONFIGURE_OPTIONS +=	--with-mpfr-include=$(USRINCDIR)/mpfr
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
   107
CONFIGURE_OPTIONS +=	--without-gnu-ld --with-ld=$(USRBINDIR)/ld
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5419
diff changeset
   108
CONFIGURE_OPTIONS +=	--with-gnu-as --with-as=$(GNUBIN)/as
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   109
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   110
# If the compiler used to build matches the compiler being built, there is no
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   111
# need for a 3 stage build.
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   112
ifneq ($(shell $(CC) --version | grep $(COMPONENT_VERSION)),)
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   113
CONFIGURE_OPTIONS +=    --disable-bootstrap
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   114
else
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   115
COMPONENT_BUILD_TARGETS=bootstrap
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   116
endif
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   117
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   118
CONFIGURE_OPTIONS +=	BOOT_CFLAGS='-g -O2'
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   119
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   120
# This is the target and it must be last
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   121
CONFIGURE_OPTIONS +=    $(GNU_ARCH)
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   122
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   123
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   124
CONFIGURE_ENV     += PYTHON="$(PYTHON)"
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   125
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   126
# compile python modules
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   127
COMPONENT_POST_INSTALL_ACTION = \
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   128
	( gfind $(PROTO_DIR)$(CONFIGURE_PREFIX) -name '*.py' | \
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   129
	  xargs -n 1 dirname | sort -u | \
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   130
	  xargs $(PYTHON) -m compileall )
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   131
7297
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   132
COMPONENT_BUILD_ARGS += $(JOBS:%=-j%)
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   133
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   134
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   135
COMPONENT_PRE_TEST_ENV += TCL_LIBRARY="$(USRLIBDIR)/tcl8.5"
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   136
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   137
# We don't have DejaGNU in S11.
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   138
ifeq ($(OS_VERSION), 5.12)
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   139
  COMPONENT_PRE_TEST_ENV += DEJAGNULIBS="$(USRSHAREDIR)/dejagnu"
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   140
endif
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   141
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   142
#
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   143
# Run the tests and generate a summary report, then output the summary
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   144
# report into the results file.
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   145
#
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   146
# To ensure that all tests that are expected to pass actually
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   147
# pass, we have to increase the stacksize limit to at least
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   148
# 16MB. Otherwise we'll get spurious failures in the test
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   149
# harness (gcc.c-torture/compile/limits-exprparen.c and others).
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   150
# With the soft stacksize limit set to 16384 we get reasonably good
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   151
# test results.
7297
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   152
#
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   153
COMPONENT_PRE_TEST_ACTION += \
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   154
	(cd $(COMPONENT_TEST_DIR) ; \
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   155
	 ulimit -Ss 16385 ; \
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   156
	 $(ENV) $(COMPONENT_PRE_TEST_ENV) \
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   157
	        $(GMAKE) -k -i $(JOBS:%=-j%) check check-target ; \
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   158
	 $(GMAKE) mail-report.log)
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   159
7297
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   160
COMPONENT_TEST_CMD = $(CAT)
fbb1e830e28f 24971443 gcc4 and gcc5 have broken test patch
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 7245
diff changeset
   161
COMPONENT_TEST_TARGETS = mail-report.log
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   162
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   163
# Master test results are different between x86 and SPARC.
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   164
COMPONENT_TEST_MASTER = \
6943
88b49026f0cc 23076921 GCC 5.4 upgrade for cilk-plus patches
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 6859
diff changeset
   165
	$(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
5342
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   166
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   167
REQUIRED_PACKAGES += developer/test/dejagnu
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   168
REQUIRED_PACKAGES += library/gmp
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   169
REQUIRED_PACKAGES += library/isl
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   170
REQUIRED_PACKAGES += library/mpc
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   171
REQUIRED_PACKAGES += library/mpfr
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   172
REQUIRED_PACKAGES += library/zlib
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   173
REQUIRED_PACKAGES += runtime/tcl-8
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   174
REQUIRED_PACKAGES += shell/bash
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   175
REQUIRED_PACKAGES += shell/ksh93
e55d87e99ecd PSARC/2015/499 GCC v5.3, v4.9.3, and more
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   176
REQUIRED_PACKAGES += system/library/math