gcc-14: add patch for kernel printf for %j and %z size specifiers; synchronise with...
[oi-userland.git] / components / developer / gcc-14 / Makefile
blob0037c53e9c8e4ddb865f3eb7a19710b4001de670
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.
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.
15 USE_PARALLEL_BUILD= yes
16 include ../../../make-rules/shared-macros.mk
18 COMPONENT_VERSION= 14.2.0
19 COMPONENT_REVISION= 1
20 COMPONENT_SRC= gcc-releases-gcc-$(COMPONENT_VERSION)
21 COMPONENT_ARCHIVE= $(COMPONENT_NAME)-$(COMPONENT_VERSION).tar.gz
22 COMPONENT_ARCHIVE_URL= https://github.com/gcc-mirror/gcc/archive/releases/$(COMPONENT_ARCHIVE)
23 COMPONENT_ARCHIVE_HASH= sha256:201c92bf612ab0a357fdbb3db312f720eefaa49d6ce02825bbb5468d5ee1d07a
25 MPFR_VERSION= 4.2.1
26 MPFR_ARCHIVE_HASH= sha256:b9df93635b20e4089c29623b19420c4ac848a1b29df1cfd59f26cab0d2666aa0
28 MPC_VERSION= 1.3.1
29 MPC_ARCHIVE_HASH= sha256:ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8
31 GMP_VERSION= 6.3.0
32 GMP_ARCHIVE_HASH= sha256:ac28211a7cfb609bae2e2c8d6058d66c8fe96434f740cf6fe2e47b000d1c20cb
34 include $(WS_MAKE_RULES)/gcc-component.mk
36 CC=/usr/gcc/13/bin/gcc
37 CXX=/usr/gcc/13/bin/g++
39 # Use gcc's default flags
40 CFLAGS=
41 CPPFLAGS=
42 CXXFLAGS=
44 CPPFLAGS += " -D_TS_ERRNO"
45 LDFLAGS= "-R$OPT/lib"
47 GCC_MAJOR= $(GCC_COMPONENT_VERSION_MAJOR)
48 PKG_VARS += GCC_MAJOR
49 PKG_MACROS += GCC_MAJOR_VERSION=$(GCC_MAJOR)
50 PKG_MACROS += GCC_VERSION=$(GCC_VERSION)
51 PKG_MACROS += GCC_BASEDIR=usr/gcc/$(GCC_MAJOR)
53 # Workaround platform definition inconsistency
54 PARCH= $(MACH:i386=x86_64-pc)
56 GNU_TRIPLET= $(PARCH)-solaris$(SOLARIS_VERSION)
57 PKG_MACROS += GNU_TRIPLET="$(GNU_TRIPLET)"
59 COMPONENT_PRE_CONFIGURE_ACTION += \
60 cd $(SOURCE_DIR) && autogen Makefile.def
62 CONFIGURE_BINDIR.64= $(CONFIGURE_PREFIX)/bin
63 CONFIGURE_LIBDIR.64= $(CONFIGURE_PREFIX)/lib
65 CONFIGURE_OPTIONS += --with-ld=$(LD) --without-gnu-ld
66 CONFIGURE_OPTIONS += --with-as=/usr/bin/gas --with-gnu-as
67 CONFIGURE_OPTIONS += --with-build-time-tools=/usr/gnu/${TRIPLETS[amd64]}/bin
68 CONFIGURE_OPTIONS += --with-build-config=no
69 CONFIGURE_OPTIONS += --enable-languages=c,c++,fortran,go,objc
70 CONFIGURE_OPTIONS += --enable-shared
71 CONFIGURE_OPTIONS += --with-system-zlib
72 CONFIGURE_OPTIONS += --enable-plugins
73 CONFIGURE_OPTIONS += --enable-__cxa_atexit
74 CONFIGURE_OPTIONS += --enable-initfini-array
75 CONFIGURE_OPTIONS += --with-diagnostics-urls=auto-if-env
76 CONFIGURE_OPTIONS += enable_frame_pointer=yes
78 COMPONENT_TEST_ENV += LC_ALL=C.UTF-8
80 COMPONEMT_TEST_TRANSFORMS= -n \
81 "-e '/Summary/p' " \
82 "-e '/\# of/p "
84 PKG_HARDLINKS += usr/gcc/$(GCC_MAJOR)/bin/g++
85 PKG_HARDLINKS += usr/gcc/$(GCC_MAJOR)/bin/gcc
86 PKG_HARDLINKS += usr/gcc/$(GCC_MAJOR)/bin/gcc-ar
87 PKG_HARDLINKS += usr/gcc/$(GCC_MAJOR)/bin/gcc-nm
88 PKG_HARDLINKS += usr/gcc/$(GCC_MAJOR)/bin/gcc-ranlib
89 PKG_HARDLINKS += usr/gcc/$(GCC_MAJOR)/bin/gccgo
90 PKG_HARDLINKS += usr/gcc/$(GCC_MAJOR)/bin/gfortran
92 # Auto-generated dependencies
93 REQUIRED_PACKAGES += compress/zstd
94 REQUIRED_PACKAGES += developer/gnu-binutils
95 REQUIRED_PACKAGES += developer/linker
96 REQUIRED_PACKAGES += library/zlib
97 REQUIRED_PACKAGES += shell/ksh93
98 REQUIRED_PACKAGES += system/header
99 REQUIRED_PACKAGES += system/library
100 REQUIRED_PACKAGES += system/library/c-runtime
101 REQUIRED_PACKAGES += system/library/math