This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
Fix PR 2698
- From: Yao Qi <qiyaoltc at cn dot ibm dot com>
- To: frysk <frysk at sourceware dot org>
- Date: Fri, 26 May 2006 14:36:23 +0800
- Subject: Fix PR 2698
This patch fixes PR2698, where frysk could not be built on ppc64,
since libopcode not could find 'bfd_getb32' and 'bfd_getl32'.
libopcodes has some external functions that are provided by libbfd on
ppc64,
[qiyao@plinuxt18 build-frysk-qiyao]$ readelf -s /usr/lib64/libopcodes-2.16.91.0.6.so | grep bfd
90: 00000000 0 NOTYPE GLOBAL DEFAULT UND bfd_get_arch
100: 00000000 0 NOTYPE GLOBAL DEFAULT UND bfd_getb32
122: 00000000 0 NOTYPE GLOBAL DEFAULT UND bfd_getl32
127: 00000000 0 NOTYPE GLOBAL DEFAULT UND bfd_get_mach
So, we could link '-lopcodes -lbfd -liberty' together to fix this
build problem. I code a patch to append '-lbfd -liberty' to
GEN_GCJ_LDADD in frysk-*/Makefile.am.
B.T.W, I find that the first entry in frysk-gui/frysk/gui/monitor/ChangeLog
is the "fix for 2698", and it may be a typo here, :)
Here is the patch for your reference, and frysk could be build on
ppc64-redhat-linux after this patch applied. Any comments?
--
Yao Qi
2006-05-26 Yao Qi <qiyaoltc@cn.ibm.com>
* frysk-core/Makefile.am (GEN_GCJ_LDADD): Add -lbfd and -liberty.
* frysk-gtk/Makefile.am : Ditto.
* frysk-gui/Makefile.am : Ditto.
* frysk-imports/Makefile.am : Ditto.
* frysk-sys/Makefile.am : Ditto.
Index: frysk-core/Makefile.am
===================================================================
RCS file: /cvs/frysk/frysk-core/Makefile.am,v
retrieving revision 1.44
diff -u -r1.44 Makefile.am
--- frysk-core/Makefile.am 24 May 2006 19:14:28 -0000 1.44
+++ frysk-core/Makefile.am 26 May 2006 05:14:01 -0000
@@ -66,7 +66,7 @@
GEN_GCJ_LDADD += ../frysk-imports/libfrysk-jdom.a
GEN_GCJ_LDADD += ../frysk-imports/elfutils/libelf/libelf.a
GEN_GCJ_LDADD += ../frysk-imports/elfutils/libdw/libdw.a
-GEN_GCJ_LDADD += -lopcodes
+GEN_GCJ_LDADD += -lopcodes -lbfd -liberty
# XXX: This needs to be make less-architecture independant.
Index: frysk-gtk/Makefile.am
===================================================================
RCS file: /cvs/frysk/frysk-gtk/Makefile.am,v
retrieving revision 1.8
diff -u -r1.8 Makefile.am
--- frysk-gtk/Makefile.am 24 May 2006 19:17:22 -0000 1.8
+++ frysk-gtk/Makefile.am 26 May 2006 05:14:01 -0000
@@ -53,7 +53,7 @@
GEN_GCJ_LDADD += $(FRYSK_GTK_LIBS)
GEN_GCJ_LDADD += ../frysk-imports/elfutils/libelf/libelf.a
GEN_GCJ_LDADD += ../frysk-imports/elfutils/libdw/libdw.a
-GEN_GCJ_LDADD += -lopcodes
+GEN_GCJ_LDADD += -lopcodes -lbfd -liberty
# Hack, need to compile this entire sub-tree with JNI.
AM_GCJFLAGS += -fjni
Index: frysk-gui/Makefile.am
===================================================================
RCS file: /cvs/frysk/frysk-gui/Makefile.am,v
retrieving revision 1.46
diff -u -r1.46 Makefile.am
--- frysk-gui/Makefile.am 24 May 2006 19:20:30 -0000 1.46
+++ frysk-gui/Makefile.am 26 May 2006 05:14:04 -0000
@@ -69,7 +69,7 @@
GEN_GCJ_LDADD += -L../frysk-gtk/EggTrayIcon
GEN_GCJ_LDADD += -L../frysk-gtk/tlwidgets
GEN_GCJ_LDADD += $(FRYSK_GUI_LIBS)
-GEN_GCJ_LDADD += -lopcodes
+GEN_GCJ_LDADD += -lopcodes -lbfd -liberty
# Skip tests (exit with status 77) when there is no display.
TESTS_ENVIRONMENT = ( test x"$$DISPLAY" != x || sh -c "exit 77" ) &&
Index: frysk-imports/Makefile.am
===================================================================
RCS file: /cvs/frysk/frysk-imports/Makefile.am,v
retrieving revision 1.47
diff -u -r1.47 Makefile.am
--- frysk-imports/Makefile.am 24 May 2006 19:11:21 -0000 1.47
+++ frysk-imports/Makefile.am 26 May 2006 05:14:04 -0000
@@ -54,7 +54,7 @@
GEN_GCJ_LDADD += libfrysk-junit.a
GEN_GCJ_LDADD += elfutils/libelf/libelf.a
GEN_GCJ_LDADD += elfutils/libdw/libdw.a
-GEN_GCJ_LDADD += -lopcodes
+GEN_GCJ_LDADD += -lopcodes -lbfd -liberty
all-local: lib/elf/tests/test-core lib/elf/tests/helloworld.o
Index: frysk-sys/Makefile.am
===================================================================
RCS file: /cvs/frysk/frysk-sys/Makefile.am,v
retrieving revision 1.16
diff -u -r1.16 Makefile.am
--- frysk-sys/Makefile.am 24 May 2006 19:22:53 -0000 1.16
+++ frysk-sys/Makefile.am 26 May 2006 05:14:04 -0000
@@ -51,4 +51,4 @@
GEN_GCJ_LDADD += ../frysk-imports/libfrysk-jargs.a
GEN_GCJ_LDADD += ../frysk-imports/elfutils/libelf/libelf.a
GEN_GCJ_LDADD += ../frysk-imports/elfutils/libdw/libdw.a
-GEN_GCJ_LDADD += -lopcodes
+GEN_GCJ_LDADD += -lopcodes -lbfd -liberty