This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

Problem with assembler while building cross-compiler


Dear all,

I am trying to build a cross-compiler on a Linux Pentium machine (i686-pc-linux-gnu) for a target alphaev68-dec-osf5.1b

I have the necessary include files and libraries for the target, from an Alpha machine where I have access.

I managed to build the snapshot version 2.15.96 of binutils for the above target, although this was not quite straightforward.

I unpacked the sources, entered the directory binutils-2.15.96 and gave the command:

./configure --target=alphaev68-dec-osf5.1b --prefix=/Test/Work/Tru64 --enable-64-bit-bfd --disable-nls

During configuration, I got a message saying that this configuration is not supported for gas and ld. However, after the configuration finished, I entered the directories 'gas' and 'ld' and entered the same command as above. Configuration finished successfully for both of them.

Then I entered `make` in the top-level directory and the utilities were build. I entered again the directories 'gas' and 'ld', entered 'make' in both of them and these utilities were also build correctly.

Finally, I repeated the process for 'make install'.

After that, I had all utilities under /Test/Work/Tru64 and I added /Test/Work/Tru64/bin in front of my PATH environment variable.

Then I unpacked the gcc source (gcc-4.0.0-20050417.tar.bz2, which is Release Candidate 2 for gcc 4.0.0) and also created a directory gcc-4.0.0-20050417-build. From this last directory I issued the command:

../gcc-4.0.0-20050417/configure --target=alphaev68-dec-osf5.1b --prefix=/root/Work/Tru64 --with-sysroot=/root/Work/Tru64/sys-root --enable-languages=c --disable-checking --enable-threads=posix --with-gnu-as --with-gnu-ld --disable-nls

and then I issued 'make'. Notice the --with-sysroot option. The necessary include files are correctly found, because they are fixed during the build process.

The compilation started, but then I got this error:

make[1]: Entering directory `/root/Temp/Downloads/Tru64/gcc-4.0.0-20050417-build/gcc'
<Some successfully compiled files here>
/root/Temp/Downloads/Tru64/gcc-4.0.0-20050417-build/gcc/xgcc -B/root/Temp/Downloads/Tru64/gcc-4.0.0-20050417-build/gcc/ -B/root/Work/Tru64/alphaev68-dec-osf5.1b/bin/ -B/root/Work/Tru64/alphaev68-dec-osf5.1b/lib/ -isystem /root/Work/Tru64/alphaev68-dec-osf5.1b/include -isystem /root/Work/Tru64/alphaev68-dec-osf5.1b/sys-include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -pthread -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -frandom-seed=gcc-crtfastmath -c \
-o crtfastmath.o ../../gcc-4.0.0-20050417/gcc/config/alpha/crtfastmath.c
/tmp/ccN8n7tC.s: Assembler messages:
/tmp/ccN8n7tC.s:67: Fatal error: unhandled relocation type (null)
make[1]: *** [crtfastmath.o] Error 1
make[1]: Leaving directory `/root/Temp/Downloads/Tru64/gcc-4.0.0-20050417-build/gcc'
make: *** [all-gcc] Error 2


This is gcc-4.0.0-20050417/gcc/config/alpha/crtfastmath.c:

extern void __ieee_set_fp_control (unsigned long int);

#define IEEE_MAP_DMZ  (1UL<<12)    /* Map denorm inputs to zero */
#define IEEE_MAP_UMZ  (1UL<<13)    /* Map underflowed outputs to zero */

static void __attribute__((constructor))
set_fast_math (void)
{
  __ieee_set_fp_control (IEEE_MAP_DMZ | IEEE_MAP_UMZ);
}

Out of curiosity, I put into comments the attribute of the function. Of course this is wrong, but I just wanted to see if this was the culprit for the error. Indeed, make continued, but a few lines later I got the next error:

/root/Temp/Downloads/Tru64/gcc-4.0.0-20050417-build/gcc/xgcc -B/root/Temp/Downloads/Tru64/gcc-4.0.0-20050417-build/gcc/ -B/root/Work/Tru64/alphaev68-dec-osf5.1b/bin/ -B/root/Work/Tru64/alphaev68-dec-osf5.1b/lib/ -isystem /root/Work/Tru64/alphaev68-dec-osf5.1b/include -isystem /root/Work/Tru64/alphaev68-dec-osf5.1b/sys-include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -pthread -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../gcc-4.0.0-20050417/gcc -I../../gcc-4.0.0-20050417/gcc/. -I../../gcc-4.0.0-20050417/gcc/../include -I../../gcc-4.0.0-20050417/gcc/../libcpp/include -DL_floatdidf -c ../../gcc-4.0.0-20050417/gcc/libgcc2.c -o libgcc/./_floatdidf.o
/tmp/ccSPqV4c.s: Assembler messages:
/tmp/ccSPqV4c.s:238: Fatal error: internal error? cannot generate `BFD_RELOC_ALPHA_GPDISP_HI16' relocation
make[2]: *** [libgcc/./_floatdidf.o] Error 1


Here I stopped trying, because I have no idea what I should do next. Are these known bugs of gas? Is there a way to build the cross-compiler using gas?

Thank you in advance for your help,

Ioannis E. Venetis

P.S: I am not subscribed to the list. Please CC me.


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