From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XBTVT-0003Dt-9Y for mharc-grub-devel@gnu.org; Sun, 27 Jul 2014 14:49:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBTVM-0003CW-DR for grub-devel@gnu.org; Sun, 27 Jul 2014 14:49:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBTVG-0001BO-Rd for grub-devel@gnu.org; Sun, 27 Jul 2014 14:49:08 -0400 Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]:55803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBTVG-0001Aw-Ee for grub-devel@gnu.org; Sun, 27 Jul 2014 14:49:02 -0400 Received: by mail-la0-f45.google.com with SMTP id ty20so4731651lab.18 for ; Sun, 27 Jul 2014 11:49:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; bh=h99gzMvBC3dMrEmk0/n4rBOxgmfA09uuttMIuO4QAug=; b=x9cB3UVEMaE0/YbRa5q13T1lqoaRUDeH5fNZoKWXNm5K6hmLSB901aEonY17CDOclw mX7axyNelpnMCw2GMUwhDtQCSN7OiEurg6somb0cckm5LIcMyon5dJFFMVRsU5KY9wvD 5N1zxl0EWSlfVpOCwNwi9JIcQF21XNbBc1PVbJH+jT31jenQ4bUutjU+bKED4CaraLrD oQQMR85f7EEU9UvMd079CZ8ZIbQ1pazHWjDGoQEfWwL51yvptGljJcgW/08AJB/FJLJM ZaJyuaMSeaPfZZ/uu/YuDvmWJ1toU/Ly7DWZzYFoYHowUV24ReHy30d16tHaraQBGLK3 zCgQ== X-Received: by 10.112.5.170 with SMTP id t10mr28778763lbt.54.1406486941257; Sun, 27 Jul 2014 11:49:01 -0700 (PDT) Received: from opensuse.site (ppp94-29-76-101.pppoe.spdop.ru. [94.29.76.101]) by mx.google.com with ESMTPSA id a5sm3965627lbw.21.2014.07.27.11.49.00 for (version=SSLv3 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 27 Jul 2014 11:49:00 -0700 (PDT) Date: Sun, 27 Jul 2014 22:48:59 +0400 From: Andrey Borzenkov To: The development of GNU GRUB Subject: Re: HOST_* flags are not used by gnulib Message-ID: <20140727224859.02ce5ce0@opensuse.site> In-Reply-To: <53D5481C.3030504@gmail.com> References: <20140403220112.3741074b@opensuse.site> <53CF6732.4030500@gmail.com> <20140727223956.2b1f2dad@opensuse.site> <53D5481C.3030504@gmail.com> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.22; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/9uge5+p6=gZsHOpm3Jz8.oC"; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22d Cc: phcoder@gmail.com 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, 27 Jul 2014 18:49:14 -0000 --Sig_/9uge5+p6=gZsHOpm3Jz8.oC Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =D0=92 Sun, 27 Jul 2014 20:42:36 +0200 Vladimir '=CF=86-coder/phcoder' Serbinenko =D0=BF=D0=B8= =D1=88=D0=B5=D1=82: > On 27.07.2014 20:39, Andrey Borzenkov wrote: > > =D0=92 Sun, 27 Jul 2014 14:24:07 -0400 > > Mike Gilbert =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > >=20 > >> On Sun, Jul 27, 2014 at 2:10 PM, Vladimir 'phcoder' Serbinenko > >> wrote: > >>> > >>> On 27 Jul 2014 20:07, "Mike Gilbert" wrote: > >>>> > >>>> On Wed, Jul 23, 2014 at 3:41 AM, Vladimir '=CF=86-coder/phcoder' Ser= binenko > >>>> wrote: > >>>>> On 03.04.2014 20:01, Andrey Borzenkov wrote: > >>>>>> I noticed that host flags are not propagated to gnulib. This does = not > >>>>>> feel right; in particular I noticed it because attempt to enable > >>>>>> debugging for host tools (HOST_CFLAGS=3D-g) did not work for gnulib > >>>>>> files. > >>>>>> > >>>>> It should be just CFLAGS (refer to INSTALL) > >>>> > >>>> Last I checked, CFLAGS ends up getting used for both host utilities > >>>> and at least some of the target/boot code. That might be a bug in the > >>>> build system. > >>>> > >>>> > >>> CFLAGS is used as default for TARGET_CFLAGS. If it happens in another > >>> context it's most likely a bug. Can you provide more details? > >> > >> Sure. If I configure with this script: > >> > >> #!/bin/sh > >> CHOST=3Dx86_64-pc-linux-gnu > >> CBUILD=3D$CHOST > >> CTARGET=3Darmv7a-hardfloat-linux-gnueabi > >> S=3D"${HOME}"/src/grub > >> > >> # This will cause a build failure if passed to armv7a compiler > >> export CFLAGS=3D"-march=3Dx86-64" > >> export TARGET_CFLAGS=3D"-Os" > >> > >> "${S}"/configure --build=3D"${CBUILD}" --host=3D"${CHOST}" --target=3D= "${CTARGET}" > >> > >> > >> I get this build failure: > >> > >> armv7a-hardfloat-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. > >> -I/home/floppym/src/grub/grub-core -I.. -Wall -W > >> -I/home/floppym/src/grub/include -I../include -DGRUB_MACHINE_UBOOT=3D1 > >> -DGRUB_MACHINE=3DARM_UBOOT -nostdinc -isystem > >> /usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.8.3/include > >> -DGRUB_FILE=3D\"lib/disk.c\" -I. -I/home/floppym/src/grub/grub-core -I= .. > >> -I/home/floppym/src/grub -I/home/floppym/src/grub/include -I../include > >> -I/home/floppym/src/grub/grub-core/lib/libgcrypt-grub/src/ -Os > >> -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment > >> -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero > >> -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k > >> -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain > >> -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses > >> -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch > >> -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function > >> -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable > >> -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g > >> -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations > >> -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self > >> -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers > >> -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing > >> -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign > >> -Wmissing-prototypes -Wmissing-declarations -Wformat=3D2 > >> -freg-struct-return -fno-dwarf2-cfi-asm > >> -fno-asynchronous-unwind-tables -mlong-calls -mthumb-interwork -Qn > >> -fno-stack-protector -mno-unaligned-access -Wtrampolines -Werror > >> -ffreestanding -march=3Dx86-64 -MT lib/disk_module-disk.o -MD -MP -MF > >=20 > > This is Automake generated rule for dependency tracking. It adds > > $(CFLAGS) indeed. Not sure how we can work around it. > >=20 > CFLAGS is supposed to be set to TARGET_CFLAGS in grub-core/Makefile. I > don't know why it didn't happen. It sets AM_CFLAGS, not CFLAGS. AM_CFLAGS =3D $(TARGET_CFLAGS) > > ./Makefile: $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(g= rub_syslinux2cfg_CPPFLAGS) $(CPPFLAGS) $(grub_syslinux2cfg_CFLAGS) $(CFLAGS= ) -MT grub-core/kern/emu/grub_syslinux2cfg-hostfs.o -MD -MP -MF grub-core/k= ern/emu/$(DEPDIR)/grub_syslinux2cfg-hostfs.Tpo -c -o grub-core/kern/emu/gru= b_syslinux2cfg-hostfs.o `test -f 'grub-core/kern/emu/hostfs.c' || echo '$(s= rcdir)/'`grub-core/kern/emu/hostfs.c > >=20 > > For now I'm afraid the only workaround is "do not do it" - any stray > > C(PP)FLAGS during make run will confuse it ... :( > >=20 > >> lib/.deps-core/disk_module-disk.Tpo -c -o lib/disk_module-disk.o `test > >> -f 'lib/disk.c' || echo '/home/floppym/src/grub/grub-core/'`lib/disk.c > >> armv7a-hardfloat-linux-gnueabi-gcc: error: unrecognized argument in > >> option =E2=80=98-march=3Dx86-64=E2=80=99 > >> > >> _______________________________________________ > >> Grub-devel mailing list > >> Grub-devel@gnu.org > >> https://lists.gnu.org/mailman/listinfo/grub-devel > >=20 > >=20 > > _______________________________________________ > > Grub-devel mailing list > > Grub-devel@gnu.org > > https://lists.gnu.org/mailman/listinfo/grub-devel > >=20 >=20 >=20 --Sig_/9uge5+p6=gZsHOpm3Jz8.oC Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlPVSZsACgkQR6LMutpd94wupgCghmR6NCWSiM0K31o5lsQA+pSH ZTgAnRna/AG1zqFT6jZC8e2W3ZxOmmgo =LPEP -----END PGP SIGNATURE----- --Sig_/9uge5+p6=gZsHOpm3Jz8.oC--