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
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.
13 # Copyright 2013 Andrzej Szeszo. All rights reserved.
14 # Copyright 2016-2017 Aurelien Larcher. All rights reserved.
17 include ..
/..
/..
/make-rules
/shared-macros.mk
20 COMPONENT_VERSION
= 7.2.0
22 COMPONENT_MAJOR_VERSION
= $(shell echo
$(COMPONENT_VERSION
) |
$(GSED
) -e
's/\([0-9]\+\)\.[0-9]\+.*/\1/')
23 THIS_GCC_PKGVERSION
= $(COMPONENT_VERSION
)-OI-
$(COMPONENT_REVISION
)
24 COMPONENT_FMRI
= developer
/gcc-
$(COMPONENT_MAJOR_VERSION
)
25 COMPONENT_CLASSIFICATION
= Development
/C
26 COMPONENT_SUMMARY
= GNU Compiler Collection
33 COMPONENT_SUMMARY
= GNU Compiler Collection
34 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
35 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.xz
36 COMPONENT_ARCHIVE_HASH
= \
37 sha256
:1cf7adf8ff4b5aa49041c8734bbcf1ad18cc4c94d0029aae0f4e48841088479a
38 COMPONENT_ARCHIVE_URL
= \
39 http
://ftp.gnu.org
/gnu
/gcc
/gcc-
$(COMPONENT_VERSION
)/$(COMPONENT_ARCHIVE
)
40 COMPONENT_PROJECT_URL
= http
://gcc.gnu.org
/
42 PATCHDIR_PATCHES
= $(shell find
$(PATCH_DIR
) $(PARFAIT_PATCH_DIR
) -type f
-name
'$(PATCH_PATTERN)' \
43 2>/dev
/null |
sort) $(EXTRA_PATCHES
)
45 COMPONENT_SRC_1
= $(MPFR_NAME
)-$(MPFR_VERSION
)
46 COMPONENT_ARCHIVE_1
= $(COMPONENT_SRC_1
).
tar.bz2
47 COMPONENT_ARCHIVE_URL_1
= http
://www.mpfr.org
/$(COMPONENT_SRC_1
)/$(COMPONENT_ARCHIVE_1
)
48 COMPONENT_ARCHIVE_HASH_1
= \
49 sha256
:ca498c1c7a74dd37a576f353312d1e68d490978de4395fa28f1cbd46a364e658
50 CLEAN_PATHS
+= $(COMPONENT_SRC_1
)
51 COMPONENT_POST_UNPACK_ACTION_1
+= ( $(RM
) -r
$(COMPONENT_SRC
)/$(MPFR_NAME
) && $(CP
) -r
$(COMPONENT_SRC_1
) $(COMPONENT_SRC
)/$(MPFR_NAME
) )
53 COMPONENT_SRC_2
= $(MPC_NAME
)-$(MPC_VERSION
)
54 COMPONENT_ARCHIVE_2
= $(COMPONENT_SRC_2
).
tar.gz
55 COMPONENT_ARCHIVE_URL_2
= http
://www.multiprecision.org
/mpc
/download
/$(COMPONENT_ARCHIVE_2
)
56 COMPONENT_ARCHIVE_HASH_2
= \
57 sha256
:617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3
58 CLEAN_PATHS
+= $(COMPONENT_SRC_2
)
59 COMPONENT_POST_UNPACK_ACTION_2
+= ( $(RM
) -r
$(COMPONENT_SRC
)/$(MPC_NAME
) && $(CP
) -r
$(COMPONENT_SRC_2
) $(COMPONENT_SRC
)/$(MPC_NAME
) )
61 COMPONENT_SRC_3
= $(GMP_NAME
)-$(GMP_VERSION
)
62 COMPONENT_ARCHIVE_3
= $(COMPONENT_SRC_3
).
tar.bz2
63 COMPONENT_ARCHIVE_URL_3
= http
://ftp.gnu.org
/gnu
/gmp
/$(COMPONENT_ARCHIVE_3
)
64 COMPONENT_ARCHIVE_HASH_3
= \
65 sha256
:5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2
66 CLEAN_PATHS
+= $(COMPONENT_SRC_3
)
67 COMPONENT_POST_UNPACK_ACTION_3
+= ( $(RM
) -r
$(COMPONENT_SRC
)/$(GMP_NAME
) && $(CP
) -r
$(COMPONENT_SRC_3
) $(COMPONENT_SRC
)/$(GMP_NAME
) )
69 include $(WS_MAKE_RULES
)/prep.mk
70 include $(WS_MAKE_RULES
)/configure.mk
71 include $(WS_MAKE_RULES
)/ips.mk
76 CONFIGURE_PREFIX
= /usr
/gcc
/$(COMPONENT_MAJOR_VERSION
)
79 PARCH
= $(MACH
:i386
=i386-pc
)
80 GNU_ARCH
= $(PARCH
:sparc
=sparc-sun
)-solaris
$(SOLARIS_VERSION
)
81 PKG_MACROS
+= GNU_ARCH
="$(GNU_ARCH)"
83 # Build recipe borrowed from OmniOS
84 COMMON_ENV
= LD_OPTIONS
="-zignore -zcombreloc -i"
85 COMMON_ENV
+= LD_FOR_TARGET
=/usr
/bin
/ld
86 COMMON_ENV
+= LD_FOR_HOST
=/usr
/bin
/ld
87 COMMON_ENV
+= LD
=/usr
/bin
/ld
89 CONFIGURE_ENV
+= $(COMMON_ENV
)
90 COMPONENT_BUILD_ENV
+= $(COMMON_ENV
)
91 COMPONENT_INSTALL_ENV
+= $(COMMON_ENV
)
93 CONFIGURE_OPTIONS
+= --sbindir
=$(CONFIGURE_BINDIR.
$(BITS
))
94 CONFIGURE_OPTIONS
+= --libdir=$(CONFIGURE_LIBDIR.
$(BITS
))
95 CONFIGURE_OPTIONS
+= --libexecdir
=$(CONFIGURE_LIBDIR.
$(BITS
))
96 CONFIGURE_OPTIONS
+= --host
$(GNU_ARCH
)
97 CONFIGURE_OPTIONS
+= --build
$(GNU_ARCH
)
98 CONFIGURE_OPTIONS
+= --target
$(GNU_ARCH
)
99 #CONFIGURE_OPTIONS+= --with-boot-ldflags=-R$(CONFIGURE_PREFIX)/lib
100 CONFIGURE_OPTIONS
+= --with-pkgversion
="OpenIndiana $(THIS_GCC_PKGVERSION)"
101 CONFIGURE_OPTIONS
+= --with-bugurl
="https://bugs.openindiana.org"
102 CONFIGURE_OPTIONS
+= --enable-plugins
103 CONFIGURE_OPTIONS
+= --enable-objc-gc
104 CONFIGURE_OPTIONS
+= --enable-initfini-array
105 CONFIGURE_OPTIONS
+= --enable-languages
=c
,c
++,fortran
,lto
,objc
106 CONFIGURE_OPTIONS
+= --without-gnu-ld
107 CONFIGURE_OPTIONS
+= --with-ld
=/usr
/bin
/ld
108 CONFIGURE_OPTIONS
+= --with-build-time-tools
=/usr
/gnu
/$(GNU_ARCH
)/bin
109 CONFIGURE_OPTIONS
+= --disable-libitm
111 # On SPARC systems, use Sun Assembler
112 CONFIGURE_OPTIONS.sparc
+= --without-gnu-as
--with-as
=/usr
/bin
/as
113 CONFIGURE_OPTIONS.i386
+= --with-gnu-as
--with-as
=/usr
/bin
/gas
114 CONFIGURE_OPTIONS
+= $(CONFIGURE_OPTIONS.
$(MACH
))
116 CONFIGURE_OPTIONS
+= LDFLAGS
="-R$(CONFIGURE_PREFIX)/lib"
118 COMPONENT_POST_INSTALL_ACTION
= \
119 $(RM
) -r
$(PROTO_DIR
)$(CONFIGURE_PREFIX
)/lib
/gcc
/$(GNU_ARCH
)/$(COMPONENT_VERSION
)/include-fixed
123 install: $(INSTALL_32
)
127 REQUIRED_PACKAGES
+= SUNWcs
128 REQUIRED_PACKAGES
+= system
/library
129 REQUIRED_PACKAGES
+= system
/library
/math
130 # Required by test suite
131 REQUIRED_PACKAGES
+= developer
/test/dejagnu
132 REQUIRED_PACKAGES
+= developer
/build
/autogen