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) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
23 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
22 # |
24 # |
|
25 BUILD_BITS= 32 |
|
26 # Build gcc with gcc |
|
27 COMPILER= gcc |
23 include ../../make-rules/shared-macros.mk |
28 include ../../make-rules/shared-macros.mk |
24 |
|
25 # Build gcc with gcc |
|
26 COMPILER = gcc |
|
27 |
29 |
28 COMPONENT_NAME= gcc |
30 COMPONENT_NAME= gcc |
29 COMPONENT_VERSION= 3.4.3 |
31 COMPONENT_VERSION= 3.4.3 |
30 COMPONENT_PROJECT_URL= http://gcc.gnu.org/ |
32 COMPONENT_PROJECT_URL= http://gcc.gnu.org/ |
31 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
32 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
|
33 # unfortunately we have our own "special" tarball and not the community version, so use that. |
33 # unfortunately we have our own "special" tarball and not the community version, so use that. |
34 COMPONENT_ARCHIVE_HASH= \ |
34 COMPONENT_ARCHIVE_HASH= \ |
35 sha256:3ab488fe2df01bf54a57acd70e745266e19232edacf77512f77655296748e7a0 |
35 sha256:3ab488fe2df01bf54a57acd70e745266e19232edacf77512f77655296748e7a0 |
36 COMPONENT_ARCHIVE_URL= $(EXTERNAL_ARCHIVE_MIRROR)/$(SOURCE_ARCHIVE) |
36 COMPONENT_ARCHIVE_URL= $(EXTERNAL_ARCHIVE_MIRROR)/$(SOURCE_ARCHIVE) |
37 COMPONENT_BUGDB= utility/gnu-compiler |
37 COMPONENT_BUGDB= utility/gnu-compiler |
38 |
38 |
39 TPNO= 17028 |
39 TPNO= 17028 |
40 |
40 |
41 include $(WS_MAKE_RULES)/prep.mk |
41 INSTALL_TARGET= |
42 include $(WS_MAKE_RULES)/configure.mk |
42 include $(WS_MAKE_RULES)/gnu-component.mk |
43 include $(WS_MAKE_RULES)/ips.mk |
|
44 |
43 |
45 PARCH = $(MACH:i386=i386-pc) |
44 PARCH = $(MACH:i386=i386-pc) |
46 GNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION) |
45 GNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION) |
47 |
46 |
48 PKG_MACROS += GNU_ARCH="$(GNU_ARCH)" |
47 PKG_MACROS += GNU_ARCH="$(GNU_ARCH)" |
56 |
55 |
57 # enabling this causes libstdc++ to break |
56 # enabling this causes libstdc++ to break |
58 LD_B_DIRECT= |
57 LD_B_DIRECT= |
59 |
58 |
60 CONFIGURE_PREFIX = /usr/gcc/3.4 |
59 CONFIGURE_PREFIX = /usr/gcc/3.4 |
|
60 CONFIGURE_INFODIR = $(CONFIGURE_PREFIX)/share/info |
61 |
61 |
62 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_PREFIX)/share/info |
62 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) |
63 CONFIGURE_OPTIONS += --without-gnu-ld --with-ld=/usr/bin/ld |
63 CONFIGURE_OPTIONS += --without-gnu-ld --with-ld=$(LD) |
64 CONFIGURE_OPTIONS += --enable-languages='c,c++,f77,objc' |
64 CONFIGURE_OPTIONS += --enable-languages='c,c++,f77,objc' |
65 CONFIGURE_OPTIONS += --enable-shared |
65 CONFIGURE_OPTIONS += --enable-shared |
66 # sparc and x86 use different assemblers |
66 # sparc and x86 use different assemblers |
67 CONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=/usr/bin/as |
67 CONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=$(USRBINDIR)/as |
68 CONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=/usr/gnu/bin/as |
68 CONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=$(GNUBIN)/as |
69 |
|
70 CONFIGURE_ENV += CFLAGS="$(CFLAGS)" |
|
71 |
69 |
72 COMPONENT_BUILD_ENV += STAGE1_CFLAGS="$(CFLAGS)" |
70 COMPONENT_BUILD_ENV += STAGE1_CFLAGS="$(CFLAGS)" |
73 COMPONENT_BUILD_ENV += CFLAGS_FOR_TARGET="$(CFLAGS)" |
71 COMPONENT_BUILD_ENV += CFLAGS_FOR_TARGET="$(CFLAGS)" |
74 COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL) |
72 COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL) |
75 COMPONENT_BUILD_TARGETS = bootstrap |
73 COMPONENT_BUILD_TARGETS = bootstrap |
76 |
74 |
77 # common targets |
75 # common targets |
78 configure: $(CONFIGURE_32) |
|
79 |
|
80 build: $(BUILD_32) |
|
81 |
|
82 $(PROTO_DIR)/.sedded: $(INSTALL_32) |
76 $(PROTO_DIR)/.sedded: $(INSTALL_32) |
83 (cd $(@D) ; for file in libstdc++.la libsupc++.la ; do \ |
77 (cd $(@D) ; for file in libstdc++.la libsupc++.la ; do \ |
84 $(MV) usr/gcc/3.4/lib/$$file usr/gcc/3.4/lib/$$file.orig ; \ |
78 $(MV) usr/gcc/3.4/lib/$$file usr/gcc/3.4/lib/$$file.orig ; \ |
85 sed -e "s;\\(dependency_libs=\\).*;\\1' -L/usr/gcc/3.4/lib -lgcc_s -lm';" usr/gcc/3.4/lib/$$file.orig >usr/gcc/3.4/lib/$$file ; \ |
79 sed -e "s;\\(dependency_libs=\\).*;\\1' -L/usr/gcc/3.4/lib -lgcc_s -lm';" usr/gcc/3.4/lib/$$file.orig >usr/gcc/3.4/lib/$$file ; \ |
86 $(MV) usr/gcc/3.4/lib/$(MACH64)/$$file usr/gcc/3.4/lib/$(MACH64)/$$file.orig ; \ |
80 $(MV) usr/gcc/3.4/lib/$(MACH64)/$$file usr/gcc/3.4/lib/$(MACH64)/$$file.orig ; \ |
88 done) |
82 done) |
89 $(TOUCH) $@ |
83 $(TOUCH) $@ |
90 |
84 |
91 install: $(PROTO_DIR)/.sedded |
85 install: $(PROTO_DIR)/.sedded |
92 |
86 |
93 test: $(TEST_32) |
|
94 |
|
95 system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED) |
|
96 |
|
97 |
87 |
98 REQUIRED_PACKAGES += developer/assembler |
88 REQUIRED_PACKAGES += developer/assembler |
99 REQUIRED_PACKAGES += developer/gnu-binutils |
89 REQUIRED_PACKAGES += developer/gnu-binutils |
100 REQUIRED_PACKAGES += developer/lexer/flex |
90 REQUIRED_PACKAGES += developer/lexer/flex |
101 REQUIRED_PACKAGES += developer/parser/bison |
91 REQUIRED_PACKAGES += developer/parser/bison |
102 REQUIRED_PACKAGES += shell/ksh93 |
92 REQUIRED_PACKAGES += shell/ksh93 |
103 REQUIRED_PACKAGES += system/library |
|
104 REQUIRED_PACKAGES += system/library/gcc-3-runtime |
93 REQUIRED_PACKAGES += system/library/gcc-3-runtime |
105 REQUIRED_PACKAGES += system/library/math |
94 REQUIRED_PACKAGES += system/library/math |