public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Failure linking gengtype when using non-GCC stage1 compiler
@ 2004-02-15 14:54 Kaveh R. Ghazi
  0 siblings, 0 replies; only message in thread
From: Kaveh R. Ghazi @ 2004-02-15 14:54 UTC (permalink / raw)
  To: gcc-bugs, gcc; +Cc: per

Per - I believe this change:
http://gcc.gnu.org/ml/gcc-patches/2004-02/msg01032.html

causes bootstrap to fail on any system where one uses cc (i.e. not
GCC) as the stage1 compiler.  The failure I get on solaris2.7 is:

 > cc -g -DIN_GCC -DHAVE_CONFIG_H -DGENERATOR_FILE -o gengtype gengtype.o
 > 	gengtype-lex.o gengtype-yacc.o ../libiberty/libiberty.a
 > ild: (undefined symbol) linemap_line_start -- referenced in the text
 > 	segment of gengtype.o
 > make[2]: *** [gengtype] Error 5

This happens because gengtype.c includes rtl.h which includes input.h
which includes line-map.h.  In line-map.h you made a static inline
function linemap_position_for_column which calls linemap_line_start.

Now unless we have a C99 compiler or GCC >= 2.7, ansidecl.h defines
"inline" to be empty.  So with my cc linemap_position_for_column
becomes simply static, then call to linemap_line_start must be
resolved and we don't link gengtype with the module where that
function is defined.

There are several obvious ways to fix a problem like this, I'd like
you to please figure out which one makes sense given you wrote the
code.

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-02-15 14:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-15 14:54 Failure linking gengtype when using non-GCC stage1 compiler Kaveh R. Ghazi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).