-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild_binutils
More file actions
executable file
·34 lines (30 loc) · 993 Bytes
/
build_binutils
File metadata and controls
executable file
·34 lines (30 loc) · 993 Bytes
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
#!/bin/bash
die() {
echo "$*" >&2
exit 1
}
echo "Current working directory: $(pwd)"
yum-config-manager --disable centos-sclo-rh
yumdownloader --source binutils || die "Failed to download binutils SRPM"
rpm -hiv binutil*.src.rpm || die "Failed to install binutils SRPM"
cd /root/rpmbuild/SPECS || die "Failed to change to SPECS directory"
yum-builddep -y binutils.spec || die "Failed to gather the build dependencies for binutils"
patch -p0 << END
--- binutils.spec.orig 2017-01-31 09:24:18.988130013 -0500
+++ binutils.spec 2017-01-31 09:25:38.975347558 -0500
@@ -263,6 +263,11 @@
;;
esac
+case %{binutils_target} in x86_64*|i?86*|arm*|aarch64*)
+ CARGS="$CARGS --enable-targets=x86_64-pep"
+ ;;
+esac
+
%if 0%{?_with_debug:1}
CFLAGS="$CFLAGS -O0 -ggdb2 -Wno-error -D_FORTIFY_SOURCE=0"
%define enable_shared 0
END
rpmbuild -ba binutils.spec || die "Failed to build binutils"
cd ../RPMS/x86_64/
mkdir -p /tmp/binutils_install/
cp binut*.rpm /tmp/binutils_install/