[PATCH 1/3] Makefile: fix "version.h" build for cross-compiling

Brian Norris computersforpeace at gmail.com
Thu Jul 7 17:36:05 EDT 2011


On Thu, Jul 7, 2011 at 2:12 PM, Mike Frysinger <vapier.adi at gmail.com> 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 $@))

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? :)

Brian



More information about the linux-mtd mailing list