components/gcc49/Makefile
changeset 5682 94c0ca64c022
parent 5439 a006e5bb8577
child 5784 b08ada1b6001
equal deleted inserted replaced
5681:b8fe51f35344 5682:94c0ca64c022
    16 # fields enclosed by brackets "[]" replaced with your own identifying
    16 # fields enclosed by brackets "[]" replaced with your own identifying
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
    18 #
    18 #
    19 # CDDL HEADER END
    19 # CDDL HEADER END
    20 #
    20 #
       
    21 
       
    22 #
    21 # Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
    23 # Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
    22 #
    24 #
    23 export PARFAIT_BUILD=no
    25 export PARFAIT_BUILD=no
    24 
    26 BUILD_BITS= 32
    25 COMPILER=gcc
    27 COMPILER= gcc
    26 
       
    27 include ../../make-rules/shared-macros.mk
    28 include ../../make-rules/shared-macros.mk
    28 
    29 
    29 COMPONENT_NAME=		gcc
    30 COMPONENT_NAME=		gcc
    30 COMPONENT_VERSION=	4.9.3
    31 COMPONENT_VERSION=	4.9.3
    31 COMPONENT_PROJECT_URL=	http://gcc.gnu.org/
    32 COMPONENT_PROJECT_URL=	http://gcc.gnu.org/
    32 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    33 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
       
    34 COMPONENT_ARCHIVE_HASH= \
    33 COMPONENT_ARCHIVE_HASH= \
    35     sha256:e6c63b40877bc756cc7cfe6ca98013eb15f02ec6c8c2cf68e24533ad1203aaba
    34     sha256:e6c63b40877bc756cc7cfe6ca98013eb15f02ec6c8c2cf68e24533ad1203aaba
    36 COMPONENT_ARCHIVE_URL=	http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
    35 COMPONENT_ARCHIVE_URL=	http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
    37 COMPONENT_BUGDB=        utility/gnu-compiler
    36 COMPONENT_BUGDB=        utility/gnu-compiler
    38 
    37 
    39 TPNO=			24017
    38 TPNO=			24017
    40 
    39 
    41 include $(WS_MAKE_RULES)/prep.mk
    40 include $(WS_MAKE_RULES)/common.mk
    42 include $(WS_MAKE_RULES)/configure.mk
       
    43 include $(WS_MAKE_RULES)/ips.mk
       
    44 
    41 
    45 # The GNU compiler wants the GNU utilities.
    42 # The GNU compiler wants the GNU utilities.
    46 PATH=/usr/gnu/bin:/usr/bin:/usr/perl5/bin
    43 PATH=$(GNUBIN):$(USRBINDIR):$(USRDIR)/perl5/bin
    47 
    44 
    48 PATCH_LEVEL := 0
    45 PATCH_LEVEL := 0
    49 ENABLE_CLOOG := 1
    46 ENABLE_CLOOG := 1
    50 
    47 
    51 ENABLE_CXA_ATEXIT=yes
       
    52 ifeq ($(OS_VERSION), 5.11)
    48 ifeq ($(OS_VERSION), 5.11)
    53   ENABLE_CXA_ATEXIT=no
    49   ENABLE_CXA_ATEXIT=no
       
    50 else
       
    51   ENABLE_CXA_ATEXIT=yes
    54 endif
    52 endif
    55 
    53 
    56 PARCH =         $(MACH:i386=i386-pc)
    54 PARCH =         $(MACH:i386=i386-pc)
    57 GNU_ARCH =      $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION)
    55 GNU_ARCH =      $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION)
    58 
    56 
   120 
   118 
   121 COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL)
   119 COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL)
   122 COMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL)
   120 COMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL)
   123 COMPONENT_BUILD_ENV += LD_OPTIONS="$(LD_OPTIONS)"
   121 COMPONENT_BUILD_ENV += LD_OPTIONS="$(LD_OPTIONS)"
   124 
   122 
   125 CONFIGURE_PREFIX = /usr/gcc/$(GCC_VERSION)
   123 CONFIGURE_PREFIX =	/usr/gcc/$(GCC_VERSION)
   126 
   124 CONFIGURE_INFODIR =	$(CONFIGURE_PREFIX)/share/info
   127 CONFIGURE_OPTIONS +=	--infodir=$(CONFIGURE_PREFIX)/share/info
   125 
       
   126 CONFIGURE_OPTIONS +=	--infodir=$(CONFIGURE_INFODIR)
   128 CONFIGURE_OPTIONS +=	--libexecdir=$(CONFIGURE_PREFIX)/lib
   127 CONFIGURE_OPTIONS +=	--libexecdir=$(CONFIGURE_PREFIX)/lib
   129 CONFIGURE_OPTIONS +=	--enable-languages="c,c++,fortran,objc,lto"
   128 CONFIGURE_OPTIONS +=	--enable-languages="c,c++,fortran,objc,lto"
   130 CONFIGURE_OPTIONS +=	--enable-shared
   129 CONFIGURE_OPTIONS +=	--enable-shared
   131 CONFIGURE_OPTIONS +=	--enable-ssp=yes
   130 CONFIGURE_OPTIONS +=	--enable-ssp
   132 CONFIGURE_OPTIONS +=	--enable-nls=yes
   131 CONFIGURE_OPTIONS +=	--enable-nls
   133 
   132 
   134 # --enable-largefile=yes gets canceled or reset several times by
   133 # --enable-largefile=yes gets canceled or reset several times by
   135 #  several different ./configure's. We have to re-enable it via
   134 #  several different ./configure's. We have to re-enable it via
   136 #  several different patches.
   135 #  several different patches.
   137 CONFIGURE_OPTIONS +=	--enable-largefile=yes
   136 CONFIGURE_OPTIONS +=	--enable-largefile
   138 CONFIGURE_OPTIONS +=	--with-gmp-include=/usr/include/gmp
   137 CONFIGURE_OPTIONS +=	--with-gmp-include=$(USRINCDIR)/gmp
   139 CONFIGURE_OPTIONS +=	--with-mpfr-include=/usr/include/mpfr
   138 CONFIGURE_OPTIONS +=	--with-mpfr-include=$(USRINCDIR)/mpfr
   140 CONFIGURE_OPTIONS +=	--with-gnu-as --with-as=/usr/gnu/bin/as
   139 CONFIGURE_OPTIONS +=	--with-gnu-as --with-as=$(GNUBIN)/as
   141 CONFIGURE_OPTIONS +=	--without-gnu-ld --with-ld=/usr/bin/ld
   140 CONFIGURE_OPTIONS +=	--without-gnu-ld --with-ld=$(USRBINDIR)/ld
   142 CONFIGURE_OPTIONS +=    --enable-multilib=yes
   141 CONFIGURE_OPTIONS +=    --enable-multilib
   143 CONFIGURE_OPTIONS +=    --enable-threads=posix
   142 CONFIGURE_OPTIONS +=    --enable-threads=posix
   144 CONFIGURE_OPTIONS +=    --enable-tls=yes
   143 CONFIGURE_OPTIONS +=    --enable-tls
   145 CONFIGURE_OPTIONS +=    --enable-libstdcxx-threads=yes
   144 CONFIGURE_OPTIONS +=    --enable-libstdcxx-threads
   146 CONFIGURE_OPTIONS +=    --enable-libstdcxx-pch=no
   145 CONFIGURE_OPTIONS +=    --disable-libstdcxx-pch
   147 CONFIGURE_OPTIONS +=    --enable-libstdcxx-visibility=no
   146 CONFIGURE_OPTIONS +=    --disable-libstdcxx-visibility
   148 
   147 
   149 # This needs additional linker support.
   148 # This needs additional linker support.
   150 CONFIGURE_OPTIONS +=    --enable-initfini-array=yes
   149 CONFIGURE_OPTIONS +=    --enable-initfini-array
   151 
   150 
   152 # VTable verification needs additional linker support.
   151 # VTable verification needs additional linker support.
   153 CONFIGURE_OPTIONS +=    --enable-vtable-verify=no
   152 CONFIGURE_OPTIONS +=    --disable-vtable-verify
   154 CONFIGURE_OPTIONS +=    --enable-comdat=yes
   153 CONFIGURE_OPTIONS +=    --enable-comdat
   155 CONFIGURE_OPTIONS +=    --enable-__cxa_atexit=$(ENABLE_CXA_ATEXIT)
   154 CONFIGURE_OPTIONS +=    --enable-__cxa_atexit=$(ENABLE_CXA_ATEXIT)
   156 CONFIGURE_OPTIONS +=    --enable-libstdcxx-debug=yes
   155 CONFIGURE_OPTIONS +=    --enable-libstdcxx-debug
   157 CONFIGURE_OPTIONS +=    --enable-libstdcxx-threads=yes
   156 CONFIGURE_OPTIONS +=    --enable-libstdcxx-threads
   158 CONFIGURE_OPTIONS +=    --enable-c99=yes
   157 CONFIGURE_OPTIONS +=    --enable-c99
   159 CONFIGURE_OPTIONS +=    --enable-long-long=yes
   158 CONFIGURE_OPTIONS +=    --enable-long-long
   160 CONFIGURE_OPTIONS +=    --enable-wchar_t=yes
   159 CONFIGURE_OPTIONS +=    --enable-wchar_t
   161 CONFIGURE_OPTIONS +=    --with-system-zlib
   160 CONFIGURE_OPTIONS +=    --with-system-zlib
   162 
   161 
   163 # We'll enable ISL and CLooG as soon as CLooG integrates and is
   162 # We'll enable ISL and CLooG as soon as CLooG integrates and is
   164 # available on the build machines.
   163 # available on the build machines.
   165 ifeq ($(ENABLE_CLOOG), 1)
   164 ifeq ($(ENABLE_CLOOG), 1)
   170   CONFIGURE_OPTIONS +=    --with-isl-lib=$(ISLLIB)
   169   CONFIGURE_OPTIONS +=    --with-isl-lib=$(ISLLIB)
   171   CONFIGURE_OPTIONS +=    --with-cloog=$(CLOOG_PREFIX)
   170   CONFIGURE_OPTIONS +=    --with-cloog=$(CLOOG_PREFIX)
   172   CONFIGURE_OPTIONS +=    --with-cloog-include=$(CLOOGINCLUDE)
   171   CONFIGURE_OPTIONS +=    --with-cloog-include=$(CLOOGINCLUDE)
   173   CONFIGURE_OPTIONS +=    --with-cloog-lib=$(CLOOGLIB)
   172   CONFIGURE_OPTIONS +=    --with-cloog-lib=$(CLOOGLIB)
   174 else
   173 else
   175   CONFIGURE_OPTIONS +=    --with-isl=no
   174   CONFIGURE_OPTIONS +=    --without-isl
   176   CONFIGURE_OPTIONS +=    --with-cloog=no
   175   CONFIGURE_OPTIONS +=    --without-cloog
   177 endif
   176 endif
   178 
   177 
   179 CONFIGURE_OPTIONS +=    --with-build-time-tools=/usr/gnu/bin
   178 CONFIGURE_OPTIONS +=    --with-build-time-tools=$(GNUBIN)
   180 CONFIGURE_OPTIONS +=    --with-build-config=bootstrap-O2
   179 CONFIGURE_OPTIONS +=    --with-build-config=bootstrap-O2
   181 CONFIGURE_OPTIONS +=	CFLAGS="$(CFLAGS)"
       
   182 CONFIGURE_OPTIONS +=	CXXFLAGS="$(CXXFLAGS)"
       
   183 CONFIGURE_OPTIONS +=    CPPFLAGS="$(CPPFLAGS)"
       
   184 
   180 
   185 CONFIGURE_ENV     += PYTHON="$(PYTHON)"
   181 CONFIGURE_ENV     += PYTHON="$(PYTHON)"
   186 
   182 
   187 COMPONENT_BUILD_TARGETS=bootstrap
   183 COMPONENT_BUILD_TARGETS=bootstrap
   188 
   184 
   197         2>/dev/null ; exit 0 )
   193         2>/dev/null ; exit 0 )
   198 
   194 
   199 # ASLR has side-effects with libitm and libgomp.
   195 # ASLR has side-effects with libitm and libgomp.
   200 # Disable ASLR for now.
   196 # Disable ASLR for now.
   201 ASLR_MODE=$(ASLR_DISABLE)
   197 ASLR_MODE=$(ASLR_DISABLE)
   202 
       
   203 configure:	$(CONFIGURE_32)
       
   204 
       
   205 build:		$(BUILD_32)
       
   206 
       
   207 install:	$(INSTALL_32)
       
   208 
   198 
   209 # To ensure that all tests that are expected to pass actually
   199 # To ensure that all tests that are expected to pass actually
   210 # pass, we have to increase the stacksize limit to at least
   200 # pass, we have to increase the stacksize limit to at least
   211 # 16MB. Otherwise we'll get spurious failures in the test
   201 # 16MB. Otherwise we'll get spurious failures in the test
   212 # harness (gcc.c-torture/compile/limits-exprparen.c and others).
   202 # harness (gcc.c-torture/compile/limits-exprparen.c and others).
   214 # test results.
   204 # test results.
   215 COMPONENT_PRE_TEST_ACTION = ulimit -Ss 16384
   205 COMPONENT_PRE_TEST_ACTION = ulimit -Ss 16384
   216 COMPONENT_TEST_ARGS = -k -i
   206 COMPONENT_TEST_ARGS = -k -i
   217 COMPONENT_TEST_TARGETS = check check-target
   207 COMPONENT_TEST_TARGETS = check check-target
   218 
   208 
   219 COMPONENT_TEST_ENV += TCL_LIBRARY="/usr/lib/tcl8.5"
   209 COMPONENT_TEST_ENV += TCL_LIBRARY="$(USRLIBDIR)/tcl8.5"
   220 
   210 
   221 # We don't have DejaGNU in S11.
   211 # We don't have DejaGNU in S11.
   222 ifeq ($(OS_VERSION), 5.12)
   212 ifeq ($(OS_VERSION), 5.12)
   223   COMPONENT_TEST_ENV += DEJAGNULIBS="/usr/share/dejagnu"
   213   COMPONENT_TEST_ENV += DEJAGNULIBS="$(USRSHAREDIR)/dejagnu"
   224 endif
   214 endif
   225 
       
   226 test:	$(TEST_32)
       
   227 
       
   228 system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
       
   229 
   215 
   230 ifeq ($(ENABLE_CLOOG), 1)
   216 ifeq ($(ENABLE_CLOOG), 1)
   231   REQUIRED_PACKAGES += library/isl
   217   REQUIRED_PACKAGES += library/isl
   232   REQUIRED_PACKAGES += library/cloog
   218   REQUIRED_PACKAGES += library/cloog
   233 endif
   219 endif
   236 REQUIRED_PACKAGES += library/mpc
   222 REQUIRED_PACKAGES += library/mpc
   237 REQUIRED_PACKAGES += library/mpfr
   223 REQUIRED_PACKAGES += library/mpfr
   238 REQUIRED_PACKAGES += library/zlib
   224 REQUIRED_PACKAGES += library/zlib
   239 REQUIRED_PACKAGES += shell/bash
   225 REQUIRED_PACKAGES += shell/bash
   240 REQUIRED_PACKAGES += shell/ksh93
   226 REQUIRED_PACKAGES += shell/ksh93
   241 REQUIRED_PACKAGES += system/library
       
   242 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
   227 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
   243 REQUIRED_PACKAGES += system/library/math
   228 REQUIRED_PACKAGES += system/library/math
   244 REQUIRED_PACKAGES += system/linker
   229 REQUIRED_PACKAGES += system/linker
   245