Skip to content

Commit

Permalink
gdb: Convert to use multiple versions automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
th0ma7 committed Mar 6, 2023
1 parent 3ee3f64 commit e69e181
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 32 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions cross/gdb-latest/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
PKG_NAME = gdb
PKG_VERS = 12.1
PKG_EXT = tar.xz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://ftp.gnu.org/gnu/gdb
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS = cross/zlib cross/libexpat cross/gmp cross/ncursesw cross/mpfr

HOMEPAGE = https://www.gnu.org/software/gdb/
COMMENT = The GNU Project Debugger
LICENSE = GPLv2/LGPLv2

GNU_CONFIGURE = 1
CONFIGURE_ARGS += --enable-host-shared
CONFIGURE_ARGS += --with-system-zlib

UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(PPC_ARCHS)

include ../../mk/spksrc.cross-cc.mk

# Library is not created under armv7
ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH))
PLIST_TRANSFORM = sed -e 's?lib:lib/libinproctrace.so??g'
# binary only created on armv7
else
PLIST_TRANSFORM = sed -e 's?bin:bin/run??g'
endif
6 changes: 6 additions & 0 deletions cross/gdb-latest/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
bin:bin/gcore
bin:bin/gdb
bin:bin/gdb-add-index
bin:bin/gdbserver
bin:bin/run
lib:lib/libinproctrace.so
3 changes: 3 additions & 0 deletions cross/gdb-latest/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gdb-12.1.tar.xz SHA1 2edabd9f5766b84889b07b366b4438e93e994005
gdb-12.1.tar.xz SHA256 0e1793bf8f2b54d53f46dea84ccfd446f48f81b297b28c4f7fc017b818d69fed
gdb-12.1.tar.xz MD5 759a1b8d2b4d403367dd0e14fa04643d
29 changes: 12 additions & 17 deletions cross/gdb/Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
PKG_NAME = gdb
PKG_VERS = 12.1
PKG_EXT = tar.xz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://ftp.gnu.org/gnu/gdb
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS = cross/zlib cross/libexpat cross/gmp cross/ncursesw cross/mpfr

HOMEPAGE = https://www.gnu.org/software/gdb/
COMMENT = The GNU Project Debugger
LICENSE = GPLv2/LGPLv2

GNU_CONFIGURE = 1
CONFIGURE_ARGS += --enable-host-shared
CONFIGURE_ARGS += --with-system-zlib
DOWNLOAD_TARGET = nop
CHECKSUM_TARGET = nop
EXTRACT_TARGET = nop
CONFIGURE_TARGET = nop
COMPILE_TARGET = nop
INSTALL_TARGET = nop

UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(PPC_ARCHS)
OPTIONAL_DEPENDS = cross/gdb-latest
OPTIONAL_DEPENDS += cross/gdb-7.12

include ../../mk/spksrc.cross-cc.mk
include ../../mk/spksrc.install-resources.mk

# Library is not created under armv7
ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH))
PLIST_TRANSFORM = sed -e 's?lib:lib/libinproctrace.so??g'
# binary only created on armv7
ifeq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH))
DEPENDS += cross/gdb-7.12
else
PLIST_TRANSFORM = sed -e 's?bin:bin/run??g'
DEPENDS += cross/gdb-latest
endif
6 changes: 0 additions & 6 deletions cross/gdb/PLIST
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
bin:bin/gcore
bin:bin/gdb
bin:bin/gdb-add-index
bin:bin/gdbserver
bin:bin/run
lib:lib/libinproctrace.so
3 changes: 0 additions & 3 deletions cross/gdb/digests
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
gdb-12.1.tar.xz SHA1 2edabd9f5766b84889b07b366b4438e93e994005
gdb-12.1.tar.xz SHA256 0e1793bf8f2b54d53f46dea84ccfd446f48f81b297b28c4f7fc017b818d69fed
gdb-12.1.tar.xz MD5 759a1b8d2b4d403367dd0e14fa04643d
9 changes: 3 additions & 6 deletions spk/synocli-devel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ UNSUPPORTED_ARCHS = $(PPC_ARCHS)

include ../../mk/spksrc.archs.mk

DEPENDS = cross/binutils
DEPENDS = cross/llvm
DEPENDS = cross/binutils
DEPENDS += cross/gdb
DEPENDS += cross/llvm

SPK_COMMANDS += bin/addr2line
SPK_COMMANDS += bin/ar
Expand Down Expand Up @@ -46,13 +47,9 @@ SPK_COMMANDS += bin/size
SPK_COMMANDS += bin/strings
SPK_COMMANDS += bin/strip

# ******* Fails to build on PPC *******
#ifeq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(PPC_ARCHS)),$(ARCH))
ifeq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH))
DEPENDS += cross/gdb-legacy
OPTIONAL_DESC += ", gdb 7.12.1"
else
DEPENDS += cross/gdb
OPTIONAL_DESC += ", gdb 12.1"
endif

Expand Down

0 comments on commit e69e181

Please sign in to comment.