Compilation of the gold linker, using g++ 4.2.3 on Linux 2.6.24, fails with the following error:
if g++ -DHAVE_CONFIG_H -I. -I. -I. -I. -I./../include -I./../elfcpp -DLOCALEDIR="\"/usr/local/share/locale\"" -DBINDIR="\"/usr/local/bin\"" -DTOOLBINDIR="\"/usr/local//bin\"" -W -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -MT archive.o -MD -MP -MF ".deps/archive.Tpo" -c -o archive.o archive.cc; \ then mv -f ".deps/archive.Tpo" ".deps/archive.Po"; else rm -f ".deps/archive.Tpo"; exit 1; fi In file included from /usr/include/c++/4.2/i486-linux-gnu/bits/c++locale.h:52, from /usr/include/c++/4.2/iosfwd:45, from /usr/include/c++/4.2/bits/stl_algobase.h:70, from /usr/include/c++/4.2/memory:53, from /usr/include/c++/4.2/tr1/hashtable:56, from /usr/include/c++/4.2/tr1/unordered_set:37, from gold.h:54, from archive.cc:23: /usr/include/libintl.h:40: error: expected unqualified-id before const /usr/include/libintl.h:40: error: expected `)' before const /usr/include/libintl.h:40: error: expected initializer before const /usr/include/libintl.h:45: error: expected unqualified-id before const /usr/include/libintl.h:45: error: expected `)' before const /usr/include/libintl.h:45: error: expected initializer before const /usr/include/libintl.h:52: error: expected unqualified-id before const /usr/include/libintl.h:52: error: expected `)' before const /usr/include/libintl.h:52: error: expected initializer before const /usr/include/libintl.h:83: error: expected unqualified-id before while /usr/include/libintl.h:83: error: expected initializer before while /usr/include/libintl.h:87: error: expected unqualified-id before while /usr/include/libintl.h:87: error: expected initializer before while The problem lies in the header file gold/gold.h when ENABLE_NLS is undefined: #ifdef ENABLE_NLS # include <libintl.h> # define _(String) gettext (String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define gettext(Msgid) (Msgid) # define dgettext(Domainname, Msgid) (Msgid) # define dcgettext(Domainname, Msgid, Category) (Msgid) # define textdomain(Domainname) while (0) /* nothing */ # define bindtextdomain(Domainname, Dirname) while (0) /* nothing */ # define _(String) (String) # define N_(String) (String) #endif The macros for gettext and cie. mangles the prototypes defined in the libintl.h header and causes the compilation errors. -- Summary: gettext macros mangle system include files and causes compilation errors. Product: binutils Version: 2.19 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold AssignedTo: ian at airs dot com ReportedBy: alexandre at peadrop dot com CC: bug-binutils at gnu dot org http://sourceware.org/bugzilla/show_bug.cgi?id=6716 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils