[cfe-dev] clang patches for OpenBSD

Amit Kulkarni amitkulz at gmail.com
Fri Feb 18 10:56:51 PST 2011


Chris and Anton,

I am sorry that I sent out a bad Makefile.rules patch without thinking
about the other OS. I tested the Makefile.rules and confirmed that
this below patch worked on OpenBSD, and should work on others. I
verified twice with a clean rm -rf bindir.
http://www.openbsd.org/cgi-bin/cvsweb/ports/devel/llvm/patches/patch-Makefile_rules
doesn't work at all.

Index: Makefile.rules
===================================================================
--- Makefile.rules      (revision 125944)
+++ Makefile.rules      (working copy)
@@ -971,7 +971,9 @@
        $(Verb) echo "{" > $@
        $(Verb) grep -q "\<" $< && echo "  global:" >> $@ || :
        $(Verb) sed -e 's/$$/;/' -e 's/^/    /' < $< >> $@
+ifneq ($(HOST_OS),OpenBSD)
        $(Verb) echo "  local: *;" >> $@
+endif
        $(Verb) echo "};" >> $@
 clean-local::
        -$(Verb) $(RM) -f $(NativeExportsFile)


Sorry about the SSE2 patch in lib/Lex/Lexer.cpp, unthinking
application by me. Please ignore it.
http://www.openbsd.org/cgi-bin/cvsweb/ports/devel/llvm/patches/patch-tools_clang_lib_Lex_Lexer_cpp
has it for a long time. I hope it will be removed for llvm+clang 2.9
in OpenBSD.

About the -lpthread patch in lib/Driver/Tools.cpp, I have asked
Matthew to reply as I am not qualified to comment on it. Maybe one of
the Port people in OpenBSD can comment on it. If they don't reply
right now it will be because they are busy on OpenBSD 4.9 release,
otherwise, the ports team will change it later. I will try to watch
this issue and resubmit this in 1-2 weeks when ports@ relax a little
bit from their work.

I am doing my bit to make it work seamlessly without patching by
OpenBSD ports@, and trying to feed patches upstream to you guys, as I
admire clang a lot. I will try to be more careful while submitting
patches though :-)

Clang is just great, as its forcing src changes in many places due to
its static analyzer and general C99 and C++0x compile strictness. gcc
doesn't catch half of it. I hope that libc++ and lldb (eager to get
this one on BSD) is also ported fast to all platforms!

Thanks for the patience,
amit

P.S Marc, I was talking about llvm+clang lock in few weeks.


On Fri, Feb 18, 2011 at 11:33 AM, Anton Korobeynikov
<anton at korobeynikov.info> wrote:
>> +#undef __SSE2__
>>  #ifdef __SSE2__
>>  #include <emmintrin.h>
> I don't think this will be accepted.
>
>>  #elif __ALTIVEC__
>> Index: lib/Driver/Tools.cpp
>> ===================================================================
>> --- lib/Driver/Tools.cpp        (revision 125833)
>> +++ lib/Driver/Tools.cpp        (working copy)
>> @@ -3080,9 +3080,9 @@
>>
>>     if (Args.hasArg(options::OPT_pthread))
>>       CmdArgs.push_back("-pthread");
>> +      //CmdArgs.push_back("-lpthread");
> And this as well.
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>




More information about the cfe-dev mailing list