From 3149bc50307737ebb89d3b2c67bb3bdeb253dc2c Mon Sep 17 00:00:00 2001 From: hgy59 Date: Sat, 16 Sep 2023 16:46:08 +0200 Subject: [PATCH] gdb: disable sim for PPC - gdb-latest: disable sim for PPC --- cross/gdb-7.12/Makefile | 25 +++++++++++++++++-------- cross/gdb-latest/Makefile | 31 ++++++++++++++++++++++++------- 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/cross/gdb-7.12/Makefile b/cross/gdb-7.12/Makefile index dcdc6adef64..bed60a69d76 100644 --- a/cross/gdb-7.12/Makefile +++ b/cross/gdb-7.12/Makefile @@ -20,18 +20,27 @@ INSTALL_TARGET = gdb_install CONFIGURE_ARGS = --enable-host-shared CONFIGURE_ARGS += --with-system-zlib -include ../../mk/spksrc.cross-cc.mk +include ../../mk/spksrc.cross-common.mk + +PLIST_TRANSFORM_SED_ARGS = -# Library is not created for armv5 and armv7 -ifeq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH)) -PLIST_TRANSFORM = sed -e 's?lib:lib/libinproctrace.so??g' +# Library is not created for 32-bit non intel archs +ifeq ($(findstring $(ARCH),$(32bit_ARCHS)),$(ARCH)) +ifneq ($(findstring $(ARCH),$(i686_ARCHS)),$(ARCH)) +PLIST_TRANSFORM_SED_ARGS += -e 's?lib:lib/libinproctrace.so??g' +endif endif ifneq ($(findstring $(ARCH),$(ARM_ARCHS)),$(ARCH)) -# binary only created on arm -PLIST_TRANSFORM = sed -e 's?bin:bin/run??g' +# binary only created for arm +PLIST_TRANSFORM_SED_ARGS += -e 's?bin:bin/run??g' endif +ifneq ($(strip $(PLIST_TRANSFORM_SED_ARGS)),) +PLIST_TRANSFORM = sed $(PLIST_TRANSFORM_SED_ARGS) +endif + +include ../../mk/spksrc.cross-cc.mk .PHONY: gdb_configure gdb_configure: @@ -40,8 +49,8 @@ gdb_configure: .PHONY: gdb_compile gdb_compile: - @$(RUN) ; cd build ; PATH=$(abspath $(TC_PATH)):$$PATH make + @$(RUN) ; cd build ; PATH=$(abspath $(TC_PATH)):$$PATH $(MAKE) .PHONY: gdb_install gdb_install: - @$(RUN) ; cd build ; PATH=$(abspath $(TC_PATH)):$$PATH make install DESTDIR=$(INSTALL_DIR) + @$(RUN) ; cd build ; PATH=$(abspath $(TC_PATH)):$$PATH $(MAKE) install DESTDIR=$(INSTALL_DIR) diff --git a/cross/gdb-latest/Makefile b/cross/gdb-latest/Makefile index 506cc705eaa..1549ae0cc14 100644 --- a/cross/gdb-latest/Makefile +++ b/cross/gdb-latest/Makefile @@ -12,19 +12,36 @@ COMMENT = The GNU Project Debugger. LICENSE = GPLv2/LGPLv2 GNU_CONFIGURE = 1 -CONFIGURE_ARGS += --enable-host-shared +CONFIGURE_ARGS = --enable-host-shared CONFIGURE_ARGS += --with-system-zlib -UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(PPC_ARCHS) +include ../../mk/spksrc.cross-common.mk -include ../../mk/spksrc.cross-cc.mk +ifeq ($(call version_lt, $(TC_GCC), 4.8.1),1) +UNSUPPORTED_ARCHS = $(ARCHS) +endif + +ifeq ($(findstring $(ARCH),$(PPC_ARCHS)),$(ARCH)) +# sim/ppc is broken +CONFIGURE_ARGS += --disable-sim +endif + +PLIST_TRANSFORM_SED_ARGS = -# Library is not created for armv5 and armv7 -ifeq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH)) -PLIST_TRANSFORM = sed -e 's?lib:lib/libinproctrace.so??g' +# Library is not created for 32-bit non intel archs +ifeq ($(findstring $(ARCH),$(32bit_ARCHS)),$(ARCH)) +ifneq ($(findstring $(ARCH),$(i686_ARCHS)),$(ARCH)) +PLIST_TRANSFORM_SED_ARGS += -e 's?lib:lib/libinproctrace.so??g' +endif endif ifneq ($(findstring $(ARCH),$(ARM_ARCHS)),$(ARCH)) # binary only created for arm -PLIST_TRANSFORM = sed -e 's?bin:bin/run??g' +PLIST_TRANSFORM_SED_ARGS += -e 's?bin:bin/run??g' +endif + +ifneq ($(strip $(PLIST_TRANSFORM_SED_ARGS)),) +PLIST_TRANSFORM = sed $(PLIST_TRANSFORM_SED_ARGS) endif + +include ../../mk/spksrc.cross-cc.mk