[LLVMdev] FreeBSD Support In lib/System
Jeff Cohen
jeffc at jolt-lang.org
Wed Sep 1 07:26:19 PDT 2004
My experiment to build as if Linux has failed:
gmake[1]: Entering directory `/usr/home/llvm/obj/tools/llvmc'
Compiling ConfigLexer.cpp
/usr/home/llvm/obj/../tools/llvmc/ConfigLexer.l: In function `
llvm::ConfigLexerTokens handleSubstitution(llvm::ConfigLexerTokens)':
/usr/home/llvm/obj/../tools/llvmc/ConfigLexer.l:66: error: `assert' undeclared
(first use this function)
/usr/home/llvm/obj/../tools/llvmc/ConfigLexer.l:66: error: (Each undeclared
identifier is reported only once for each function it appears in.)
/usr/home/llvm/obj/../tools/llvmc/ConfigLexer.l: In function `
llvm::ConfigLexerTokens llvm::Configlex()':
/usr/home/llvm/obj/../tools/llvmc/ConfigLexer.l:174: error: `assert' undeclared
(first use this function)
ConfigLexer.cpp: In function `int yy_get_next_buffer()':
ConfigLexer.cpp:1314: error: `assert' undeclared (first use this function)
ConfigLexer.cpp: In function `void yyunput(int, char*)':
ConfigLexer.cpp:1533: error: `assert' undeclared (first use this function)
ConfigLexer.cpp: In function `yy_buffer_state* Config_create_buffer(FILE*, int)
':
ConfigLexer.cpp:1689: error: `assert' undeclared (first use this function)
ConfigLexer.cpp: In function `yy_buffer_state* Config_scan_buffer(char*,
unsigned int)':
ConfigLexer.cpp:1810: error: `assert' undeclared (first use this function)
ConfigLexer.cpp: In function `yy_buffer_state* Config_scan_bytes(const char*,
int)':
ConfigLexer.cpp:1864: error: `assert' undeclared (first use this function)
gmake[1]: *** [/usr/home/llvm/obj/tools/llvmc/Debug/ConfigLexer.lo] Error 1
gmake[1]: Leaving directory `/usr/home/llvm/obj/tools/llvmc'
gmake: *** [llvmc/.makeall] Error 2
What I don't understand is that the assert macro is used all over the
place, so why is it undeclared only here? It is declared in assert.h on
FreeBSD, but there is not a single include for it I can find other than
lib/System/Unix/Unix.h, and I'm not using "Unix" platform.
I'll start over and use Unix. It won't be until Friday before I have
results.
On Tue, 31 Aug 2004 11:12:49 -0700 Reid Spencer
<reid at x10sys.com> wrote:
> Jeff/Vladimir:
>
> As with Interix, I've recently added support for FreeBSD into
> lib/System. Currently, the implementation of FreeBSD just uses the
> "generic Unix" implementation which probably should work on FreeBSD. If
> not, I would appreciate it if you could make patches in the FreeBSD
> directory. If you do, don't forget that you need to remove anything that
> doesn't work in the lib/System/Unix directory and re-implement it on all
> platforms.
>
> Hopefully this will help you get better FreeBSD support out of LLVM.
>
> Thanks
>
> Reid.
>
More information about the llvm-dev
mailing list