GCC tries building libcpp using linux compiler
Posted: Fri Oct 16, 2015 3:32 pm
I am trying to build a native glidix gcc using my cross-compiler that runs on linux. The configuration line I use is:
The build fails at a very strange error:
As we can see from the command, while building libcpp, it tries using the linux compiler (g++). My OS has no C++ cross-compiler built as I do not yet intend to support C++. So I do not even see any reason why it would try to build libcpp in the first place.
Has anyone stumbled upon this issue?
Code: Select all
../glidix-gcc/configure --host=x86_64-glidix --target=x86_64-glidix --prefix=/usr --exec-prefix=/usr --enable-languages=c --disable-nls --disable-libstdcxx
Code: Select all
make[1]: Wejście do katalogu `/home/mariusz/Madd/build/glidix/build-native-gcc/libcpp'
g++ -I../../glidix-gcc/libcpp -I. -I../../glidix-gcc/libcpp/../include -I../../glidix-gcc/libcpp/include -g -O2 -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long -fno-exceptions -fno-rtti -I../../glidix-gcc/libcpp -I. -I../../glidix-gcc/libcpp/../include -I../../glidix-gcc/libcpp/include -c -o charset.o -MT charset.o -MMD -MP -MF .deps/charset.Tpo ../../glidix-gcc/libcpp/charset.c
In file included from ../../glidix-gcc/libcpp/../include/hashtab.h:40:0,
from ../../glidix-gcc/libcpp/../include/filenames.h:29,
from ../../glidix-gcc/libcpp/system.h:367,
from ../../glidix-gcc/libcpp/charset.c:21:
../../glidix-gcc/libcpp/../include/ansidecl.h:171:64: error: new declaration ‘char* basename(const char*)’
# define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
^
../../glidix-gcc/libcpp/../include/libiberty.h:110:64: note: in expansion of macro ‘ATTRIBUTE_NONNULL’
extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
^
In file included from ../../glidix-gcc/libcpp/system.h:201:0,
from ../../glidix-gcc/libcpp/charset.c:21:
/usr/include/string.h:601:26: error: ambiguates old declaration ‘const char* basename(const char*)’
extern "C++" const char *basename (const char *__filename)
^
make[1]: *** [charset.o] Błąd 1
make[1]: Opuszczenie katalogu `/home/mariusz/Madd/build/glidix/build-native-gcc/libcpp'
make: *** [all-libcpp] Błąd 2
Has anyone stumbled upon this issue?