Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Fix GDB BFD test linking
@ 2010-04-29 19:19 Paulius Zaleckas
  2010-05-01 20:54 ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: Paulius Zaleckas @ 2010-04-29 19:19 UTC (permalink / raw)
  To: buildroot

When compiling GDB for target (in my case i386) it links
wrong BFD library from host OS. This prevents GDB from compiling
support for ELF and thus GDB is unusable on target.

More about this issue was already posted at:
http://lists.uclibc.org/pipermail/buildroot/2009-March/026585.html

Fix this issue by forcing ELF support.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
---

 toolchain/gdb/gdb.mk |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk
index 5e91d98..5725067 100644
--- a/toolchain/gdb/gdb.mk
+++ b/toolchain/gdb/gdb.mk
@@ -93,6 +93,8 @@ endif
 	touch $@
 
 $(GDB_TARGET_DIR)/gdb/gdb: $(GDB_TARGET_DIR)/.configured
+	# force ELF support since it fails due to BFD linking problems
+	gdb_cv_var_elf=yes \
 	$(MAKE) CC=$(TARGET_CC) MT_CFLAGS="$(TARGET_CFLAGS)" \
 		-C $(GDB_TARGET_DIR)
 	$(STRIPCMD) $(GDB_TARGET_DIR)/gdb/gdb

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] Fix GDB BFD test linking
@ 2010-02-22 21:49 Paulius Zaleckas
  0 siblings, 0 replies; 3+ messages in thread
From: Paulius Zaleckas @ 2010-02-22 21:49 UTC (permalink / raw)
  To: buildroot

When compiling GDB for the same architecture as host it links
wrong BFD library from host OS. This prevents GDB from compiling
support for ELF and thus GDB unusable on target.

Fix this by moving BFD and libiberty directories before CFLAGS, since
"wrong" path comes from CFLAGS.

More about this issue was already posted at:
http://lists.uclibc.org/pipermail/buildroot/2009-March/026585.html

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
---

 .../6.8/700-fix-linking-directory-priority.patch   |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
 create mode 100644 toolchain/gdb/6.8/700-fix-linking-directory-priority.patch

diff --git a/toolchain/gdb/6.8/700-fix-linking-directory-priority.patch b/toolchain/gdb/6.8/700-fix-linking-directory-priority.patch
new file mode 100644
index 0000000..5dff5aa
--- /dev/null
+++ b/toolchain/gdb/6.8/700-fix-linking-directory-priority.patch
@@ -0,0 +1,13 @@
+--- gdb-6.8/gdb/configure.orig	2008-01-13 14:23:04.000000000 +0200
++++ gdb-6.8/gdb/configure	2009-12-06 18:32:27.065376339 +0200
+@@ -22994,8 +22994,8 @@ esac
+ OLD_CFLAGS=$CFLAGS
+ OLD_LDFLAGS=$LDFLAGS
+ OLD_LIBS=$LIBS
+-CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
+-LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
++CFLAGS="-L../bfd -L../libiberty $CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
++LDFLAGS="$LDFLAGS"
+ intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
+ LIBS="$LIBS -lbfd -liberty $intl"
+ echo "$as_me:$LINENO: checking for ELF support in BFD" >&5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-01 20:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-29 19:19 [Buildroot] [PATCH] Fix GDB BFD test linking Paulius Zaleckas
2010-05-01 20:54 ` Peter Korsgaard
  -- strict thread matches above, loose matches on Subject: below --
2010-02-22 21:49 Paulius Zaleckas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox