From dba52bf7e8646fbadf44cb3f5329ed014b821467 Mon Sep 17 00:00:00 2001 From: laqieer Date: Wed, 5 Apr 2023 23:04:40 +0800 Subject: [PATCH] Change agbcc to upstream due to merge of https://github.com/pret/agbcc/pull/51 Add `-ffix-debug-line` option to fix bug of `.debug_line` section --- makefile | 2 +- tools/install-agbcc.sh | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/makefile b/makefile index a1070bf6..6956c8c0 100644 --- a/makefile +++ b/makefile @@ -53,7 +53,7 @@ SHASUM ?= sha1sum # ================ CPPFLAGS := -I $(AGBCC_HOME)/include -iquote include -iquote . -nostdinc -undef -CFLAGS := -g -mthumb-interwork -Wimplicit -Wparentheses -Werror -fhex-asm -O2 +CFLAGS := -g -mthumb-interwork -Wimplicit -Wparentheses -Werror -fhex-asm -ffix-debug-line -O2 ASFLAGS := -mcpu=arm7tdmi -I asm/include -I include LDS := $(BUILD_NAME).lds diff --git a/tools/install-agbcc.sh b/tools/install-agbcc.sh index e3ad766a..b5df8311 100755 --- a/tools/install-agbcc.sh +++ b/tools/install-agbcc.sh @@ -3,19 +3,11 @@ here=$(dirname "$(readlink -f "$0")")/.. temp=$(mktemp -d) -if [[ "$OSTYPE" == "darwin"* ]] -then - agbcc_repo="https://github.com/pret/agbcc.git" - agbcc_branch="master" -else - agbcc_repo="https://github.com/StanHash/agbcc.git" - agbcc_branch="fix-dwarf-debug-line" -fi +agbcc_repo="https://github.com/pret/agbcc.git" git clone $agbcc_repo $temp cd $temp -git checkout origin/$agbcc_branch ./build.sh ./install.sh $here