This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Clash between cpp -undef and linker -u options
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Clash between cpp -undef and linker -u options
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Thu, 14 Sep 2000 13:07:12 -0400 (EDT)
The -undef cpp option is incorrectly passed by gcc to collect2 resulting
in a link error. For example, under hpux 10.20:
509 (hiauly1)dave> gcc -undef -o x x.c
/usr/ccs/bin/ld: Unsatisfied symbols:
ndef
collect2: ld returned 1 exit status
Under i686 linux, it causes the following:
dave@hiamlx:~ > gcc -undef -o x x.c
/usr/i486-linux/bin/ld: warning: cannot find entry symbol _start; defaulting to 08048280
It can be seen using `-v' in the above command that -undef is being passed
as an option to collect2 (ie., gcc thinks it is a -u linker option as well
as the -undef cpp option).
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)