All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: grub-devel@gnu.org
Subject: Re: INSTALL: Fix names of host flags to match actual behaviour
Date: Sun, 22 Feb 2015 09:29:06 +0300	[thread overview]
Message-ID: <20150222092906.720a08d7@opensuse.site> (raw)

[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?


                 reply	other threads:[~2015-02-22  6:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150222092906.720a08d7@opensuse.site \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.