This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] GDB64 on PPC64 - tclsh does not compile 64bit


I have this problem for a while with GDB 6.1 CVS (Same patch is applicable
to mainline GDB as well), and I used to hand patch it while building GDB64
on PPC64. tclsh does not build 64bit because of a missing CFLAGS on the
compile line, a patch is attached.

Problem:
---------
(NOTE: I am using a different toolchain, but the problem is independent of
that)

/cc  tclAppInit.o -L/home/manjo/GDB/src/tcl/uni
x -ltcl8.4 -ldl  -lieee -lm \
        -Wl,-rpath,/usr/local/lib -o tclsh
/opt/biarch/2.6/20040420_nptl/bin/ld: skipping incompatible
/home/manjo/GDB/src/
tcl/unix/libtcl8.4.a when searching for -ltcl8.4
/opt/biarch/2.6/20040420_nptl/bin/ld: warning: powerpc:common64
architecture of
input file `tclAppInit.o' is incompatible with powerpc:common output
tclAppInit.o(.text+0x32): In function `.main':
: relocation truncated to fit: R_PPC64_TOC16_DS .toc
tclAppInit.o(.text+0x34): In function `.main':
: undefined reference to `.Tcl_Main'
tclAppInit.o(.text+0x80): In function `.Tcl_AppInit':
: undefined reference to `.Tcl_Init'
tclAppInit.o(.text+0xa6): In function `.Tcl_AppInit':
: relocation truncated to fit: R_PPC64_TOC16_DS .toc
tclAppInit.o(.text+0xaa): In function `.Tcl_AppInit':
: relocation truncated to fit: R_PPC64_TOC16_DS .toc
tclAppInit.o(.text+0xb0): In function `.Tcl_AppInit':
: undefined reference to `.Tcl_SetVar'
collect2: ld returned 1 exit status
make[2]: *** [tclsh] Error 1
make[2]: Leaving directory `/home/manjo/GDB/src/tcl/unix'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/manjo/GDB/src/tcl'
make: *** [all-tcl] Error 2
manjo@venus:~/GDB/src>

I set CFLAGS=-m64 LDFLAGS=-m64 ./configure .... while configuring. The
above patch fixes this problem.

Thanks
Manoj Iyer

Attachment: gdb6.1_tclsh.patch
Description: TCLSH 64bit patch


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]