From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7331 invoked by alias); 30 Dec 2010 00:29:10 -0000 Received: (qmail 7322 invoked by uid 22791); 30 Dec 2010 00:29:09 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Dec 2010 00:29:04 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id B40A41B4009; Thu, 30 Dec 2010 00:29:01 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Cc: toolchain-devel@blackfin.uclinux.org Subject: [PATCH] sim: fix handling of 2nd arg to SIM_AC_OPTION_HARDWARE Date: Thu, 30 Dec 2010 03:19:00 -0000 Message-Id: <1293668913-9172-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-12/txt/msg00554.txt.bz2 The 2nd arg to SIM_AC_OPTION_HARDWARE is described as "a space separated list of devices that override the defaults" while the 3rd arg is "a space separated list of extra target specific devices". But the macro doesn't seem to treat the 2nd arg this way. Instead, it will always add the default list of devices, and only add the extra target specific devices if the 2nd arg is not specified. So rework the logic slightly to handle the 2nd arg as documented. This shouldn't affect any targets in the tree as no one passes in a non- empty value as the 2nd arg. Signed-off-by: Mike Frysinger 2010-12-29 Mike Frysinger * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Set $hardware to $2 when $2 is not empty, and always append $3 to $hardware. --- sim/common/aclocal.m4 | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sim/common/aclocal.m4 b/sim/common/aclocal.m4 index 9a6a4c8..bda20ce 100644 --- a/sim/common/aclocal.m4 +++ b/sim/common/aclocal.m4 @@ -571,10 +571,11 @@ else sim_hw_p=no fi if test "[$2]"; then - hardware="core pal glue" + hardware="[$2]" else - hardware="core pal glue [$3]" + hardware="core pal glue" fi +hardware="$hardware [$3]" sim_hw_cflags="-DWITH_HW=1" sim_hw="$hardware" sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([[^ ]][[^ ]]*\)/dv-\1.o/g'`" -- 1.7.3.1