public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
To: gcc-bugs@gcc.gnu.org, gcc@gcc.gnu.org
Cc: per@bothner.com
Subject: Failure linking gengtype when using non-GCC stage1 compiler
Date: Sun, 15 Feb 2004 14:54:00 -0000	[thread overview]
Message-ID: <200402151454.i1FEsjtW014663@caip.rutgers.edu> (raw)

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


                 reply	other threads:[~2004-02-15 14:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200402151454.i1FEsjtW014663@caip.rutgers.edu \
    --to=ghazi@caip.rutgers.edu \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=per@bothner.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).