From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YPQ2V-0007Rz-Fe for mharc-grub-devel@gnu.org; Sun, 22 Feb 2015 01:29:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPQ2T-0007RS-Ap for grub-devel@gnu.org; Sun, 22 Feb 2015 01:29:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YPQ2Q-0003wV-5B for grub-devel@gnu.org; Sun, 22 Feb 2015 01:29:13 -0500 Received: from mail-lb0-x236.google.com ([2a00:1450:4010:c04::236]:33551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPQ2P-0003wJ-Sp for grub-devel@gnu.org; Sun, 22 Feb 2015 01:29:10 -0500 Received: by lbvp9 with SMTP id p9so13319839lbv.0 for ; Sat, 21 Feb 2015 22:29:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; bh=gGcg9/j5BoWjDYwIsuAzbgZTrQE8VlCS9aM/ebfBiM0=; b=lphzM+v9yl4X38Mg5qvTFqQUsikGQx75W1CYUFIu8TCbzI+vdoq9KkedD6DDsGLcDF RoS/6YTyVNz/nhMk3iOhvy9XWN8JHvkLvBAVB5a3O5HgD7M4PRGlIABrqDwt1qNPnIvw iWW8NFj0UOLWqh+1CNJWH1j3xzNR0f8nOwHS75mRKq7GJJ76hDVojjD1nwaU57E0K51A 0jDBL2JpXCzvdzSN5ZFBf/NCF/BPn6slW9Ijy81RHm8DcnoEl1Ku6DxkRgsZY08owCou 6+8Zyd0JiXrNdrnEQv4mpnlW9pAtwn3DZ6RLqQj9447ByidmB3BFOJyAC2Mdeb6gnag+ QiZQ== X-Received: by 10.152.9.230 with SMTP id d6mr4618713lab.16.1424586548996; Sat, 21 Feb 2015 22:29:08 -0800 (PST) Received: from opensuse.site (ppp91-76-14-38.pppoe.mtu-net.ru. [91.76.14.38]) by mx.google.com with ESMTPSA id ay12sm2340881lab.6.2015.02.21.22.29.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Feb 2015 22:29:08 -0800 (PST) Date: Sun, 22 Feb 2015 09:29:06 +0300 From: Andrei Borzenkov To: grub-devel@gnu.org Subject: Re: INSTALL: Fix names of host flags to match actual behaviour Message-ID: <20150222092906.720a08d7@opensuse.site> X-Mailer: Claws Mail 3.11.0 (GTK+ 2.24.25; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::236 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Feb 2015 06:29:14 -0000 [Does Savannah offer GIT commits list?] > - 3. CFLAGS= for C options for host. > - 4. CPPFLAGS= for C preprocessor options for host. > - 5. LDFLAGS= for linker options for host. > + 3. HOST_CFLAGS= for C options for host. > + 4. HOST_CPPFLAGS= for C preprocessor options for host. > + 5. HOST_LDFLAGS= for linker options for host. It is not that simple. a) we are using unchanged gnulib Makefile which knows nothing about HOST_CFLAGS, which means, gnulib is compiled with different flags. depbase=`echo xsize.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ gcc -DHAVE_CONFIG_H -I. -I../.. -I../../intl -D_FILE_OFFSET_BITS=64 -MT xsize.o -MD -MP -MF $depbase.Tpo -c -o xsize.o xsize.c &&\ mv -f $depbase.Tpo $depbase.Po So we actually *do* want CFLAGS to be used here, except that b) automake always adds CFLAGS to compile command, this is quite deep and I do not know how it can be changed. So any attempt to also set CFLAGS will pollute target compile command that we do not want. So far solutions I can think of are 1) patch gnulib Makefile to use HOST_CFLAGS 2) remove gnulib from SUBDIRS and explicitly call it with CFLAGS=$(HOST_CFLAGS) 3a) make sure CFLAGS == HOST_CFLAGS in configure results 3b) ensure that CFLAGS is set to empty string in Makefile We will probably need 3b anyway to avoid unintentional pollution of target options. Otherwise I tend to consider 1 or 2 as this means "make HOST_CFLAGS=xxx" will apply to both grub and gnulib. Comments?