[PATCH 1/3] Makefile: fix "version.h" build for cross-compiling
Mike Frysinger
vapier.adi at gmail.com
Thu Jul 7 17:49:46 EDT 2011
On Thu, Jul 7, 2011 at 17:36, Brian Norris wrote:
> On Thu, Jul 7, 2011 at 2:12 PM, Mike Frysinger wrote:
>> top level Makefile:
>> -CPPFLAGS += -I./include -I./ubi-utils/include $(ZLIBCPPFLAGS) $(LZOCPPFLAGS)
>> +CPPFLAGS += -I./include -I$(BUILDDIR)/include -I./ubi-utils/include
>> $(ZLIBCPPFLAGS) $(LZOCPPFLAGS)
>
> I still get the same error.
>
> The rule for:
> CC lib/libmtd.o
> doesn't include $(CPPFLAGS). Is this intentional? See:
> %: %.o $(LDDEPS)
> $(call BECHO,LD)
> $(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_$(notdir $@)) -g -o
> $@ $^ $(LDLIBS) $(LDLIBS_$(notdir $@))
that's a link, not a compile, so CPPFLAGS shouldnt be needed as it
should only be used on *.o files. that also shows "BECHO,LD" but your
quoted output is "CC ...", and the CC rule does use CPPFLAGS.
> Anyway, it's hard to trade lines about Makefile fixes, since one fix
> will pop up another problem in hacked-together build systems like
> mtd-utils...can you reproduce my bug completely, Mike? Or shall I
> continue trial and error until we find something good enough for both
> of us? :)
np ... i'll look at it
-mike
More information about the linux-mtd
mailing list