Am 04.01.2010 um 21:47 schrieb Blue Swirl:
On Sun, Jan 3, 2010 at 12:31 PM, Blue Swirl <blauwir...@gmail.com>
wrote:
2009/12/31 Andreas Färber <andreas.faer...@web.de>:
From: Andreas Färber <afaer...@opensolaris.org>
Juan has contributed a cool Makefile infrastructure that enables
us to drop
static libraries completely:
Move shared obj-y definitions to Makefile.objs, prefixed
{common-,hw-,user-},
and link those object files directly into the executables.
Replace HWLIB by HWDIR, specifying only the directory.
Drop --whole-archive and ARLIBS in Makefiles and configure.
Drop GENERATED_HEADERS dependency in rules.mak, since this
rebuilds all
common objects after generating a target-specific header; add
dependency
rules to Makefile and Makefile.target instead.
v2:
- Don't try to include /config.mak for user emulators
- Changes to user object paths ("Quickfix for libuser.a drop")
were obsoleted
by "user_only: compile everything with -fpie" (Kirill A. Shutemov)
Breaks build:
CC i386-softmmu/i386-dis.o
make[1]: *** No rule to make target `/loader.o', needed by `qemu'.
Stop.
I found out that completely removing the object directory and
recreating it from scratch helps. This sucks bisectability-wise, is
there any way to avoid it?
Sounds as if configure was not re-run and thus $(HWDIR) not set in
config-target.mak. No idea why, more likely a general issue.
Do you have a way to reproduce? What about `make clean` or `make
distclean`?
There is still one problem, tools need config-host.h but the
dependencies are not correct:
CC qemu-nbd.o
In file included from /src/qemu/qemu-nbd.c:19:
/src/qemu/qemu-common.h:32:25: error: config-host.h: No such file or
directory
Fix coming up. Basically, $(GENERATED_HEADERS) were previously used on
_all_ object files via rules.mak. That does not work when referencing
objects from another Makefile, so the modelling needs to be done
explicitly.
Andreas