Re: Has anyone used CLANG yet?

From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Has anyone used CLANG yet?
Date: 2009-12-10 17:29:39
Message-ID: 87vdge3fgc.fsf@dba2.int.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

agentm(at)themactionfaction(dot)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(at)france3(dot)fr>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-12-10 17:43:14 Re: explain output infelicity in psql
Previous Message Tom Lane 2009-12-10 17:23:58 Re: explain output infelicity in psql