From 77b776132b568e7ffa1675b315c74752c25d11f8 Mon Sep 17 00:00:00 2001 From: Damien Ciabrini Date: Fri, 3 Jan 2025 09:23:00 +0100 Subject: [PATCH] Fix compilation on macOS 14+ and M1 arch --- .github/workflows/build-and-publish.yaml | 2 +- .github/workflows/build-tests.yaml | 2 +- Makefile | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml index 6381678..7427287 100644 --- a/.github/workflows/build-and-publish.yaml +++ b/.github/workflows/build-and-publish.yaml @@ -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 diff --git a/.github/workflows/build-tests.yaml b/.github/workflows/build-tests.yaml index 6154e97..19bc91a 100644 --- a/.github/workflows/build-tests.yaml +++ b/.github/workflows/build-tests.yaml @@ -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 diff --git a/Makefile b/Makefile index 8998498..2c05c6a 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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