David Stes
2024-03-31 8cdd197ba643eb2608c5aab87567625bb9336cee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
 
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018 Norm Jacobs
# Copyright (c) 2018 Ken Mays
# Copyright (c) 2020 Michal Nowak
# Copyright (c) 2022 Klaus Ziegler
# Copyright (c) 2022 Niklas Poslovski
#
 
BUILD_BITS= 64
USE_COMMON_TEST_MASTER= no
include ../../../make-rules/shared-macros.mk
 
COMPONENT_NAME=        binutils
COMPONENT_VERSION=    2.42
COMPONENT_SUMMARY=    GNU collection of binary tools like ld, as
COMPONENT_PROJECT_URL=    https://www.gnu.org/software/binutils/
COMPONENT_SRC=        $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.xz
COMPONENT_ARCHIVE_URL=    https://ftp.gnu.org/gnu/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
COMPONENT_ARCHIVE_HASH= sha256:f6e4d41fd5fc778b06b7891457b3620da5ecea1006c6a4a41ae998109f85a800
COMPONENT_FMRI=        developer/gnu-binutils
COMPONENT_CLASSIFICATION=Development/GNU
 
include $(WS_MAKE_RULES)/common.mk
 
PATH= $(PATH.gnu)
 
CONFIGURE_PREFIX= /usr/gnu
 
CONFIGURE_OPTIONS +=    --mandir=$(CONFIGURE_MANDIR)
CONFIGURE_OPTIONS +=    --infodir=$(CONFIGURE_INFODIR)
CONFIGURE_OPTIONS +=    --enable-64-bit-bfd
CONFIGURE_OPTIONS +=    --enable-gold=no
CONFIGURE_OPTIONS +=    --enable-plugins=yes
CONFIGURE_OPTIONS +=    --enable-nls
CONFIGURE_OPTIONS +=    --disable-libtool-lock
CONFIGURE_OPTIONS +=    --enable-largefile=yes
CONFIGURE_OPTIONS +=    --with-system-zlib
CONFIGURE_OPTIONS +=    --host=$(GCC_GNU_TRIPLET)
CONFIGURE_OPTIONS +=    --build=$(GCC_GNU_TRIPLET)
CONFIGURE_OPTIONS +=    --target=$(GCC_GNU_TRIPLET)
#
# This warning will break build of current illumos-gate
# as warnings will be generated for grub and loader.
# Once illumos-gate will get appropriate fix, this
# option should be removed.
CONFIGURE_OPTIONS +=    --enable-warn-rwx-segments=no
 
COMPONENT_TEST_ARGS += -k
 
# Keep only the test results.  Details are always in the build directory
COMPONENT_TEST_TRANSFORMS += \
    '-n '\
    '-e "/^\# of/p" '\
    '-e "/Summary =/p" '
 
# Master test results are different between amd64 and SPARCV9.
COMPONENT_TEST_MASTER = \
    $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH64).master
 
PKG_HARDLINKS += usr/gnu/$(GCC_GNU_TRIPLET)/bin/ar
PKG_HARDLINKS += usr/gnu/$(GCC_GNU_TRIPLET)/bin/as
PKG_HARDLINKS += usr/gnu/$(GCC_GNU_TRIPLET)/bin/ld
PKG_HARDLINKS += usr/gnu/$(GCC_GNU_TRIPLET)/bin/nm
PKG_HARDLINKS += usr/gnu/$(GCC_GNU_TRIPLET)/bin/objcopy
PKG_HARDLINKS += usr/gnu/$(GCC_GNU_TRIPLET)/bin/objdump
PKG_HARDLINKS += usr/gnu/$(GCC_GNU_TRIPLET)/bin/ranlib
PKG_HARDLINKS += usr/gnu/$(GCC_GNU_TRIPLET)/bin/readelf
PKG_HARDLINKS += usr/gnu/$(GCC_GNU_TRIPLET)/bin/strip
 
# Auto-generated dependencies
REQUIRED_PACKAGES += compress/zstd
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += system/library