Annotation of /smage/trunk/core/binutils/binutils-2.39-r3.smage2
Parent Directory | Revision Log
Revision 15670 -
(hide annotations)
(download)
Wed Dec 21 09:00:52 2022 UTC (17 months, 3 weeks ago) by niro
File size: 2506 byte(s)
Wed Dec 21 09:00:52 2022 UTC (17 months, 3 weeks ago) by niro
File size: 2506 byte(s)
auto added: ver bump to 2.39-r2
1 | niro | 15668 | # $Id$ |
2 | |||
3 | PNAME="binutils" | ||
4 | PVER="2.39" | ||
5 | PBUILD="r3" | ||
6 | |||
7 | PCAT="sys-dev" | ||
8 | |||
9 | DESCRIPTION="Tools necessary to build programs." | ||
10 | HOMEPAGE="http://www.kernel.org/pub/linux/devel/binutils/" | ||
11 | |||
12 | # enabled 1, or disabled 0 | ||
13 | GOLD_ENABLED=1 | ||
14 | |||
15 | DEPEND=">= virtual/glibc | ||
16 | >= sys-libs/zlib-1.2.13" | ||
17 | if [[ ${GOLD_ENABLED} = 1 ]] | ||
18 | then | ||
19 | # ld.gold needs libstdc++ and libgcc | ||
20 | DEPEND="${DEPEND} | ||
21 | >= sys-libs/libgcc-12.2.0 | ||
22 | >= sys-libs/libstdc++-12.2.0" | ||
23 | fi | ||
24 | SDEPEND=">= virtual/kernel-headers" | ||
25 | |||
26 | SRCFILE="${PNAME}-${PVER}.tar.xz" | ||
27 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
28 | |||
29 | sminclude mtools | ||
30 | |||
31 | SRC_URI=( | ||
32 | http://www.kernel.org/pub/linux/devel/${PNAME}/${SRCFILE} | ||
33 | gnu://${PNAME}/${SRCFILE} | ||
34 | mirror://${PNAME}/${SRCFILE} | ||
35 | ) | ||
36 | |||
37 | # unstable | ||
38 | #UP2DATE="updatecmd ${HOMEPAGE} | sed -n 's/.*release.binutils-\(.*\).*/\1/;$ p'" | ||
39 | # stable only | ||
40 | UP2DATE="updatecmd_gnu ${PNAME} xz" | ||
41 | |||
42 | # binutils don't like strong CFLAGS | ||
43 | export CFLAGS="${CFLAGS//-O?} -O2" | ||
44 | export CXXFLAGS="${CFLAGS}" | ||
45 | |||
46 | if [[ -z ${CCHOST} ]] | ||
47 | then | ||
48 | # no crosscompile defined | ||
49 | export CCHOST=${CHOST} | ||
50 | else | ||
51 | # use crosscompile host | ||
52 | export CCHOST=${CCHOST} | ||
53 | fi | ||
54 | |||
55 | msetfeature "static !ccache !distcc" | ||
56 | |||
57 | src_prepare() | ||
58 | { | ||
59 | munpack ${SRCFILE} || die | ||
60 | install -d ${SRCDIR}/build || die | ||
61 | |||
62 | cd ${SRCDIR} | ||
63 | # disable development mode | ||
64 | sed -i '/^development=/s/true/false/' bfd/development.sh || die | ||
65 | } | ||
66 | |||
67 | src_compile() | ||
68 | { | ||
69 | cd ${SRCDIR}/build | ||
70 | |||
71 | local myopts | ||
72 | if [[ ${GOLD_ENABLED} = 1 ]] | ||
73 | then | ||
74 | myopts+=" --enable-gold" | ||
75 | myopts+=" --enable-ld=default" | ||
76 | fi | ||
77 | |||
78 | # enable cet | ||
79 | myopts+=" --enable-cet" | ||
80 | |||
81 | # disable debuginfod | ||
82 | myopts+=" --without-debuginfod" | ||
83 | |||
84 | niro | 15670 | # use libiberty from binutils |
85 | myopts+=" --enable-install-libiberty" | ||
86 | |||
87 | niro | 15669 | # # fortify_source not supported |
88 | # export CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/} | ||
89 | # export CFLAGS=${CFLAGS/-Wp,-D_FORTIFY_SOURCE=2/} | ||
90 | niro | 15668 | |
91 | ../configure \ | ||
92 | --host=${CHOST} \ | ||
93 | --target=${CCHOST} \ | ||
94 | --prefix=/usr \ | ||
95 | --mandir=/usr/share/man \ | ||
96 | --infodir=/usr/share/info \ | ||
97 | --libdir=/usr/$(mlibdir) \ | ||
98 | --with-bugurl="http://bugs.magellan-linux.de/" \ | ||
99 | --enable-shared \ | ||
100 | --enable-plugins \ | ||
101 | --enable-threads \ | ||
102 | --enable-deterministic-archives \ | ||
103 | --enable-lto \ | ||
104 | --enable-relro \ | ||
105 | --disable-werror \ | ||
106 | --disable-gdb \ | ||
107 | --with-pic \ | ||
108 | --enable-64-bit-bfd \ | ||
109 | --enable-system-zlib \ | ||
110 | ${myopts} \ | ||
111 | || die | ||
112 | |||
113 | make configure-host || die | ||
114 | mmake tooldir=/usr all || die | ||
115 | } | ||
116 | |||
117 | src_install() | ||
118 | { | ||
119 | cd ${SRCDIR}/build | ||
120 | |||
121 | mmake DESTDIR=${BINDIR} tooldir=/usr install || die | ||
122 | minstallfile ../include/libiberty.h /usr/include || die | ||
123 | |||
124 | cd ${SRCDIR} | ||
125 | minstalldocs ChangeLog* COPYING* MAINTAINERS README* || die | ||
126 | } |