* Re: INSTALL: Fix names of host flags to match actual behaviour
@ 2015-02-22 6:29 Andrei Borzenkov
0 siblings, 0 replies; only message in thread
From: Andrei Borzenkov @ 2015-02-22 6:29 UTC (permalink / raw)
To: grub-devel
[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?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-22 6:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-22 6:29 INSTALL: Fix names of host flags to match actual behaviour Andrei Borzenkov
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.