This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Clash between cpp -undef and linker -u options


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)

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