From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJwYl-0004TX-5Y for qemu-devel@nongnu.org; Wed, 11 Sep 2013 22:23:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJwYd-000302-VJ for qemu-devel@nongnu.org; Wed, 11 Sep 2013 22:23:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJwYd-0002zo-Kd for qemu-devel@nongnu.org; Wed, 11 Sep 2013 22:22:59 -0400 Date: Thu, 12 Sep 2013 10:22:53 +0800 From: Fam Zheng Message-ID: <20130912022253.GF9134@T430s.nay.redhat.com> References: <1378906448-15834-1-git-send-email-famz@redhat.com> <1378906448-15834-2-git-send-email-famz@redhat.com> <20130911145904.GB2293@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130911145904.GB2293@redhat.com> Subject: Re: [Qemu-devel] [PATCH v6 1/8] make.rule: fix $(obj) to a real relative path Reply-To: famz@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: peter.maydell@linaro.org, mjt@tls.msk.ru, qemu-devel@nongnu.org, stefanha@redhat.com, pbonzini@redhat.com, vilanova@ac.upc.edu, rth@twiddle.net On Wed, 09/11 15:59, Daniel P. Berrange wrote: > On Wed, Sep 11, 2013 at 09:34:01PM +0800, Fam Zheng wrote: > > Makefile.target includes rule.mak and unnested common-obj-y, then prefix > > them with '../', this will ignore object specific QEMU_CFLAGS in subdir > > Makefile.objs: > > > > $(obj)/curl.o: QEMU_CFLAGS += $(CURL_CFLAGS) > > > > Because $(obj) here is './block', instead of '../block'. This doesn't > > hurt compiling because we basically build all .o from top Makefile, > > before entering Makefile.target, but it will affact arriving per-object > > libs support. > > > > The starting point of $(obj) is passed in as argument of unnest-vars, as > > well as nested variables, so that different Makefiles can pass in a > > right value. > > > > Signed-off-by: Fam Zheng > > --- > > Makefile | 16 +++++++++++++++- > > Makefile.objs | 16 +--------------- > > Makefile.target | 17 +++++++++++++---- > > configure | 1 + > > rules.mak | 16 +++++++++++----- > > 5 files changed, 41 insertions(+), 25 deletions(-) > > This change appears to break the build of libcacard.so when I tried > the following sequence with current git master > > $ git clean -f -x -d > $ ./configure --prefix=$HOME/usr/qemu-git --target-list=x86_64-softmmu > $ make -j 20 > .... > lt LINK vscclient > ./.libs/libcacard.so: undefined reference to `monitor_fdset_get_fd' > ./.libs/libcacard.so: undefined reference to `monitor_fdset_dup_fd_add' > ./.libs/libcacard.so: undefined reference to `monitor_fdset_dup_fd_remove' > ./.libs/libcacard.so: undefined reference to `monitor_fdset_dup_fd_find' > collect2: error: ld returned 1 exit status > > I'm also seeing make report circular deps > > make: Circular stubs/ <- stubs/ dependency dropped. > make: Circular trace/ <- stubs/ dependency dropped. > make: Circular trace/ <- trace/ dependency dropped. > > I fixed it, the order of including libcacard/Makefile and unnest-vars in top Makefile is reversed. A Good catch, thanks. Thanks.