1 #############################################################
5 #############################################################
7 GDB_SITE
:=ftp
://ftp.gnu.org
/gnu
/gdb
/
8 GDB_DIR
:=$(BUILD_DIR
)/gdb-5.3
9 GDB_SOURCE
:=gdb-5.3.
tar.gz
10 GDB_PATCH
:=$(SOURCE_DIR
)/gdb.patch
11 GDB_UCLIBC_PATCH
:=$(SOURCE_DIR
)/gdb-5.3
-uclibc.patch
13 $(DL_DIR
)/$(GDB_SOURCE
):
14 $(WGET
) -P
$(DL_DIR
) $(GDB_SITE
)/$(GDB_SOURCE
)
16 $(GDB_DIR
)/.unpacked
: $(DL_DIR
)/$(GDB_SOURCE
) $(GDB_PATCH
)
17 gunzip
-c
$(DL_DIR
)/$(GDB_SOURCE
) |
tar -C
$(BUILD_DIR
) -xvf
-
18 cat
$(GDB_PATCH
) | patch
-p1
-d
$(GDB_DIR
)
19 cat
$(GDB_UCLIBC_PATCH
) | patch
-p1
-d
$(GDB_DIR
)
20 touch
$(GDB_DIR
)/.unpacked
22 $(GDB_DIR
)/.configured
: $(GDB_DIR
)/.unpacked
23 # Copy a config.sub from gcc. This is only necessary until
24 # gdb's config.sub supports <arch>-linux-uclibc tuples.
25 cp
$(GCC_DIR
)/config.sub
$(GDB_DIR
)
26 cp
$(GCC_DIR
)/config.sub
$(GDB_DIR
)/readline
/support
/
27 (cd
$(GDB_DIR
); rm -rf config.cache
; \
28 $(TARGET_CONFIGURE_OPTS
) \
29 CFLAGS
="$(TARGET_CFLAGS)" \
30 ac_cv_type_uintptr_t
=yes \
31 gt_cv_func_gettext_libintl
=yes \
32 ac_cv_func_dcgettext
=yes \
33 gdb_cv_func_sigsetjmp
=yes \
34 bash_cv_func_strcoll_broken
=no \
35 bash_cv_must_reinstall_sighandlers
=no \
36 bash_cv_func_sigsetjmp
=present \
38 --target
=$(REAL_GNU_TARGET_NAME
) \
39 --host
=$(REAL_GNU_TARGET_NAME
) \
44 --libexecdir
=/usr
/lib \
46 --datadir=/usr
/share \
47 --localstatedir
=/var \
50 --includedir=$(STAGING_DIR
)/include \
52 --without-uiout
--disable-gdbmi \
53 --disable-tui
--disable-gdbtk
--without-x \
54 --disable-sim
--enable-gdbserver \
55 --without-included-gettext \
57 ifeq ($(ENABLE_LOCALE
),true
)
58 -$(SED
) "s,^INTL *=.*,INTL = -lintl,g;" $(GDB_DIR
)/gdb
/Makefile
60 touch
$(GDB_DIR
)/.configured
62 $(GDB_DIR
)/gdb
/gdb
: $(GDB_DIR
)/.configured
63 $(MAKE
) CC
=$(TARGET_CC
) -C
$(GDB_DIR
)
64 $(STRIP
) $(GDB_DIR
)/gdb
/gdb
66 $(TARGET_DIR
)/usr
/bin
/gdb
: $(GDB_DIR
)/gdb
/gdb
67 install -c
$(GDB_DIR
)/gdb
/gdb
$(TARGET_DIR
)/usr
/bin
/gdb
68 rm -rf
$(TARGET_DIR
)/share
/locale
$(TARGET_DIR
)/usr
/info \
69 $(TARGET_DIR
)/usr
/man
$(TARGET_DIR
)/usr
/share
/doc
71 gdb
: $(TARGET_DIR
)/usr
/bin
/gdb
73 gdb-source
: $(DL_DIR
)/$(GDB_SOURCE
)
76 $(MAKE
) -C
$(GDB_DIR
) clean