This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
collect2 "-o" argument position problem
- From: David Guillen <david at davidgf dot net>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 3 Apr 2014 00:26:40 +0200
- Subject: collect2 "-o" argument position problem
- Authentication-results: sourceware.org; auth=none
Hello guys,
I don't know whether this is the best place to ask for this, but
anyway, here we go:
I have two different commandlines for collect2 (I got them after using
-v in gcc) and I found out that the original one does not work because
of the position in the parameter list.
Error:
/home/david/uclibc/uclibc-buildroot-custom/output/build/host-gcc-final-gcc-4_7_3-release/build/./gcc/collect2
--sysroot=/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/sysroot
--eh-frame-hdr -m elf_i386 -dynamic-linker -o conftest
/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/sysroot/usr/lib/crt1.o
/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/sysroot/usr/lib/crti.o
/home/david/uclibc/uclibc-buildroot-custom/output/build/host-gcc-final-gcc-4_7_3-release/build/./gcc/crtbegin.o
-L/home/david/uclibc/uclibc-buildroot-custom/output/build/host-gcc-final-gcc-4_7_3-release/build/./gcc
-L/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/bin
-L/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/lib
-L/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/sysroot/lib
-L/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/sysroot/usr/lib
conftest.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc
--as-needed -lgcc_s --no-as-needed
/home/david/uclibc/uclibc-buildroot-custom/output/build/host-gcc-final-gcc-4_7_3-release/build/./gcc/crtend.o
/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/sysroot/usr/lib/crtn.o
/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/bin/ld:
cannot find conftest: No such file or directory
No error:
/home/david/uclibc/uclibc-buildroot-custom/output/build/host-gcc-final-gcc-4_7_3-release/build/./gcc/collect2
--sysroot=/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/sysroot
--eh-frame-hdr -m elf_i386 -dynamic-linker
/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/sysroot/usr/lib/crt1.o
/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/sysroot/usr/lib/crti.o
/home/david/uclibc/uclibc-buildroot-custom/output/build/host-gcc-final-gcc-4_7_3-release/build/./gcc/crtbegin.o
-L/home/david/uclibc/uclibc-buildroot-custom/output/build/host-gcc-final-gcc-4_7_3-release/build/./gcc
-L/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/bin
-L/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/lib
-L/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/sysroot/lib
-L/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/sysroot/usr/lib
conftest.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc
--as-needed -lgcc_s --no-as-needed
/home/david/uclibc/uclibc-buildroot-custom/output/build/host-gcc-final-gcc-4_7_3-release/build/./gcc/crtend.o
/home/david/uclibc/uclibc-buildroot-custom/output/host/usr/i686-buildroot-linux-gnu/sysroot/usr/lib/crtn.o
-o conftest
Any idea on why the parameter parsing fails? Is it a problem or is it
the expected behavior?
Thanks a lot,
David