Last active
October 6, 2026 21:24
-
-
Save palaniraja/1a2a88ee0c18bb3935f3c31e13448bc1 to your computer and use it in GitHub Desktop.
gdb build experiments on mac arm64 (script i was testing with gdb-17.1)
This file contains hidden or 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/sh | |
| # install additional dependencies | |
| #brew install gmp mpfr libmpc texinfo pkg-config | |
| # clean old config | |
| # make distclean | |
| # or force a clean | |
| # rm -f config.cache | |
| # find . -name config.cache -print -exec rm -f {} \; | |
| # make distclean || true | |
| # use a sane make - aarch64 | |
| # alias make=/opt/homebrew/bin/gmake | |
| # unalias make | |
| # set environment variables for the build | |
| export AR=/usr/bin/ar | |
| export NM=/usr/bin/nm | |
| export RANLIB=/usr/bin/ranlib | |
| export STRIP=/usr/bin/strip | |
| export CC=clang | |
| export CXX=clang++ | |
| export HOMEBREW_PREFIX=/opt/homebrew | |
| export CPPFLAGS="-I${HOMEBREW_PREFIX}/include" | |
| export LDFLAGS="-L${HOMEBREW_PREFIX}/lib" | |
| export PKG_CONFIG_PATH="${HOMEBREW_PREFIX}/lib/pkgconfig" | |
| # --host=aarch64-apple-darwin --enable-targets=all \ | |
| # x86_64-apple-darwin20 | |
| # --target=aarch64-apple-darwin | |
| ./configure --prefix=/usr/local/gdb \ | |
| --with-gmp=${HOMEBREW_PREFIX}/opt/gmp \ | |
| --with-mpfr=${HOMEBREW_PREFIX}/opt/mpfr \ | |
| --with-mpc=${HOMEBREW_PREFIX}/opt/libmpc | |
| # make -j$(sysctl -n hw.ncpu) && sudo make -v install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment