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