A compiling issue with a new compiler

Unga unga888 at yahoo.com
Sat Jul 12 12:24:46 UTC 2008


Hi all

I have compiled GCC 4.3.1 from source.

echo 'main(){}' > test.c
cc test.c -v -Wl,--verbose

Above two commands end up with:
attempt to open /usr/lib/crtn.o succeeded
/usr/lib/crtn.o/usr/lib/libc.so: undefined reference to `_nsyylex'
/usr/lib/libc.so: undefined reference to `_nsyyin'
/usr/lib/libc.so: undefined reference to `_nsyytext'
/usr/lib/libc.so: undefined reference to `_nsyyerror'
/usr/lib/libc.so: undefined reference to `_nsyylineno'
collect2: ld returned 1 exit status

ld --verbose | grep SEARCH
SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");

Some relevant portions from the compiler spec file:
*linker:
collect2

*startfile_prefix_spec:
/usr/lib/

*fbsd_dynamic_linker:
/libexec/ld-elf.so.1

*link_command:
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:    %(linker) %l %{pie:-pie} %X %{o*}
%{A} %{d} %{e*} %{m} %{N} %{n} %{r}    %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!no
stdlib:%{!nostartfiles:%S}}}    %{static:} %{L*} %(mfwrap) %(link_libgcc) %o
%{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %(mflib
)    %{fprofile-arcs|fprofile-generate|coverage:-lgcov}    %{!nostdlib:%{!nodefa
ultlibs:%(link_ssp) %(link_gcc_c_sequence)}}    %{!A:%{!nostdlib:%{!nostartfiles
:%E}}} %{T*} }}}}}}

Is this something to do with the compiler spec file?

What else should I look for?

Any help in this regard is very much appreciated.

Kind regards
Unga




      


More information about the freebsd-questions mailing list