cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Third party header brokenness toleration [Was: Our GnuTLS support needs polish]

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 8 Aug 2011 17:00:34 +0200 (CEST)

On Mon, 8 Aug 2011, Yang Tse wrote:

>> * A third bug that seems to be unrelated to GnuTLS is that we don't properly
>>  replace -I with -isystem when we use --enable-debug or -enable-werror
>
> If we have to call this a bug, I would not say it is a bug in our side but a
> bug in third party header file. This is my reasoning...

I tend to agree with that. But unfortunately we can't assume that all our
third party libs will agree with us that C89 compliance and strict compiler
option usage is the thing to go for.

The -isystem thing is just an attempt to make us warn and error less on
other's stuff as we bother about OUR code and headers, while we let others
worry about THEIR code and headers.

> Our configure script currently replaces -I with -isystem when using GCC for
> those paths provided in CFLAGS and CPPFLAGS before the configure script
> runs.

> Additionally, include paths that are obtained with pkg-config should
> equally be modified from -I to -isystem, and separate variables might
> be required in order to emmit our own dependencies.

Ah right. We need some new magic ways if we want to "fix" pkg-config extracted
include paths. Right now I fixed it manually by editing the Makefile after
configure had run.

> I really wonder why anyone would want us to subvert the intention and
> functionality of --enable-warnings and/or -Werror. They get what they asked
> for, the strictest error checking available for the resulting build, and
> that includes third party headers involved in the build process.

I want the strictest possible checks and -Werror on code I write, but still I
want to be able to use release versions of 3rd party libraries without
suffering too much.

But I realize it is hard to make this happen completely automatically for all
cases.

> As a note relative to this, I don't remember now which platform is doing it
> but among other things they patch from our distribution is actually removing
> the -isystem stuff we introduce in the configure script.

I recall having seen something like that as well. But then again we see
distros and ports do all sorts of funny things so I'm not sure how to use that
info!

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-08-08