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 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
21 |
22 # |
22 # |
|
23 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
|
24 # |
|
25 BUILD_BITS= 32 |
23 include ../../make-rules/shared-macros.mk |
26 include ../../make-rules/shared-macros.mk |
24 |
27 |
25 COMPONENT_NAME= gcc |
28 COMPONENT_NAME= gcc |
26 COMPONENT_VERSION= 4.5.2 |
29 COMPONENT_VERSION= 4.5.2 |
27 COMPONENT_PROJECT_URL= http://gcc.gnu.org/ |
30 COMPONENT_PROJECT_URL= http://gcc.gnu.org/ |
28 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
29 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
|
30 COMPONENT_ARCHIVE_HASH= \ |
31 COMPONENT_ARCHIVE_HASH= \ |
31 sha256:07b880faf29f3f9d9c0953717002ac29f5d061427797d2487a7c9c169e6395b3 |
32 sha256:07b880faf29f3f9d9c0953717002ac29f5d061427797d2487a7c9c169e6395b3 |
32 COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE) |
33 COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE) |
33 COMPONENT_ARCHIVE_1= testsuite-$(COMPONENT_VERSION).tar.gz |
34 COMPONENT_ARCHIVE_1= testsuite-$(COMPONENT_VERSION).tar.gz |
34 COMPONENT_ARCHIVE_URL_1 = \ |
35 COMPONENT_ARCHIVE_URL_1 = \ |
37 sha256:aeb50a52831048da9a6aed118d85a25fc33fa73cae6c80df8f84885712e1b357 |
38 sha256:aeb50a52831048da9a6aed118d85a25fc33fa73cae6c80df8f84885712e1b357 |
38 COMPONENT_BUGDB= utility/gnu-compiler |
39 COMPONENT_BUGDB= utility/gnu-compiler |
39 |
40 |
40 TPNO= 4456 |
41 TPNO= 4456 |
41 |
42 |
42 include $(WS_MAKE_RULES)/prep.mk |
43 include $(WS_MAKE_RULES)/gnu-component.mk |
43 include $(WS_MAKE_RULES)/configure.mk |
|
44 include $(WS_MAKE_RULES)/ips.mk |
|
45 |
44 |
46 PATH=/usr/bin:/usr/gnu/bin:/usr/perl5/bin |
45 PATH=$(USRBINDIR):$(GNUBIN):/usr/perl5/bin |
47 |
46 |
48 PARCH = $(MACH:i386=i386-pc) |
47 PARCH = $(MACH:i386=i386-pc) |
49 GNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION) |
48 GNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION) |
50 |
49 |
51 PKG_MACROS += GNU_ARCH="$(GNU_ARCH)" |
50 PKG_MACROS += GNU_ARCH="$(GNU_ARCH)" |
52 |
51 |
53 # This product bootstraps itself. The gcc flags are not the same |
52 # This product bootstraps itself. The gcc flags are not the same |
54 # as Studio flags. -O2 means different things for the two compilers |
53 # as Studio flags. -O2 means different things for the two compilers |
55 CFLAGS=-g -O2 |
54 CFLAGS=-g -O2 |
|
55 CXXFLAGS=$(CFLAGS) |
56 CFLAGS_FOR_BUILD=$(CFLAGS) |
56 CFLAGS_FOR_BUILD=$(CFLAGS) |
57 |
57 |
58 # CC_BITS may get in the way |
58 # CC_BITS may get in the way |
59 CC_BITS= |
59 CC_BITS= |
60 |
60 |
61 CONFIG_SHELL = /bin/sh |
61 CONFIG_SHELL = /bin/sh |
62 |
62 |
63 CONFIGURE_PREFIX = /usr/gcc/4.5 |
63 CONFIGURE_PREFIX = /usr/gcc/4.5 |
|
64 CONFIGURE_INFODIR = $(CONFIGURE_PREFIX)/share/info |
64 |
65 |
65 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_PREFIX)/share/info |
66 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) |
66 CONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib |
67 CONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib |
67 CONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc" |
68 CONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc" |
68 CONFIGURE_OPTIONS += --enable-shared |
69 CONFIGURE_OPTIONS += --enable-shared |
69 CONFIGURE_OPTIONS += --with-gmp-include=/usr/include/gmp |
70 CONFIGURE_OPTIONS += --with-gmp-include=$(USRINCDIR)/gmp |
70 CONFIGURE_OPTIONS += --with-mpfr-include=/usr/include/mpfr |
71 CONFIGURE_OPTIONS += --with-mpfr-include=$(USRINCDIR)/mpfr |
71 CONFIGURE_OPTIONS += --without-gnu-ld --with-ld=/usr/bin/ld |
72 CONFIGURE_OPTIONS += --without-gnu-ld --with-ld=$(LD) |
72 |
73 |
73 COMPONENT_POST_UNPACK_ACTION = \ |
74 COMPONENT_POST_UNPACK_ACTION = \ |
74 ( cd $(COMPONENT_DIR) ; \ |
75 ( cd $(COMPONENT_DIR) ; \ |
75 tar xf testsuite-$(COMPONENT_VERSION).tar.gz ) |
76 tar xf testsuite-$(COMPONENT_VERSION).tar.gz ) |
76 |
77 |
77 # sparc and x86 use different assemblers |
78 # sparc and x86 use different assemblers |
78 CONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=/usr/bin/as |
79 CONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=$(USRBINDIR)/as |
79 CONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=/usr/gnu/bin/as |
80 CONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=$(GNUBIN)/as |
80 CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(MACH)) |
|
81 |
|
82 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
|
83 |
81 |
84 # Keep ASLR disabled (the default) for gcc 4.5; build often core dumps with ASLR |
82 # Keep ASLR disabled (the default) for gcc 4.5; build often core dumps with ASLR |
85 ASLR_MODE = $(ASLR_DISABLE) |
83 ASLR_MODE = $(ASLR_DISABLE) |
86 |
84 |
87 COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL) |
85 COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL) |
96 # test results. |
94 # test results. |
97 COMPONENT_TEST_DIR = $(BUILD_DIR_32)/gcc |
95 COMPONENT_TEST_DIR = $(BUILD_DIR_32)/gcc |
98 COMPONENT_TEST_CMD = ulimit -Ss 16384 ; $(GMAKE) |
96 COMPONENT_TEST_CMD = ulimit -Ss 16384 ; $(GMAKE) |
99 COMPONENT_TEST_ARGS = -k -i |
97 COMPONENT_TEST_ARGS = -k -i |
100 |
98 |
101 configure: $(CONFIGURE_32) |
|
102 |
|
103 build: $(BUILD_32) |
|
104 |
|
105 install: $(INSTALL_32) |
|
106 |
|
107 test: $(TEST_32) |
|
108 |
|
109 system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED) |
|
110 |
|
111 |
99 |
112 REQUIRED_PACKAGES += developer/assembler |
100 REQUIRED_PACKAGES += developer/assembler |
113 REQUIRED_PACKAGES += developer/gnu-binutils |
101 REQUIRED_PACKAGES += developer/gnu-binutils |
114 REQUIRED_PACKAGES += library/gmp |
102 REQUIRED_PACKAGES += library/gmp |
115 REQUIRED_PACKAGES += library/mpc |
103 REQUIRED_PACKAGES += library/mpc |
116 REQUIRED_PACKAGES += library/mpfr |
104 REQUIRED_PACKAGES += library/mpfr |
117 REQUIRED_PACKAGES += shell/ksh93 |
105 REQUIRED_PACKAGES += shell/ksh93 |
118 REQUIRED_PACKAGES += system/library |
|
119 REQUIRED_PACKAGES += system/library/gcc-45-runtime |
106 REQUIRED_PACKAGES += system/library/gcc-45-runtime |
120 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime |
107 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime |
121 REQUIRED_PACKAGES += system/library/math |
108 REQUIRED_PACKAGES += system/library/math |