mirror of
https://github.com/bebbo/amiga-gcc.git
synced 2025-11-23 22:26:21 +00:00
fix gdb build on osx
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,3 +5,5 @@ Output
|
|||||||
*.log
|
*.log
|
||||||
.lock
|
.lock
|
||||||
.state
|
.state
|
||||||
|
.vscode
|
||||||
|
.DS_Store
|
||||||
11
Makefile
11
Makefile
@ -326,10 +326,8 @@ BINUTILS := $(patsubst %,$(PREFIX)/bin/%$(EXEEXT), $(BINUTILS_CMD))
|
|||||||
BINUTILS_DIR := . bfd gas ld binutils opcodes
|
BINUTILS_DIR := . bfd gas ld binutils opcodes
|
||||||
BINUTILSD := $(patsubst %,projects/binutils/%, $(BINUTILS_DIR))
|
BINUTILSD := $(patsubst %,projects/binutils/%, $(BINUTILS_DIR))
|
||||||
|
|
||||||
ifeq ($(findstring Darwin,$(shell uname)),)
|
|
||||||
ALL_GDB := all-gdb
|
ALL_GDB := all-gdb
|
||||||
INSTALL_GDB := install-gdb
|
INSTALL_GDB := install-gdb
|
||||||
endif
|
|
||||||
|
|
||||||
binutils: $(BUILD)/binutils/_done
|
binutils: $(BUILD)/binutils/_done
|
||||||
|
|
||||||
@ -360,12 +358,10 @@ projects/binutils/configure:
|
|||||||
gdb: $(BUILD)/binutils/_gdb
|
gdb: $(BUILD)/binutils/_gdb
|
||||||
|
|
||||||
$(BUILD)/binutils/_gdb: $(BUILD)/binutils/_done
|
$(BUILD)/binutils/_gdb: $(BUILD)/binutils/_done
|
||||||
ifneq (,$(ALL_GDB))
|
|
||||||
$(L0)"make binutils configure gdb"$(L1)$(MAKE) -C $(BUILD)/binutils configure-gdb $(L2)
|
$(L0)"make binutils configure gdb"$(L1)$(MAKE) -C $(BUILD)/binutils configure-gdb $(L2)
|
||||||
$(L0)"make binutils gdb libs"$(L1)$(MAKE) -C $(BUILD)/binutils/gdb all-lib $(L2)
|
$(L0)"make binutils gdb libs"$(L1)$(MAKE) -C $(BUILD)/binutils/gdb all-lib $(L2)
|
||||||
$(L0)"make binutils gdb"$(L1)$(MAKE) -C $(BUILD)/binutils $(ALL_GDB) $(L2)
|
$(L0)"make binutils gdb"$(L1)$(MAKE) -C $(BUILD)/binutils $(ALL_GDB) $(L2)
|
||||||
$(L0)"install binutils gdb"$(L1)$(MAKE) -C $(BUILD)/binutils install-gas install-binutils install-ld $(INSTALL_GDB) $(L2)
|
$(L0)"install binutils gdb"$(L1)$(MAKE) -C $(BUILD)/binutils install-gas install-binutils install-ld $(INSTALL_GDB) $(L2)
|
||||||
endif
|
|
||||||
@echo "done" >$@
|
@echo "done" >$@
|
||||||
|
|
||||||
|
|
||||||
@ -390,7 +386,12 @@ $(BUILD)/binutils/gprof/Makefile: projects/binutils/configure $(BUILD)/binutils/
|
|||||||
# =================================================
|
# =================================================
|
||||||
CONFIG_GCC = --prefix=$(PREFIX) --target=m68k-amigaos --enable-languages=c,c++,objc --enable-version-specific-runtime-libs --disable-libssp --disable-nls \
|
CONFIG_GCC = --prefix=$(PREFIX) --target=m68k-amigaos --enable-languages=c,c++,objc --enable-version-specific-runtime-libs --disable-libssp --disable-nls \
|
||||||
--with-headers=$(PWD)/projects/newlib-cygwin/newlib/libc/sys/amigaos/include/ --disable-shared \
|
--with-headers=$(PWD)/projects/newlib-cygwin/newlib/libc/sys/amigaos/include/ --disable-shared \
|
||||||
--with-stage1-ldflags="-dynamic-libgcc -dynamic-libstdc++" --with-boot-ldflags="-dynamic-libgcc -dynamic-libstdc++"
|
--with-stage1-ldflags="-dynamic-libgcc -dynamic-libstdc++" --with-boot-ldflags="-dynamic-libgcc -dynamic-libstdc++"
|
||||||
|
|
||||||
|
# OSX : libs added by the command brew install gmp mpfr libmpc
|
||||||
|
ifeq ($(findstring Darwin,$(shell uname)),)
|
||||||
|
CONFIG_GCC = ${CONFIG_GCC} --with-gmp="/usr/local/Cellar/gmp/6.1.2_2" --with-mpfr="/usr/local/Cellar/mpfr/4.0.2" --with-mpc="/usr/local/Cellar/libmpc/1.1.0"
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
GCC_CMD := m68k-amigaos-c++ m68k-amigaos-g++ m68k-amigaos-gcc-$(GCC_VERSION) m68k-amigaos-gcc-nm \
|
GCC_CMD := m68k-amigaos-c++ m68k-amigaos-g++ m68k-amigaos-gcc-$(GCC_VERSION) m68k-amigaos-gcc-nm \
|
||||||
|
|||||||
@ -23,15 +23,15 @@ Right now these tools are build:
|
|||||||
### macOS
|
### macOS
|
||||||
Install Homebrew (https://brew.sh/) or any other package manager first. The compiler will be installed together with XCode. Once XCode and Homebrew are up install the required packages:
|
Install Homebrew (https://brew.sh/) or any other package manager first. The compiler will be installed together with XCode. Once XCode and Homebrew are up install the required packages:
|
||||||
|
|
||||||
`brew install bash wget make lhasa gmp mpfr mpc flex gettext texinfo`
|
`brew install bash wget make lhasa gmp mpfr libmpc flex gettext texinfo gcc make autoconf`
|
||||||
|
|
||||||
By default macOS uses an outdated version of bash. Therefore, on macOS host always pass the the SHELL=/usr/local/bin/bash parameter (or any other valid path pointing to bash), e.g.:
|
By default macOS uses an outdated version of bash. Therefore, on macOS host always pass the the SHELL=/usr/local/bin/bash parameter (or any other valid path pointing to bash), e.g.:
|
||||||
```
|
```
|
||||||
make all SHELL=/usr/local/bin/bash
|
make all SHELL=/usr/local/bin/bash
|
||||||
```
|
```
|
||||||
On macOS it may be also necessary to point to the correct compiler version (there is a gcc wrapper for clang, which can produce compile errors!), e.g.:
|
On macOS it may be also necessary to point to the brew version of gcc make and autoconf, e.g.:
|
||||||
```
|
```
|
||||||
CC=clang CXX=clang++ make all SHELL=/usr/local/bin/bash
|
CC=gcc-9 CXX=g++-9 gmake all SHELL=/usr/local/bin/bash
|
||||||
```
|
```
|
||||||
|
|
||||||
**ALSO NOTE** If you want `m68k-amigaos-gdb` then you have to build it with `gcc`
|
**ALSO NOTE** If you want `m68k-amigaos-gdb` then you have to build it with `gcc`
|
||||||
|
|||||||
Reference in New Issue
Block a user