From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTxko-0000ul-48 for qemu-devel@nongnu.org; Thu, 23 Jul 2009 08:50:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTxkh-0000uZ-O2 for qemu-devel@nongnu.org; Thu, 23 Jul 2009 08:50:32 -0400 Received: from [199.232.76.173] (port=48486 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTxkh-0000uW-LQ for qemu-devel@nongnu.org; Thu, 23 Jul 2009 08:50:27 -0400 Received: from gecko.sbs.de ([194.138.37.40]:18211) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MTxkh-00069O-42 for qemu-devel@nongnu.org; Thu, 23 Jul 2009 08:50:27 -0400 Message-ID: <4A6878AC.1080305@siemens.com> Date: Thu, 23 Jul 2009 16:50:20 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1248349241-26029-1-git-send-email-froydnj@codesourcery.com> <4A68700B.5090609@siemens.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] configure: fix breakage of --extra-{cflags, ldflags} List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org, Nathan Froyd Juan Quintela wrote: > Jan Kiszka wrote: >> Nathan Froyd wrote: >>> Commit e3fc14c3a1a77a1cda669a3e16f1f6b82577e4ec broke the use of >>> --extra-{cflags,ldflags} in the case where those flags were necessary >>> for bits of configure to succeed. For instance, if you did: >>> >>> configure [...] --extra-cflags=-I/path/to/zlib/headers \ >>> --extra-ldflags=-L/path/to/zlib/libraries >>> >>> prior to the above commit, the paths would go into CFLAGS and LDFLAGS >>> for use by the rest of the configure tests. After the above commit, >>> that's no longer true, because the EXTRA_{CFLAGS,LDFLAGS} variables are >>> only used for creating makefiles. >> Yep, that's true... >> >>> Fixed by making sure that EXTRA_{CFLAGS,LDFLAGS} find their way into >>> {CFLAGS,LDFLAGS}, respectively. >>> >>> Signed-off-by: Nathan Froyd >>> --- >>> configure | 4 ++-- >>> 1 files changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/configure b/configure >>> index 0db885b..dd2b1d9 100755 >>> --- a/configure >>> +++ b/configure >>> @@ -520,8 +520,8 @@ CFLAGS="$CFLAGS -g -fno-strict-aliasing" >>> if test "$debug" = "no" ; then >>> CFLAGS="$CFLAGS -O2" >>> fi >>> -CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls" >>> -LDFLAGS="$LDFLAGS -g" >>> +CFLAGS="$CFLAGS $EXTRA_CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls" >>> +LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS -g" >> ...but now we add the extra flags twice. So please remove the injection >> into the flags for $config_mak. > > It is still broken. Thinking of a solution. Good that someone is more awake than /me. :) > People wanted EXTRA_CFLAGS to be added at the end of CFLAGS, not in the > middle. Trying to find a way that is consistent for everything. > > Could you told in what test do you need extra_cflags? I think the only consistent solution (besides stopping to re-invent autotools) is explicitly appending EXTRA_CFLAGS to all tests. Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux