David Stes
2024-03-31 8cdd197ba643eb2608c5aab87567625bb9336cee
commit | author | age
32804b 1 #
CG 2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
6 #
7 # A full copy of the text of the CDDL should have accompanied this
8 # source.  A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
10 #
11
12 #
13 #
14
15 include ../../../make-rules/shared-macros.mk
16
17 COMPONENT_VERSION= 13.2.0
5663c5 18 COMPONENT_REVISION= 3
32804b 19 COMPONENT_SRC= gcc-releases-gcc-$(COMPONENT_VERSION)
CG 20 COMPONENT_ARCHIVE= $(COMPONENT_NAME)-$(COMPONENT_VERSION).tar.gz
21 COMPONENT_ARCHIVE_URL= https://github.com/gcc-mirror/gcc/archive/releases/$(COMPONENT_ARCHIVE)
22 COMPONENT_ARCHIVE_HASH= \
23   sha256:80821c441131ed24ed44a1bc4cc7ad3a636636e8e82cf97987b210de3d2ae9e4
24
25 MPFR_VERSION=4.2.1
26 MPFR_ARCHIVE_HASH= \
27   sha256:b9df93635b20e4089c29623b19420c4ac848a1b29df1cfd59f26cab0d2666aa0
28
29 MPC_VERSION=1.3.1
30 MPC_ARCHIVE_HASH= \
31   sha256:ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8
32
33 GMP_VERSION=6.3.0
34 GMP_ARCHIVE_HASH= \
35   sha256:ac28211a7cfb609bae2e2c8d6058d66c8fe96434f740cf6fe2e47b000d1c20cb
36
37 include $(WS_MAKE_RULES)/gcc-component.mk
38
39 CC=/usr/gcc/12/bin/gcc
40 CXX=/usr/gcc/12/bin/g++
41
42 CPPFLAGS+=" -D_TS_ERRNO"
43 LDFLAGS="-R$OPT/lib"
44
45 GCC_MAJOR="$(GCC_COMPONENT_VERSION_MAJOR)"
46 PKG_VARS += GCC_MAJOR
47
48 # Workaround platform definition inconsistency
49 ifeq ($(strip $(BUILD_BITS)),64)
50 PARCH = $(MACH:i386=x86_64-pc)
51 else
52 PARCH = $(MACH:i386=i386-pc)
53 endif
54 GNU_TRIPLET = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION)
55 PKG_MACROS += GNU_TRIPLET="$(GNU_TRIPLET)"
56
57 COMPONENT_PRE_CONFIGURE_ACTION += \
58     cd $(SOURCE_DIR) && autogen Makefile.def
59
60 CONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
61 CONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib
62
63 CONFIGURE_OPTIONS+= --with-ld=$(LD) --without-gnu-ld
64 CONFIGURE_OPTIONS+= --with-as=/usr/bin/gas --with-gnu-as
65 CONFIGURE_OPTIONS+= --with-build-time-tools=/usr/gnu/${TRIPLETS[amd64]}/bin
66 CONFIGURE_OPTIONS+= --with-build-config=no
67 CONFIGURE_OPTIONS+= --enable-languages=c,c++,fortran,go,objc
68 # CONFIGURE_OPTIONS+= --with-arch-32=i586
69 CONFIGURE_OPTIONS+= --enable-shared
70 CONFIGURE_OPTIONS+= --with-system-zlib
71 CONFIGURE_OPTIONS+= --enable-plugins
72 CONFIGURE_OPTIONS+= --enable-__cxa_atexit
73 CONFIGURE_OPTIONS+= --enable-initfini-array
74 # CONFIGURE_OPTIONS+= --disable-libitm
75 CONFIGURE_OPTIONS+= --with-diagnostics-urls=auto-if-env
76 CONFIGURE_OPTIONS+= enable_frame_pointer=yes
77
78 COMPONENT_TEST_ENV += LC_ALL=C.UTF-8
79
80 PKG_HARDLINKS += usr/gcc/13/bin/g++
81 PKG_HARDLINKS += usr/gcc/13/bin/gcc
82 PKG_HARDLINKS += usr/gcc/13/bin/gcc-ar
83 PKG_HARDLINKS += usr/gcc/13/bin/gcc-nm
84 PKG_HARDLINKS += usr/gcc/13/bin/gcc-ranlib
85 PKG_HARDLINKS += usr/gcc/13/bin/gccgo
86 PKG_HARDLINKS += usr/gcc/13/bin/gfortran
87
88 # Auto-generated dependencies
89 REQUIRED_PACKAGES += compress/zstd
90 REQUIRED_PACKAGES += developer/gnu-binutils
91 REQUIRED_PACKAGES += developer/linker
92 REQUIRED_PACKAGES += library/zlib
93 REQUIRED_PACKAGES += shell/ksh93
94 REQUIRED_PACKAGES += system/header
95 REQUIRED_PACKAGES += system/library
96 REQUIRED_PACKAGES += system/library/c-runtime
97 REQUIRED_PACKAGES += system/library/math