Re: LLVM / clang

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: LLVM / clang
Дата
Msg-id 1277495380.5356.17.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: LLVM / clang  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: LLVM / clang  (Gibheer <gibheer@zero-knowledge.org>)
Re: LLVM / clang  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On fre, 2010-06-11 at 07:00 +0300, Peter Eisentraut wrote:
> The second problem is that the prototype check for accept() fails.
> This
> is because glibc defines the second argument to be a "transparent
> union", apparently to make it look like a lot of things at once.
> clang
> apparently doesn't understand that.  One could address this by
> checking
> for the typedef that glibc uses explicitly in the configure check, but
> that would appear to defeat the point of the *transparent* union.  A
> workaround is to remove -D_GNU_SOURCE from src/template/linux.
>
> Predictably, this will make PL/Perl fail to build.
>
> Also, it will make src/backend/libpq/auth.c fail to build, because
> struct ucred is only defined when _GNU_SOURCE is used.  This would
> actually fail to work on GCC as well, so I think we should add an
> explicit configure check for struct ucred.

For the record, here is a patch that would address these issues.

At the moment, I'm waiting to get my hands on the new version 2.7 of
clang to see if some of these issues have gone away.

Considering that clang already helped us find one bug in the code, I
think it's worth trying to make this work.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Admission Control
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Admission Control