Date: Sat, 12 Jul 2008 05:24:45 -0700 (PDT) From: Unga <unga888@yahoo.com> To: freebsd-questions@freebsd.org Subject: A compiling issue with a new compiler Message-ID: <451269.42968.qm@web57010.mail.re3.yahoo.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?451269.42968.qm>