Re: Clean up build warnings of plperl with clang-12+

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Clean up build warnings of plperl with clang-12+
Date: 2021-11-11 20:07:00
Message-ID: 80fcc72c-dcca-126c-5359-869ec00107e3@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 11/11/21 13:18, Tom Lane wrote:
> Michael Paquier <michael(at)paquier(dot)xyz> writes:
>> Backpatched this one as of 9ff47ea. That should allow the addition of
>> -Werror on dangomushi.
> I see you tried to do that by adding -Werror to CPPFLAGS. That doesn't
> work because it breaks configure's tests. (I wonder if meson is any
> smarter than autoconf about that.) The way I do it on my own
> animals is like
>
> if ($branch eq 'HEAD' or $branch ge 'REL9_3')
> {
> # Add -Werror so we get errors for warning conditions.
> # Pre-9.3 PG doesn't compile cleanly with Sierra's cc.
> # Can't put this in CFLAGS because it breaks configure,
> # so use COPT instead.
> $conf{build_env}{COPT} = "-Werror";
> }
>
> Guess I could drop the branch check now.
>
>

Wouldn't it be better in any case just to add the clang fix for building
plperl rather than globally?

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2021-11-11 20:22:32 Re: .ready and .done files considered harmful
Previous Message Andrew Dunstan 2021-11-11 20:04:25 Test::More version