Date: Thu, 29 Sep 2011 05:58:18 +0100 From: "Klaus T. Aehlig" <aehlig@linta.de> To: ports@freebsd.org Cc: ehaupt@FreeBSD.org Subject: clang and configure checking for equivalent simple type Message-ID: <20110929045818.GA3463@curry.linta.de>
next in thread | raw e-mail | index | archive | help
Hallo, while trying to find out why I couldn't build net/socat with clang I found something that might be a general issue, and I wonder what appropriate actions would be. Trying 'cd /usr/ports/net/socat && make CC=clang' failed for me and it turned out that the reason was that the configure script could not find out the 'equivalent simple type of off_t'. Looking at the configure script, one notes that it tries code snippets like #include <sys/types.h> #include <unistd.h> int main () { off_t u; long v; &u==&v; ; return 0; } and check for compile errors. However, the above program is rejected by clang, as the value &u==&v is unused, which, of course, has nothing to do with the intended check whether off_t * and long * are compatible pointer. Adding CFLAGS+= -Wno-unused solves this problem. However, I assume that these kind of tests are quite widespread in configure scripts, so I wonder what to do about this. Possible options include - adding 'CFLAGS+= -Wno-unused' just for this port - do nothing, but recommend users to have -Wno-unused in CFLAGS when using clang (maybe somewhere in the handbook) - check with portmgr@ if adding -Wno-unused to the default CFLAGS (for clang?) is an option - something completely different?? (like: add an appropriate entry to my /etc/make.conf and don't care) Any suggestions? Best, Klaus
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110929045818.GA3463>