mirror of
https://github.com/tpoechtrager/osxcross.git
synced 2024-11-20 18:33:06 +03:00
Support non-x86_64 targets for binutils
This commit is contained in:
parent
17bb5e2d0a
commit
543be5aeab
@ -25,6 +25,11 @@ if [ -z "$GDB_VERSION" ]; then
|
|||||||
GDB_VERSION=8.3
|
GDB_VERSION=8.3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# architecture to target
|
||||||
|
if [ -z "$TARGET_ARCH" ]; then
|
||||||
|
TARGET_ARCH=x86_64
|
||||||
|
fi
|
||||||
|
|
||||||
# mirror
|
# mirror
|
||||||
MIRROR="https://ftp.gnu.org/gnu"
|
MIRROR="https://ftp.gnu.org/gnu"
|
||||||
|
|
||||||
@ -37,7 +42,7 @@ function remove_locks()
|
|||||||
|
|
||||||
function build_and_install()
|
function build_and_install()
|
||||||
{
|
{
|
||||||
if [ ! -f "have_$1_$2_${TARGET}" ]; then
|
if [ ! -f "have_$1_$2_${TARGET}_${TARGET_ARCH}" ]; then
|
||||||
pushd $TARBALL_DIR &>/dev/null
|
pushd $TARBALL_DIR &>/dev/null
|
||||||
download "$MIRROR/$1/$1-$2.tar.gz"
|
download "$MIRROR/$1/$1-$2.tar.gz"
|
||||||
popd &>/dev/null
|
popd &>/dev/null
|
||||||
@ -52,8 +57,8 @@ function build_and_install()
|
|||||||
pushd build &>/dev/null
|
pushd build &>/dev/null
|
||||||
|
|
||||||
../configure \
|
../configure \
|
||||||
--target=x86_64-apple-$TARGET \
|
--target=$TARGET_ARCH-apple-$TARGET \
|
||||||
--program-prefix=x86_64-apple-$TARGET- \
|
--program-prefix=$TARGET_ARCH-apple-$TARGET- \
|
||||||
--prefix=$TARGET_DIR/binutils \
|
--prefix=$TARGET_DIR/binutils \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
--disable-werror
|
--disable-werror
|
||||||
@ -63,7 +68,7 @@ function build_and_install()
|
|||||||
|
|
||||||
popd &>/dev/null
|
popd &>/dev/null
|
||||||
popd &>/dev/null
|
popd &>/dev/null
|
||||||
touch "have_$1_$2_${TARGET}"
|
touch "have_$1_$2_${TARGET}_${TARGET_ARCH}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user