From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15370 invoked by alias); 15 Feb 2004 14:54:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15355 invoked from network); 15 Feb 2004 14:54:47 -0000 Received: from unknown (HELO caip.rutgers.edu) (128.6.236.10) by sources.redhat.com with SMTP; 15 Feb 2004 14:54:47 -0000 Received: from caip.rutgers.edu (localhost [127.0.0.1]) by caip.rutgers.edu (8.12.9/8.12.9) with ESMTP id i1FEsjWo014664; Sun, 15 Feb 2004 09:54:46 -0500 (EST) Received: (from ghazi@localhost) by caip.rutgers.edu (8.12.9/8.12.9/Submit) id i1FEsjtW014663; Sun, 15 Feb 2004 09:54:45 -0500 (EST) Date: Sun, 15 Feb 2004 14:54:00 -0000 From: "Kaveh R. Ghazi" Message-Id: <200402151454.i1FEsjtW014663@caip.rutgers.edu> To: gcc-bugs@gcc.gnu.org, gcc@gcc.gnu.org Subject: Failure linking gengtype when using non-GCC stage1 compiler Cc: per@bothner.com X-SW-Source: 2004-02/txt/msg01560.txt.bz2 List-Id: 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