-with/without-gnu-ld/as build vs. host? other whining

Jay jay.krell@cornell.edu
Fri Dec 19 17:49:00 GMT 2008


(My mail is getting mangled lately. We'll see..)

 -with/without-gnu-ld/as build vs. host? 
   
 I already did: 
  
  build=cygwin  
  host=cygwin 
  target=sparc64-solaris  
  binutils and gcc 
  
  I want to do the following: 
  
  build=cygwin  
  host=sparc64-solaris  
  target=sparc64-solaris  
  only gcc, will use native ld/as 
  
  
   This seems..problematic.   

   /usr/local/lib/gcc/sparc64-sun-solaris2.10/4.3.2/../../../../sparc64-sun-solaris2.10/bin/ld:   
  libgcc.map: file format not recognized; treating as linker script 
  /usr/local/lib/gcc/sparc64-sun-solaris2.10/4.3.2/../../../../sparc64-sun-solaris 
  2.10/bin/ld:libgcc.map:1: syntax error 
  collect2: ld returned 1 exit status 

  I searched the web..I see this is due to confusion as to if GNU or Sun ld are being used.  

  It seems like I might want to say:  
    -without-host-gnu-ld -without-host-gnu-as -with-build-gnu-as -with-build-gnu-ld   
 
  I'm still trying some variations.  
  For the map error, since this is run on the build machine, it seems it could "just"  
  probe for the expected input? You know, try both, see which works?  

  I'm sure I can just bootstrap with -disable-shared on build=cygwin,  
   and then build native on Solaris without -disable-shared.  

  I can't bootstrap on Solaris with the Sun compiler due to a problem in the gcc source.  
  I was avoiding resorting getting more prebuilt binaries, but that'd work too.  

  Two other problems I ran into today:  

  You an say gcc/configure -with-sysroot, then bring that gcc  
   over to the Solaris machine, and it passes -sysroot to Sun ld which rejects it.  
  Upon which you have to -dumpspecs, edit, -specs.  
  Or go reconfigure and rebuild. Or reconfigure and nicely incrementally build?  
  It seems a bit off to me, but I don't know.  

  Another problem is at first I hadn't built binutils.  
  Gcc goes ahead and builds fixincludes, libiberty, gcc, and then finally  
  it fails in libgcc. Oops. So I go and build binutils.  
  But I also have to delete the dummy as script that gcc created.  

  It'd be nice, somehow, if it could warn/error for the missing binutils earlier,  
  or at least recover somehow more automatically.  
  I don't know. Maybe it has to be the way it is. I'm not necessarily going to  
  build libgcc if I configure gcc, warnings will be missed, and I'll always  
  want errors earlier and earlier, and they can't all be instantaneous.  

 - Jay



More information about the Gcc-help mailing list