This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


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

Re: linker script parse error SUMMARY



Many thanks go to Kai and Jurriaan for their help.

Once I changed my target to i386-linux-gnulibc1 and used the lib-5.4.46 
libraries the compiler built fine. I did need newlib to get one-tree-1.5.sh
to work, but newlib was not necessary (and would not work) for the build.
I did need to grab some header files and libgcc1.a from a pc running linux.
The linker error indeed seems to have been from having a wildcard in my
target name.

Kurt



Kai Ruottu wrote:
> 
> On Fri, 02 Apr 1999 Kurt Werth <kurt.d.werth@lmco.com> wrote:
> 
> > I'm attempting to build a cross compiler hosted on a Solaris 2.6 box for
> > a i386-linux target. I'm using gcc-2.8.1 (with crossgcc patch installed),
> > binutils-2.9.1 and newlib-1.8.1. I've run one-tree-1.5.sh to setup the
> > one pass install, and run configure and make like so:
> 
>  The Linux target has been splitted into two now :
> 
>   - systems using the older 'libc5' as the C-library (libc-5.4.46 is the last
>     release). This is the 'i386-linux-gnulibc1' target.
> 
>   - systems using the new 'libc6/glibc2' (glibc-2.0.7 or glibc-2.1 is the
>     current 'production' version -- I don't know if '2.1' is yet stable enough)
>     This is the 'i386-linux-gnu' target.
> 
>  You cannot (or it doesn't make much sense) use newlib as the C-library for
> Linux. Instead you must select either one of the previous ones, take the
> library binaries (they include headers too), install them to your Solaris2
> (into '/sw2/gccx386/i386-linux-gnu/include' and
> '/sw2/gccx386/i386-linux-gnu/lib' -- if you use 'i386-linux-gnu' target name),
> and build GCC with/for them...
> 
>  The Debian, RedHat5.x and S.u.S.E.6.x distributions have libc6/glibc2 as the
> 'system' library, the RedHat4.x, S.u.S.E.5.x etc. have libc5 as the 'system'
> library, but the newer systems should include the libc5 run-time libs and be
> capable of running libc5 based apps...
> 
> > ./configure --target="i386-*-linux-gnu" --prefix=/sw2/gccx386 -v
> > make all install
> >
> > I'm getting this linker script error:
> 
>  NEVER use wildcards in the host or target name !!!! (You really aren't the
> first one making this mistake -- but I haven't yet heard a explanation for
> the logic to use them, perhaps you could say something about this ....;-)
> 
>  The configure script uses wildcards for matching, so the 'i386-linux-gnu',
> 'i486-pc-linux-gnu', 'i586-dell-linux-gnulibc2', etc. are just one
> configuration... But using wildcards in the target name in the configure
> command is an error....
> 
> > /sw2/gccx386/build/gcc/ld:built in linker script:5: parse error
> 
>  The 'ld -verbose' will give a linker script having something like :
> 
> ----------- clip --------------
> using internal linker script:
> ==================================================
> OUTPUT_FORMAT(pei-i386)
> SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib);
>  SEARCH_DIR(/usr/local/i386-cygwin32/lib);
> ---------- clip -----------------
> 
> and the 'SEARCH_DIR' being in line 5.... and having your wildcards
> in the directory names. So 'ld' will be scitzofrenic about where to
> search the libs....
> 
>  Cheers, Kai
> _______________________________________________
> New CrossGCC FAQ: http://www.objsw.com/CrossGCC
> _______________________________________________
> To remove yourself from the crossgcc list, send
> mail to crossgcc-request@cygnus.com with the
> text 'unsubscribe' (without the quotes) in the
> body of the message.

-- 

_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/

 Kurt Werth, Computer Systems Analyst       Lockheed Martin Control Systems
 E-mail:   Kurt.D.Werth@lmco.com            600 Main Street 
 Phone:    607-770-3501 / 8*255-3501        Johnson City, NY  13790

_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.