Skip to content

Commit

Permalink
gdb: disable sim for PPC
Browse files Browse the repository at this point in the history
- gdb-latest: disable sim for PPC
  • Loading branch information
hgy59 committed Sep 16, 2023
1 parent 74d39b6 commit 3149bc5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 15 deletions.
25 changes: 17 additions & 8 deletions cross/gdb-7.12/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
31 changes: 24 additions & 7 deletions cross/gdb-latest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3149bc5

Please sign in to comment.