Marcel Telka
2024-04-08 5d8bcb58722b250c296fc0324f9d06470fb3d7d0
commit | author | age
31f546 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= 12.3.0
4db7b3 18 COMPONENT_REVISION= 3
31f546 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:f5126461c2b195045471f6934ab067fbf0e10a7e695704208f4a128178cf93af
24
25 MPFR_VERSION=4.2.0
26 MPFR_ARCHIVE_HASH= \
27   sha256:691db39178e36fc460c046591e4b0f2a52c8f2b3ee6d750cc2eab25f1eaa999d
28
29 MPC_VERSION=1.3.1
30 MPC_ARCHIVE_HASH= \
31   sha256:ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8
32
33 GMP_VERSION=6.2.1
34 GMP_ARCHIVE_HASH= \
35   sha256:eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c
36
37 include $(WS_MAKE_RULES)/gcc-component.mk
38
39 CC=/usr/gcc/11/bin/gcc
40 CXX=/usr/gcc/11/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/12/bin/g++
81 PKG_HARDLINKS += usr/gcc/12/bin/gcc
82 PKG_HARDLINKS += usr/gcc/12/bin/gcc-ar
83 PKG_HARDLINKS += usr/gcc/12/bin/gcc-nm
84 PKG_HARDLINKS += usr/gcc/12/bin/gcc-ranlib
85 PKG_HARDLINKS += usr/gcc/12/bin/gccgo
86 PKG_HARDLINKS += usr/gcc/12/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