summaryrefslogtreecommitdiffstats
path: root/rules/gdbserver.make
blob: cb786d33f7142ec6728562e84b45e9f7d33b5d03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# -*-makefile-*-
#
# Copyright (C) 2003 by Auerswald GmbH & Co. KG, Schandelah, Germany
#               2002-2008 by Pengutronix e.K., Hildesheim, Germany
#               2009, 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_GDBSERVER) += gdbserver

GDBSERVER_VERSION	:= $(call remove_quotes,$(PTXCONF_GDB_VERSION))
GDBSERVER_MD5		:= $(call remove_quotes,$(PTXCONF_GDB_MD5))
GDBSERVER		:= gdb-$(GDBSERVER_VERSION)
GDBSERVER_SUFFIX	:= tar.gz
GDBSERVER_SOURCE	:= $(SRCDIR)/$(GDBSERVER).$(GDBSERVER_SUFFIX)
GDBSERVER_DIR		:= $(BUILDDIR)/gdbserver-$(GDBSERVER_VERSION)
GDBSERVER_LICENSE	:= GPL-2.0, GPL-3.0+
GDBSERVER_LICENSE_FILES	:= \
	file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
	file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
	file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
	file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6

GDBSERVER_URL := \
	$(call ptx/mirror, GNU, gdb/$(GDBSERVER).$(GDBSERVER_SUFFIX)) \
	ftp://sourceware.org/pub/gdb/snapshots/current/$(GDBSERVER).$(GDBSERVER_SUFFIX)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

ifdef PTXCONF_ARCH_X86
GDBSERVER_WRAPPER_BLACKLIST := \
	TARGET_HARDEN_PIE
endif

GDBSERVER_ENV := $(GDB_ENV)

ifndef PTXCONF_GDBSERVER_SHARED
GDBSERVER_ENV +=  LDFLAGS=-static
endif

GDBSERVER_CONF_TOOL := autoconf
GDBSERVER_CONF_OPT  := \
	$(CROSS_AUTOCONF_USR) \
	--disable-werror

GDBSERVER_BUILD_OOT := YES
GDBSERVER_SUBDIR := gdb/gdbserver

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/gdbserver.targetinstall:
	@$(call targetinfo)

	@$(call install_init, gdbserver)
	@$(call install_fixup, gdbserver,PRIORITY,optional)
	@$(call install_fixup, gdbserver,SECTION,base)
	@$(call install_fixup, gdbserver,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
	@$(call install_fixup, gdbserver,DESCRIPTION,missing)

	@$(call install_copy, gdbserver, 0, 0, 0755, -, /usr/bin/gdbserver)

	@$(call install_finish, gdbserver)

	@$(call touch)

# vim: syntax=make