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]

Re: gengenrtl needs to link with libintl


I ran into this problem today with a Solaris 2.5.1 native build.

Part of the problem here is that obstack.c is in the libiberty directory, and
has a #include <config.h> at the top whose intent is to include the libiberty
config.h file.  Gcc then builds obstack.c from ../libiberty/obstack.c,
using a -I. option, which means that we accidentally include the gcc
config.h file instead of the libiberty config.h file.  This wasn't a serious
problem previously.  However, Zack's Oct 19 change added code that puts
HAVE_LIBINTL_H into the gcc config.h file.  Libiberty also has a
HAVE_LIBINTL_H macro in its config.h file, but it means something different
than the one in the gcc config.h file.  So now gcc's obstack.o gets
compiled to use gettext when it shouldn't because it is using the wrong
HAVE_LIBINTL_H definition.

Adding a -I../libiberty/ option might be a reasonable solution, unless there
is some reason why we want to use the gcc config.h file instead of the
libiberty config.h file.

Checking for GENERATOR_FILE seems reasonable too, except that it is a gcc
specific macro, and hence I don't think it should go into the libiberty
directory.  Instead, I'd suggest modifying either the gcc config.h or the
gcc auto-host.h files to undef or not define the problematic HAVE_LIBINTL_H
macro when GENERATOR_FILE is true.

Jim


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