mirror of
https://github.com/Relintai/osxcross.git
synced 2025-02-03 22:45:56 +01:00
add binutils / gdb build script
This commit is contained in:
parent
873ba3df94
commit
e04646ef7c
@ -5,6 +5,7 @@ changed:
|
|||||||
* updated ld64 to 241.9
|
* updated ld64 to 241.9
|
||||||
|
|
||||||
added:
|
added:
|
||||||
|
* binutils / gdb build script
|
||||||
* OSXCROSS_GCC_NO_STATIC_RUNTIME option (env)
|
* OSXCROSS_GCC_NO_STATIC_RUNTIME option (env)
|
||||||
* osxcross-macports: a minimalistic macports packet manager
|
* osxcross-macports: a minimalistic macports packet manager
|
||||||
|
|
||||||
|
67
build_binutils.sh
Executable file
67
build_binutils.sh
Executable file
@ -0,0 +1,67 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
pushd "${0%/*}" &>/dev/null
|
||||||
|
|
||||||
|
DESC=binutils
|
||||||
|
USESYSTEMCOMPILER=1
|
||||||
|
source tools/tools.sh
|
||||||
|
|
||||||
|
`tools/osxcross_conf.sh`
|
||||||
|
|
||||||
|
# binutils version to build
|
||||||
|
BINUTILS_VERSION=2.25
|
||||||
|
# gdb version to build
|
||||||
|
GDB_VERSION=7.8.2
|
||||||
|
|
||||||
|
# mirror
|
||||||
|
MIRROR="ftp://sourceware.org/pub"
|
||||||
|
|
||||||
|
require wget
|
||||||
|
|
||||||
|
pushd $OSXCROSS_BUILD_DIR &>/dev/null
|
||||||
|
|
||||||
|
function remove_locks()
|
||||||
|
{
|
||||||
|
rm -rf $OSXCROSS_BUILD_DIR/have_binutils*
|
||||||
|
}
|
||||||
|
|
||||||
|
function build_and_install()
|
||||||
|
{
|
||||||
|
if [ ! -f "have_$1_$2_${OSXCROSS_TARGET}" ]; then
|
||||||
|
pushd $OSXCROSS_TARBALL_DIR &>/dev/null
|
||||||
|
wget -c "$MIRROR/$1/releases/$1-$2.tar.gz"
|
||||||
|
popd &>/dev/null
|
||||||
|
|
||||||
|
echo "cleaning up ..."
|
||||||
|
rm -rf $1* 2>/dev/null
|
||||||
|
|
||||||
|
extract "$OSXCROSS_TARBALL_DIR/$1-$2.tar.gz" 1
|
||||||
|
|
||||||
|
pushd $1*$2* &>/dev/null
|
||||||
|
mkdir -p build
|
||||||
|
pushd build &>/dev/null
|
||||||
|
|
||||||
|
../configure \
|
||||||
|
--target=x86_64-apple-$OSXCROSS_TARGET \
|
||||||
|
--program-prefix=x86_64-apple-$OSXCROSS_TARGET- \
|
||||||
|
--prefix=$OSXCROSS_TARGET_DIR/binutils \
|
||||||
|
--disable-nls \
|
||||||
|
--disable-werror
|
||||||
|
|
||||||
|
$MAKE -j$JOBS
|
||||||
|
$MAKE install
|
||||||
|
|
||||||
|
popd &>/dev/null
|
||||||
|
popd &>/dev/null
|
||||||
|
touch "have_$1_$2_${OSXCROSS_TARGET}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
source $BASE_DIR/tools/trap_exit.sh
|
||||||
|
|
||||||
|
build_and_install binutils $BINUTILS_VERSION
|
||||||
|
build_and_install gdb $GDB_VERSION
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "installed binutils and gdb to $OSXCROSS_TARGET_DIR/binutils"
|
||||||
|
echo ""
|
Loading…
Reference in New Issue
Block a user