[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: INSTALL: Fix names of host flags to match actual behaviour
From: |
Andrei Borzenkov |
Subject: |
Re: INSTALL: Fix names of host flags to match actual behaviour |
Date: |
Sun, 22 Feb 2015 09:29:06 +0300 |
[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?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: INSTALL: Fix names of host flags to match actual behaviour,
Andrei Borzenkov <=