Hi Guys
I'm trying to port and build LLVM to the Interix environment. I've succeded until the Interix version of gcc program executes:
gmake[1]: Entering directory `/usr/local/src/llvm/lib/Support'
gmake[1]: Leaving directory `/usr/local/src/llvm/lib/Support'
gmake[1]: Entering directory `/usr/local/src/llvm/lib/Support'
Compiling CommandLine.cpp
CommandLine.cpp: In function `void ParseCStringVector(std::vector<char*,
std::allocator<char*> >&, const char*)':
CommandLine.cpp:189: error: `strdup' undeclared (first use this function)
CommandLine.cpp:189: error: (Each undeclared identifier is reported only once
for each function it appears in.)
CommandLine.cpp: In function `void llvm::ParseEnvironmentOptions(const
char*, const char*, const char*)':
CommandLine.cpp:230: error: `strdup' undeclared (first use this function)
gmake[1]: *** [/usr/local/src/llvm/lib/Support/Debug/CommandLine.lo] Error 1
gmake[1]: Leaving directory `/usr/local/src/llvm/lib/Support'
gmake: *** [all] Error 1
It seems that the declaration of strdup is missing. However, in the ../include/Support/CommandLine.h you've included a reference to the <string> library.
The man page of Interix suggests a reference to <string.h> instead.
The version of gcc is:
%gcc --version
gcc (GCC) 3.3
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%
I can't figure out what's wrong here.
/Henrik