[cfe-dev] Building clang and llvm on OpenBSD 4.8+

Amit Kulkarni amitkulz at gmail.com
Wed Nov 3 13:21:45 PDT 2010


Hello,

I just want to report that clang + llvm, sources grabbed from early
today built a Debug+Asserts just fine on OpenBSD -current AMD64 which
was itself built yesterday!

OpenBSD 4.8+ AMD64 system compiler is gcc/g++ 4.2.1

I had to following MINOR modifications to make it happen.

1) I just had to remove a line reproduced below @ around the end of
file in following files

local: *;                        ==> Offending line

which caused errors like
syntax error in VERSION script

This line is generated dynamically during the process of
compiling/linking in the following files

CLANG_BIN_DIR/tools/edis/Debug+Asserts/EnhancedDisassembly.exports.map
CLANG_BIN_DIR/tools/lto/Debug+Asserts/lto.exports.map
CLANG_BIN_DIR/tools/clang/tools/libclang/Debug+Asserts/libclang.exports.map
CLANG_BIN_DIR/runtime/libprofile/Debug+Asserts/libprofile.exports.map

For example, this is the original content of
CLANG_BIN_DIR/runtime/libprofile/Debug+Asserts/libprofile.exports.map

{
    llvm_start_edge_profiling;
    llvm_start_opt_edge_profiling;
    llvm_start_basic_block_tracing;
    llvm_trace_basic_block;
    local: *;
};

I did a grep in CLANG_BIN_DIR but surprisingly the following files
also have it but gcc doesn't complain in those instances.

# pwd
/extra/clang-build
# find . -name "*.map" | xargs grep local
./tools/bugpoint-passes/Debug+Asserts/bugpoint.exports.map:  local: *;
./lib/Transforms/Hello/Debug+Asserts/Hello.exports.map:  local: *;

Thank you thank you thank you!
P.S the build has lots and lots of warnings if anybody is interested I
will send it.



More information about the cfe-dev mailing list