Building clang and llvm on OpenBSD 4.8+


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


For example, this is the original content of

    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
# find . -name "*.map" | xargs grep local
./tools/bugpoint-passes/Debug+Asserts/ local: *;
./lib/Transforms/Hello/Debug+Asserts/ 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.

I just turned off the version scripts :slight_smile:

Does ENABLE_SHARED = 1 work on amd64 as well?

I did a svn up, will try out your changes.

I don't know! Trying out the release+asserts with enable shared.



I am @ revision 118197. I built clang like this
../llvm/configure --enable-optimized --enable-shared

I had to remove the local: *; from the same files in Release+Asserts
directory. I don't know why it didn't pick up the version script
changes. Anyway its minor.


Clang builds with shared libs too.

clang went from 600 Megs down to 14 Megs when enable shared is turned on.

Thanks a lot!