Initial commit
This commit is contained in:
68
toolchain/gdb/Makefile
Normal file
68
toolchain/gdb/Makefile
Normal file
@@ -0,0 +1,68 @@
|
||||
#
|
||||
# Copyright (C) 2006-2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gdb
|
||||
|
||||
ifeq ($(CONFIG_arc),y)
|
||||
PKG_VERSION:=arc-2017.09-gdb
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/arc-2017.09-gdb
|
||||
PKG_HASH:=7e3c2a763bf500a40c5c4591a7e22c591dafc1f214b1d514895c1096e85c883a
|
||||
GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION)
|
||||
PATCH_DIR:=./patches-arc
|
||||
else
|
||||
PKG_VERSION:=8.0.1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@GNU/gdb
|
||||
PKG_HASH:=3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3
|
||||
GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
endif
|
||||
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR)
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/toolchain-build.mk
|
||||
|
||||
HOST_CONFIGURE_VARS += \
|
||||
gdb_cv_func_sigsetjmp=yes
|
||||
|
||||
HOST_CONFIGURE_ARGS = \
|
||||
--prefix=$(TOOLCHAIN_DIR) \
|
||||
--build=$(GNU_HOST_NAME) \
|
||||
--host=$(GNU_HOST_NAME) \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--disable-werror \
|
||||
--without-uiout \
|
||||
--enable-tui --disable-gdbtk --without-x \
|
||||
--without-included-gettext \
|
||||
--enable-threads \
|
||||
--with-expat \
|
||||
--without-python \
|
||||
--disable-binutils \
|
||||
--disable-ld \
|
||||
--disable-gas \
|
||||
--disable-sim
|
||||
|
||||
define Host/Install
|
||||
mkdir -p $(TOOLCHAIN_DIR)/bin
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
|
||||
ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
|
||||
strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
rm -rf \
|
||||
$(HOST_BUILD_DIR) \
|
||||
$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \
|
||||
$(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
32
toolchain/gdb/patches-arc/100-no_extern_inline.patch
Normal file
32
toolchain/gdb/patches-arc/100-no_extern_inline.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
--- a/sim/common/sim-arange.c
|
||||
+++ b/sim/common/sim-arange.c
|
||||
@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a
|
||||
build_search_tree (ar);
|
||||
}
|
||||
|
||||
-#endif /* DEFINE_NON_INLINE_P */
|
||||
-
|
||||
-#if DEFINE_INLINE_P
|
||||
-
|
||||
-SIM_ARANGE_INLINE int
|
||||
+int
|
||||
sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr)
|
||||
{
|
||||
ADDR_RANGE_TREE *t = ar->range_tree;
|
||||
@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#endif /* DEFINE_INLINE_P */
|
||||
+#endif /* DEFINE_NON_INLINE_P */
|
||||
--- a/sim/common/sim-arange.h
|
||||
+++ b/sim/common/sim-arange.h
|
||||
@@ -73,7 +73,7 @@ extern void sim_addr_range_delete (ADDR_
|
||||
|
||||
/* Return non-zero if ADDR is in range AR, traversing the entire tree.
|
||||
If no range is specified, that is defined to mean "everything". */
|
||||
-SIM_ARANGE_INLINE int
|
||||
+extern int
|
||||
sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/);
|
||||
#define ADDR_RANGE_HIT_P(ar, addr) \
|
||||
((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr)))
|
||||
21
toolchain/gdb/patches-arc/110-no_testsuite.patch
Normal file
21
toolchain/gdb/patches-arc/110-no_testsuite.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -870,8 +870,7 @@ MAKEINFOFLAGS
|
||||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
-ac_subdirs_all='testsuite
|
||||
-gdbtk
|
||||
+ac_subdirs_all='gdbtk
|
||||
multi-ice
|
||||
gdbserver'
|
||||
|
||||
@@ -5610,7 +5610,7 @@ $as_echo "$with_auto_load_safe_path" >&6
|
||||
|
||||
|
||||
|
||||
-subdirs="$subdirs testsuite"
|
||||
+subdirs="$subdirs"
|
||||
|
||||
|
||||
# Check whether to support alternative target configurations
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/gdb/gdbserver/configure
|
||||
+++ b/gdb/gdbserver/configure
|
||||
@@ -2468,7 +2468,7 @@ $as_echo "$as_me: error: \`$ac_var' was
|
||||
ac_cache_corrupted=: ;;
|
||||
,);;
|
||||
*)
|
||||
- if test "x$ac_old_val" != "x$ac_new_val"; then
|
||||
+ if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then
|
||||
# differences in whitespace do not lead to failure.
|
||||
ac_old_val_w=`echo x $ac_old_val`
|
||||
ac_new_val_w=`echo x $ac_new_val`
|
||||
32
toolchain/gdb/patches/100-no_extern_inline.patch
Normal file
32
toolchain/gdb/patches/100-no_extern_inline.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
--- a/sim/common/sim-arange.c
|
||||
+++ b/sim/common/sim-arange.c
|
||||
@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a
|
||||
build_search_tree (ar);
|
||||
}
|
||||
|
||||
-#endif /* DEFINE_NON_INLINE_P */
|
||||
-
|
||||
-#if DEFINE_INLINE_P
|
||||
-
|
||||
-SIM_ARANGE_INLINE int
|
||||
+int
|
||||
sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr)
|
||||
{
|
||||
ADDR_RANGE_TREE *t = ar->range_tree;
|
||||
@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#endif /* DEFINE_INLINE_P */
|
||||
+#endif /* DEFINE_NON_INLINE_P */
|
||||
--- a/sim/common/sim-arange.h
|
||||
+++ b/sim/common/sim-arange.h
|
||||
@@ -73,7 +73,7 @@ extern void sim_addr_range_delete (ADDR_
|
||||
|
||||
/* Return non-zero if ADDR is in range AR, traversing the entire tree.
|
||||
If no range is specified, that is defined to mean "everything". */
|
||||
-SIM_ARANGE_INLINE int
|
||||
+extern int
|
||||
sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/);
|
||||
#define ADDR_RANGE_HIT_P(ar, addr) \
|
||||
((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr)))
|
||||
21
toolchain/gdb/patches/110-no_testsuite.patch
Normal file
21
toolchain/gdb/patches/110-no_testsuite.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -869,8 +869,7 @@ MAKEINFOFLAGS
|
||||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
-ac_subdirs_all='testsuite
|
||||
-gdbtk
|
||||
+ac_subdirs_all='gdbtk
|
||||
multi-ice
|
||||
gdbserver'
|
||||
|
||||
@@ -6473,7 +6472,7 @@ $as_echo "$with_auto_load_safe_path" >&6
|
||||
|
||||
|
||||
|
||||
-subdirs="$subdirs testsuite"
|
||||
+subdirs="$subdirs"
|
||||
|
||||
|
||||
# Check whether to support alternative target configurations
|
||||
11
toolchain/gdb/patches/120-fix-compile-flag-mismatch.patch
Normal file
11
toolchain/gdb/patches/120-fix-compile-flag-mismatch.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/gdb/gdbserver/configure
|
||||
+++ b/gdb/gdbserver/configure
|
||||
@@ -2469,7 +2469,7 @@ $as_echo "$as_me: error: \`$ac_var' was
|
||||
ac_cache_corrupted=: ;;
|
||||
,);;
|
||||
*)
|
||||
- if test "x$ac_old_val" != "x$ac_new_val"; then
|
||||
+ if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then
|
||||
# differences in whitespace do not lead to failure.
|
||||
ac_old_val_w=`echo x $ac_old_val`
|
||||
ac_new_val_w=`echo x $ac_new_val`
|
||||
Reference in New Issue
Block a user