public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Problem with assembler while building cross-compiler
@ 2005-04-20 15:19 Ioannis E. Venetis
  2005-04-20 15:24 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Ioannis E. Venetis @ 2005-04-20 15:19 UTC (permalink / raw)
  To: binutils

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.

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

* Re: Problem with assembler while building cross-compiler
  2005-04-20 15:19 Problem with assembler while building cross-compiler Ioannis E. Venetis
@ 2005-04-20 15:24 ` Daniel Jacobowitz
  2005-04-20 15:35   ` Ioannis E. Venetis
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2005-04-20 15:24 UTC (permalink / raw)
  To: Ioannis E. Venetis; +Cc: binutils

On Wed, Apr 20, 2005 at 06:19:10PM +0300, Ioannis E. Venetis wrote:
> 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

...

> 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.

Perhaps this should have tipped you off?  The top level configure file
wouldn't just tell you the configuration was unsupported on a whim;
it's an unsupported configuration because it doesn't work.  gas and ld
do not have support for alpha*-dec-osf*.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

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

* Re: Problem with assembler while building cross-compiler
  2005-04-20 15:24 ` Daniel Jacobowitz
@ 2005-04-20 15:35   ` Ioannis E. Venetis
  0 siblings, 0 replies; 3+ messages in thread
From: Ioannis E. Venetis @ 2005-04-20 15:35 UTC (permalink / raw)
  To: binutils; +Cc: drow

> 
> Perhaps this should have tipped you off?  The top level configure file
> wouldn't just tell you the configuration was unsupported on a whim;
> it's an unsupported configuration because it doesn't work.  gas and ld
> do not have support for alpha*-dec-osf*.
> 

Yes, I understand what you mean, but I searched quite a bit around and 
found that people were able to build working cross-compilers for this 
specific architecture with the procedure I described (unfortunately, I 
haven't the links on-hand now). However, they didn't encounter these 
specific errors while building the compilers. So, I thought that I might 
get some help on this issue, even though this is a hack.

Ioannis E. Venetis

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

end of thread, other threads:[~2005-04-20 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-20 15:19 Problem with assembler while building cross-compiler Ioannis E. Venetis
2005-04-20 15:24 ` Daniel Jacobowitz
2005-04-20 15:35   ` Ioannis E. Venetis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).