This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I suggest using crosstool (http://www.kegel.com/crosstool/)... also take a look at the crossgcc mailing list (http://sources.redhat.com/ml/crossgcc/) On Fri, 2004-05-21 at 10:28, Jonathan Marks wrote: > Hi, > > Perhaps someone can help, please. > > Building on a RH9.0 box, with either a RH9.0 gcc, or gcc-3.4.0 as the native compiler. > I get the same failure using binutils-2.14 or 2.15. If I use gcc-3.3.2, the compile > works fine. > > Here's the reported failure. > > sed -n -e '1,/@HEADER_ENDS/p' \ > -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \ > -e '/@TRAILER_BEGINS/,$p' /usr/src/xscale/glibc-2.3.2-bld/csu/initfini.s > /usr/src/xscale/glibc-2.3.2-bld/csu/crti.S > sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' /usr/src/xscale/glibc-2.3.2-bld/csu/initfini.s | \ > gawk -f defs.awk > /usr/src/xscale/glibc-2.3.2-bld/csu/defs.h > arm-linux-gcc /usr/src/xscale/glibc-2.3.2-bld/csu/crti.S -c -I../include -I. -I/usr/src/xscale/glibc-2.3.2-bld/csu -I.. -I../libio > -I/usr/src/xscale/glibc-2.3.2-bld -I../sysdeps/arm/elf -I../linuxthreads/sysdeps/unix/sysv/linux/arm > -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv > -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/arm -I../sysdeps/unix/sysv/linux/arm -I../sysdeps/unix/sysv/linux > -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/arm > -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 > -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem > /usr/local/xscale/3.4.0/lib/gcc/arm-linux/3.4.0/include -isystem /usr/src/xscale/elroy-jack/sw/linux-2.6.6/include -D_LIBC_REENTRANT > -include ../include/libc-symbols.h -DHAVE_INITFINI -DASSEMBLER -I/usr/src/xscale/glibc-2.3.2-bld/csu/. -g0 -o > /usr/src/xscale/glibc-2.3.2-bld/csu/crti.o > /usr/src/xscale/glibc-2.3.2-bld/csu/crti.S: Assembler messages: > /usr/src/xscale/glibc-2.3.2-bld/csu/crti.S:96: Error: can't resolve `_GLOBAL_OFFSET_TABLE_' {*UND* section} - `.L7' {.text section} > /usr/src/xscale/glibc-2.3.2-bld/csu/crti.S:61: Error: internal_relocation (type: OFFSET_IMM) not fixed up > /usr/src/xscale/glibc-2.3.2-bld/csu/crti.S:62: Error: internal_relocation (type: OFFSET_IMM) not fixed up > /usr/src/xscale/glibc-2.3.2-bld/csu/crti.S:63: Error: internal_relocation (type: OFFSET_IMM) not fixed up > /usr/src/xscale/glibc-2.3.2-bld/csu/crti.S:64: Error: internal_relocation (type: OFFSET_IMM) not fixed up > make[2]: *** [/usr/src/xscale/glibc-2.3.2-bld/csu/crti.o] Error 1 > make[2]: Leaving directory `/usr/src/xscale/glibc-2.3.2/csu' > make[1]: *** [csu/subdir_lib] Error 2 > make[1]: Leaving directory `/usr/src/xscale/glibc-2.3.2' > make: *** [all] Error 2 > > Here's a summary of the build process: > > ../binutils-2.14/configure --target=arm-linux --prefix=/usr/local/xscale/3.4.0 --host=i686-pc-linux-gnu --with-cpu=xscale > make > make install > > ../gcc-3.4.0/configure --target=arm-linux --prefix=/usr/local/xscale/3.4.0 --host=i686-pc-linux-gnu --with-cpu=xscale \ > --with-headers=/usr/src/xscale/elroy-jack/sw/linux-2.6.6/include --disable-shared --disable-threads --enable-languages=c \ > --with-float=soft --disable-nls --enable--symvers=gnu --enable-__cxa_atexit > make > make install > > ../glibc-2.3.2/configure --host=arm-linux --build=i686-pc-linux-gnu \ > --with-headers=/usr/src/xscale/elroy-jack/sw/linux-2.6.6/include \ > --enable-add-ons=linuxthreads --enable-shared --prefix=/usr/local/xscale/3.4.0 \ > --with-cpu=xscale --without-fp --enable-kernel=2.6.6 > make > make install > > So what have I found out so far? > A file .../sysdeps/generic/initfini.c is run through the compiler and generates an assembler file ..../csu/initfini.s. > > Below is a copy of initfini.s It looks like the compiler did not do too good a job of generating it. > The gcc-3.3.2 compiler did a much better job. Note how _BEGIN's and _END's are mixed up - > eg. PROLOG_BEGIN with EPILOG_END. We all know what we can expect when this file is passed through sed - as shown in > the transscript snippet. > > Anyone know what I can do to fix it. > > Thanks > > Jonathan > > >>>>>>>>>>>>>>>>>>>>>>>>>> > .file "initfini.c" > #APP > > #include "defs.h" > > /*@HEADER_ENDS*/ > > /*@TESTS_BEGIN*/ > > /*@TESTS_END*/ > > /*@_init_PROLOG_BEGINS*/ > .section .init > END_INIT > > /*@_init_EPILOG_ENDS*/ > > /*@_fini_PROLOG_BEGINS*/ > .section .fini > END_FINI > > /*@_fini_EPILOG_ENDS*/ > > /*@TRAILER_BEGINS*/ > .text > .align 2 > .global dummy > .type dummy, %function > dummy: > @ args = 0, pretend = 0, frame = 0 > @ frame_needed = 0, uses_anonymous_args = 0 > cmp r0, #0 > str lr, [sp, #-4]! > ldreq pc, [sp], #4 > mov lr, pc > mov pc, r0 > ldr pc, [sp], #4 > .align 2 > .global _init > .type _init, %function > _init: > @ args = 0, pretend = 0, frame = 0 > @ frame_needed = 0, uses_anonymous_args = 0 > stmfd sp!, {sl, lr} > ldr sl, .L8 > ldr r3, .L8+4 > .L7: > add sl, pc, sl > ldr r3, [sl, r3] > cmp r3, #0 > movne lr, pc > movne pc, r3 > .L6: > #APP > ALIGN > END_INIT > > /*@_init_PROLOG_ENDS*/ > > /*@_init_EPILOG_BEGINS*/ > .section .init > ldmfd sp!, {sl, pc} > .L9: > .align 2 > .L8: > .word _GLOBAL_OFFSET_TABLE_-(.L7+8) > .word __gmon_start__(GOT) > .align 2 > .global _fini > .type _fini, %function > _fini: > @ args = 0, pretend = 0, frame = 0 > @ frame_needed = 0, uses_anonymous_args = 0 > str lr, [sp, #-4]! > #APP > ALIGN > END_FINI > > /*@_fini_PROLOG_ENDS*/ > bl i_am_not_a_leaf(PLT) > #APP > > /*@_fini_EPILOG_BEGINS*/ > .section .fini > ldr pc, [sp], #4 > .weak __gmon_start__ > .ident "GCC: (GNU) 3.4.0" > > > ------------------------------------------------------------------- > Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm > FAQ/Etiquette: http://www.arm.linux.org.uk/armlinux/mailinglists.php ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |