aboutsummaryrefslogtreecommitdiff
path: root/core/binutils/build
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-05-30 12:13:59 +0300
committerCem Keylan <cem@ckyln.com>2020-05-30 12:13:59 +0300
commitb4e0527b29ac0fa6b1280d0029cf7e329a407799 (patch)
tree0b6d38896f7f830b933989f20d8d3e6ed5ef09ae /core/binutils/build
parent6fe911b65c6e6f30f99ccd48948520b5bb79f872 (diff)
downloadrepository-b4e0527b29ac0fa6b1280d0029cf7e329a407799.tar.gz
binutils: architecture dependent build
Diffstat (limited to 'core/binutils/build')
-rwxr-xr-xcore/binutils/build14
1 files changed, 12 insertions, 2 deletions
diff --git a/core/binutils/build b/core/binutils/build
index 0b10222e..67a1af16 100755
--- a/core/binutils/build
+++ b/core/binutils/build
@@ -1,5 +1,14 @@
#!/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
+
cat > makeinfo <<EOF
#!/bin/sh
printf 'makeinfo (GNU texinfo) 5.2\n'
@@ -8,10 +17,11 @@ EOF
chmod +x makeinfo
export PATH=$PATH:$PWD
+# Word splitting is intentional here.
+# shellcheck disable=2086
./configure \
--prefix=/usr \
- --build=x86_64-pc-linux-musl \
- --host=x86_64-pc-linux-musl \
+ $archopts \
--enable-targets=x86_64-pep \
--disable-multilib \
--disable-werror \