Re: Has anyone used CLANG yet? - Mailing list pgsql-hackers

From Chris Browne
Subject Re: Has anyone used CLANG yet?
Date
Msg-id 87vdge3fgc.fsf@dba2.int.libertyrms.com
Whole thread Raw
In response to Has anyone used CLANG yet?  (Chris Browne <cbbrowne@acm.org>)
List pgsql-hackers
agentm@themactionfaction.com ("A.M.") writes:

[Much of interest elided...  Cool to see that clang clearly *can*
compile PostgreSQL...]

> You are probably running configure with gcc, no?

I was *attempting* to run configure using clang:
 CC=/usr/bin/clang ./configure --prefix=/home/chris/dbs/postgresql-git-head

I know it's using clang, as some of the early tests indicate that
specifically.

checking types of arguments for accept()... configure: error: could not determine argument types

It's worth noting that the problem is NOT fundamentally any
Pascal-parm-passing-style issue; that's a red herring.  The trouble is
that it's not finding a function signature for accept(), and a number of
the attempts (well, half of them...) happen to try to use Pascal
parm-passing conventions.

Actually, there's a little more mystery to it...  I pulled out the C
code from config.log that corresponds with my favorite
/usr/include/sys/socket.h accept() signature, and clang is happy to
compile it, even though configure logs, in config.log, that there was a
mismatch.  So, for some reason, configure had no problem running clang a
bunch of times against *other* C fragments, but somehow didn't like how
it ran this one.

Presumably there's some dang GNU magic going on ;-).

Thanks for verifying that the notion of compiling PostgreSQL using clang
is something that in principle ought to be able to work.  Perhaps this
first Debian packaging of it has some deficiency, or my workstation
hates me!  :-).
-- 
output = ("cbbrowne" "@" "gmail.com")
The real  problem with the  the year 2000  is that there are  too many
zero bits and that adversely affects the global bit density.
-- Boyd Roberts <boyd@france3.fr>


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: thread safety on clients
Next
From: Tom Lane
Date:
Subject: Re: tsearch parser overhaul