From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [qemu-kvm tests PATCH v2] qemu-kvm tests: fix linker script problem Date: Wed, 05 May 2010 18:05:12 +0300 Message-ID: <4BE18928.7030109@redhat.com> References: <4BE1783C.6050202@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Naphtali Sprei Return-path: Received: from mx1.redhat.com ([209.132.183.28]:12407 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752689Ab0EEPFO (ORCPT ); Wed, 5 May 2010 11:05:14 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o45F5EAP018730 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 5 May 2010 11:05:14 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o45F5Dju018106 for ; Wed, 5 May 2010 11:05:13 -0400 In-Reply-To: <4BE1783C.6050202@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/05/2010 04:53 PM, Naphtali Sprei wrote: > commit 848bd0c89c83814023cf51c72effdbc7de0d18b7 causes the linker script > itself (flat.lds) to become part of the linked objects, which messed > the output file, specifically, the symbol edata is not the last symbol > anymore. > > > change v1 -> v2 > Instead of dropping the dependency, put it on a separate line/rule, so the > lds file will not be considered as one of the dependencies in the linking line/rule. > > > > FLATLIBS = test/lib/libcflat.a $(libgcc) > -%.flat: %.o $(FLATLIBS) flat.lds > +%.flat: flat.lds > +%.flat: %.o $(FLATLIBS) > $(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds $^ $(FLATLIBS) > I don't think that works - $^ selects all prerequisites, not just the ones in the line for the make rule. prereq-%: touch $@ dummy: prereq-1 dummy: prereq-2 echo $^ $ make dummy touch prereq-2 touch prereq-1 echo prereq-2 prereq-1 prereq-2 prereq-1 -- error compiling committee.c: too many arguments to function