From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jK3ne-0007ub-JC for mharc-grub-devel@gnu.org; Thu, 02 Apr 2020 13:38:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48752) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK3nc-0007sz-Se for grub-devel@gnu.org; Thu, 02 Apr 2020 13:38:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jK3nb-0001TT-Q9 for grub-devel@gnu.org; Thu, 02 Apr 2020 13:38:40 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:39390) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jK3nb-0001Sc-Gm for grub-devel@gnu.org; Thu, 02 Apr 2020 13:38:39 -0400 Received: by mail-wm1-x342.google.com with SMTP id e9so4614230wme.4 for ; Thu, 02 Apr 2020 10:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1euaQ/j1fyu960VsI+qGnrKHZEzAX929Mh2qvxR256E=; b=VXpqgDf4FYnxE0jGCe1/uQKSLKadwPZ18cXpqoIrx32DlOR3YN9BeKOogOY/ya8F2H pr+NXRsONtgeJ68OrMCa9ok/eGZG0QQ4mAhUItzf1mP+BzaC18POCdR8Vl6CGq77uRuP ex5HuUAN7HL1qhL/4mud91aybfVPcFRvcd0zEQphu37VbP5ET6gQs4W36Xd5FHy5JkLr ziKaHGPmM2VNoPOCMd9iYvb9yoRb7ntgdQZKGOYjae2hS2ZyUdWfrKXSCwZKLxiBR+83 8IEWIYlT7wvByWcNe/AfLmuL2KD36BAZ+ykqs5hUq5bzL1kZjY47VLT3PIXwTwzsK86N Wzmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=1euaQ/j1fyu960VsI+qGnrKHZEzAX929Mh2qvxR256E=; b=RY0vCAB81VoagwztibufiXRens7cExfmSdbXa5vcTzxZXjOBPLYjI1JvECzf0DTywu +0Dnu3eaF695SaBzylz8f1gGwqsNyjNWM16nHPXNQMO/rnWnjKBFeDXZCSp/gh6HsRJy IVkk6aL64P49JwzUcCEsU09ceHqMrXAsA9QQ91NhduV+EuoG4uZKH10weslhZTVcLqDI +c8bTgiAV4ux0DoyWAJbKaeYbxovJ3NCVUwrCOfZKeSm+HckRvDbhzdazD+jPmc+tMRf uiw+stqrevFWzbjui4Hy388qOPvM6NR/DUvePJMcYKfeY94c98zYJxnXFm0DtK9NV1xU yXIg== X-Gm-Message-State: AGi0PuZnGZue3ITzrivFqUX/KcacB8IOs/c+Ex7yAHavBcZclBtxfTby hMQMIUIYBm4JRgdRyhucmPOtgQ== X-Google-Smtp-Source: APiQypJOrfERwIl1t//LRSYTWB4hWh1okdLsptaG0xI3iIAAC78UGklPNVuzPNroywA+i7rR2Q90dw== X-Received: by 2002:a1c:9658:: with SMTP id y85mr4419879wmd.63.1585849118170; Thu, 02 Apr 2020 10:38:38 -0700 (PDT) Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id c85sm7974725wmd.48.2020.04.02.10.38.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 10:38:37 -0700 (PDT) Date: Thu, 2 Apr 2020 18:38:35 +0100 From: Leif Lindholm To: Daniel Kiper Cc: grub-devel@gnu.org, javierm@redhat.com, olaf@aepfle.de, phcoder@gmail.com, pjones@redhat.com Subject: Re: [PATCH 1/3] configure: Enforce gnu99 C language standard Message-ID: <20200402173835.GR7468@vanye> References: <20200402150750.6665-1-daniel.kiper@oracle.com> <20200402150750.6665-2-daniel.kiper@oracle.com> <20200402162833.GQ7468@vanye> <20200402170821.zxs3cl43g6tsxcy2@tomti.i.net-space.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200402170821.zxs3cl43g6tsxcy2@tomti.i.net-space.pl> User-Agent: Mutt/1.10.1 (2018-07-13) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 17:38:42 -0000 On Thu, Apr 02, 2020 at 19:08:21 +0200, Daniel Kiper wrote: > > > -# Optimization flag. Allow user to override. > > > +if test "x$BUILD_CFLAGS" = x; then > > > + BUILD_CFLAGS='-std=gnu99' > > > +fi > > > + > > > +if test "x$HOST_CFLAGS" = x; then > > > + HOST_CFLAGS='-std=gnu99' > > > +fi > > > + > > > if test "x$TARGET_CFLAGS" = x; then > > > - TARGET_CFLAGS="$TARGET_CFLAGS -Os" > > > + TARGET_CFLAGS='-Os -std=gnu99' > > > fi > > > > Do these not add -std=gnu99 only if *_CFLAGS are not specified? > > Exactly... > > > Would we not want to override these always? > > > > For example, Debian/Ubuntu override HOST_CFLAGS when building grub. > > I was not sure about it. So, after some thinking I decided to give > a user a chance to override C language type using *_CFLAGS. However, > I am not so strongly tied to that. If you think we should add > "-std=gnu99" unconditionally I am OK with that. I think we should. As long as we permit overriding *_CFLAGS, and put the user-provided flags last, that would still permit someone to override the --std option witn an alternative one. (Works just like the -O flags.) / Leif