aboutsummaryrefslogtreecommitdiff
path: root/core/binutils
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-12-27 20:26:32 +0300
committerCem Keylan <cem@ckyln.com>2020-12-27 20:26:32 +0300
commit38f6aa7f5401d8322daa0b978df10d5fda2a613e (patch)
tree6fb948ff52a57a6e2220025a51ef705dd9d98e0c /core/binutils
parentd9f26f27eb38c4727ff8446e36fbb0ed7efb0532 (diff)
downloadrepository-38f6aa7f5401d8322daa0b978df10d5fda2a613e.tar.gz
experimental: add initial cross-compilation support
Diffstat (limited to 'core/binutils')
-rwxr-xr-xcore/binutils/build15
1 files changed, 5 insertions, 10 deletions
diff --git a/core/binutils/build b/core/binutils/build
index 67a1af16..61c53318 100755
--- a/core/binutils/build
+++ b/core/binutils/build
@@ -1,12 +1,8 @@
#!/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"
+case "$3" in
+ i?86) archopts="--enable-64-bit-bfd"
esac
cat > makeinfo <<EOF
@@ -19,9 +15,7 @@ export PATH=$PATH:$PWD
# Word splitting is intentional here.
# shellcheck disable=2086
-./configure \
- --prefix=/usr \
- $archopts \
+cpt-configure \
--enable-targets=x86_64-pep \
--disable-multilib \
--disable-werror \
@@ -30,7 +24,8 @@ export PATH=$PATH:$PWD
--disable-readline \
--disable-gprof \
--with-mmap \
- --with-system-zlib
+ --with-system-zlib \
+ "$archopts"
make
make DESTDIR="$1" install