Skip to content

Commit

Permalink
Fix compilation on macOS 14+ and M1 arch
Browse files Browse the repository at this point in the history
  • Loading branch information
dciabrin committed Jan 3, 2025
1 parent a32ff22 commit 77b7761
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: >
brew install autoconf automake bison boost bzip2 coreutils gawk
libtool make pkg-config readline texinfo expat flex gettext
gmp gnu-sed libmpc mpfr ncurses xz zlib
gmp gnu-sed isl libmpc mpfr ncurses xz zlib zstd
- name: Build
run: ./.github/scripts/build.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: >
brew install autoconf automake bison boost bzip2 coreutils gawk
libtool make pkg-config readline texinfo expat flex gettext
gmp gnu-sed libmpc mpfr ncurses xz zlib
gmp gnu-sed isl libmpc mpfr ncurses xz zlib zstd
- name: Build
run: ./.github/scripts/build.sh
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2022 Damien Ciabrini
# Copyright (c) 2019-2025 Damien Ciabrini
# This file is part of ngdevkit
#
# ngdevkit is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -91,12 +91,15 @@ GDB_PKG_CONFIG_PATH=
ifeq ($(shell uname -s),Darwin)
HOMEBREW_PREFIX=$(shell PATH="$$PATH:/opt/homebrew/bin:/usr/local/bin" brew --prefix)

GCC_C_BUILD_FLAGS+=-DHAVE_SETLOCALE
GCC_CXX_BUILD_FLAGS+=-DHAVE_SETLOCALE

GDB_C_BUILD_FLAGS+=-I$(HOMEBREW_PREFIX)/opt/readline/include
GDB_CXX_BUILD_FLAGS+=-I$(HOMEBREW_PREFIX)/opt/readline/include
GDB_LD_BUILD_FLAGS+=-L$(HOMEBREW_PREFIX)/opt/readline/lib
GDB_PKG_CONFIG_PATH+=$(HOMEBREW_PREFIX)/opt/readline/lib/pkgconfig

REALPATH=grealpath
REALPATH=$(HOMEBREW_PREFIX)/bin/grealpath
endif


Expand Down

0 comments on commit 77b7761

Please sign in to comment.