Created
October 7, 2015 17:53
-
-
Save ilg-ul/a02333f31482d0c0a8c7 to your computer and use it in GitHub Desktop.
Build the ARM version of GDB on OS X.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
GDB_VERSION="7.10" | |
GDB_BUILD_FOLDER="~/Work/gdb" | |
mkdir -p "${GDB_BUILD_FOLDER}" | |
cd "${GDB_BUILD_FOLDER}" | |
rm -rf "gdb-${GDB_VERSION}" | |
curl "ftp://ftp.gnu.org/gnu/gdb/gdb-${GDB_VERSION}.tar.xz" | tar -x -v -f - | |
cd gdb-${GDB_VERSION} | |
sed -i".bak" "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure | |
# Original | |
# --with-python=/usr/bin/python2 | |
# Not functional 'configure: error: no usable python found at ...' | |
# --with-python=/Library/Frameworks/Python.framework/Versions/2.7/bin/python2 | |
./configure \ | |
--target=arm-none-eabi \ | |
--prefix=/usr \ | |
--enable-languages=c,c++ \ | |
--enable-multilib \ | |
--enable-interwork \ | |
--disable-nls \ | |
--with-system-gdbinit=/etc/gdb/gdbinit | |
make | |
gdb/gdb --version | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment