aboutsummaryrefslogtreecommitdiff
path: root/core/binutils/build
blob: 5b3140f0527a869cf6a54453ae31bebc29e811bf (plain)
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
#!/bin/sh -e

# Architecture specific build options
case ${3:-$(uname -m)} in
    i*86)  archopts="--build=i686-pc-linux-musl \
                     --host=i686-pc-linux-musl \
                     --enable-64-bit-bfd" ;;
    x86_64) archopts="--build=x86_64-pc-linux-musl \
                      --host=x86_64-pc-linux-musl"
esac

cpt l -q texinfo || {
    cat > makeinfo <<EOF
#!/bin/sh
printf 'makeinfo (GNU texinfo) 5.2\n'
EOF

    chmod +x makeinfo
    export PATH=$PATH:$PWD
}

# Word splitting is intentional here.
# shellcheck disable=2086
./configure \
    --prefix=/usr \
    $archopts \
    --enable-targets=x86_64-pep \
    --disable-multilib \
    --disable-werror \
    --disable-gdb \
    --disable-nls \
    --disable-readline \
    --disable-gprof \
    --with-mmap \
    --with-system-zlib

make
make DESTDIR="$1" install

# Manual pages are empty for some reason in binutils-2.37, so
# we are installing the manual pages from 2.36.1
clman -d "$1" man/*.1