From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id C7D5E1F4B4 for ; Fri, 15 Jan 2021 08:55:49 +0000 (UTC) Received: from localhost ([::1]:34896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0KtY-0007Ks-I8 for normalperson@yhbt.net; Fri, 15 Jan 2021 03:55:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0KtU-0007Ka-Ma for bug-gnulib@gnu.org; Fri, 15 Jan 2021 03:55:44 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.54]:15810) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0KtS-0000Q6-KP; Fri, 15 Jan 2021 03:55:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1610700939; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:From: Subject:Sender; bh=2Od8sOXQP1dVuEnFDLyQI7sZhx+wAr+omlJ9MSTCl+4=; b=C9R5LyxTpoBODjRZMDpfb1qOxaFT0pPIU0adnd5bIrIV4RtinvnnpQPQwYlpF/UgaJ ONnoDmzHne4YGP6VuUu7Gs3Lb0GID11AdDbINY7A5Df2Bbid8KCVTE0bBe8Qu+x7p+3l J7PPg8KM+K4nIIFZGumj4oYtuFvazhFuTdATT6/f+gT2k7UdUnOhA8mPUH6lrbXFvges kW40PKDUCqYWbTb/J6E0sJB0RUDuXwDA7zvSHGgz/qPSdG8j8B3vVMs78gSsRdLFV+hp C93GES5y/TUfZs8mQudFNHOj51dCTCZ2T+q9XFBNK6EVwoxr3Tp90JbjrXMDRUHrURF1 m+YA== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqfyyvs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.12.1 DYNA|AUTH) with ESMTPSA id u0aa20x0F8tDixV (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Fri, 15 Jan 2021 09:55:13 +0100 (CET) From: Bruno Haible To: bug-gnulib@gnu.org, noloader@gmail.com Subject: different CFLAGS for gnulib code? Date: Fri, 15 Jan 2021 09:55:12 +0100 Message-ID: <2567810.aDiGfSFVrs@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <87k0sixwya.fsf@lrde.epita.fr> <2634507.PNdPYx674J@omega> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Received-SPF: none client-ip=85.215.255.54; envelope-from=bruno@clisp.org; helo=mo4-p01-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Simon Josefsson , Paul Eggert , Alexandre Duret-Lutz , Jim Meyering , Paul Smith , Akim Demaille Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi, Jeffrey Walton wrote: > Perhaps it would be a good idea to filter-out the options that you > don't want present for Gnulib. >=20 > If you are doing it during configure, then take the user's CFLAGS (or > CXXFLAGS) and then: >=20 > TCFLAGS=3D`echo $CFLAGS | sed -e 's/-Wall//g' -e 's/-Wextra//g' > -e 's/-Werror//g'` >=20 > If you are doing it during make, then use a recipe like this for Gnulib s= ources: >=20 > GL_CFLAGS :=3D $(filter-out -Wall -Wextra -Werror% -Wunused > -Wconversion -Wp%, $(CFLAGS)) > ... > %.o:%.c: > $CC $(strip $CPPFLAGS $GL_CFLAGS -c) $< >=20 > That will put an end to these mailing list messages and bug reports. > You get what you want, and users get what they want. >=20 > Otherwise, this is an exercise in insanity. Users keep doing the same > thing, GNU keeps doing the same thing, but everyone expects a > different outcome. Instead of practicing inanity, engineer a fix for > the problem. It is an interesting idea. Leaving the question aside how it is implemented (through an AC_SUBSTed variable or what else), the main question is: Would some GNU package maintainers want this? I always thought that GNU package maintainers want their entire package to be compiled with the same CFLAGS and CPPFLAGS. Would compiling the gnulib part with options for fewer warnings be OK with you? Paul, P=E1draig, Jim, Paul, Akim, Simon, all: what's your opinion? Bruno