From patchwork Sat Jan 2 08:42:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 10193 X-Patchwork-Delegate: vapier@gentoo.org Received: (qmail 106469 invoked by alias); 2 Jan 2016 08:42:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 106455 invoked by uid 89); 2 Jan 2016 08:42:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=SIM, x X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 02 Jan 2016 08:42:37 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 7C3113405BB for ; Sat, 2 Jan 2016 08:42:35 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] gdb: sim: disable integration w/some multitarget configs [PR sim/13418] Date: Sat, 2 Jan 2016 03:42:33 -0500 Message-Id: <1451724153-23316-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes Multitarget builds currently fail when: (1) simulator support is enabled (2) powerpc is included in the target list (3) powerpc is not the main/default target This is because the powerpc sim provides a non-standard API function sim_spr_register_name which the powerpc gdb utilizes. Since the sim does not yet support multitarget, only the sim for the main target (if one exists) is built. When that target isn't powerpc, this func is not available leading to linking errors. Since multitarget support is going to take a while, and specifically the powerpc target is going to take even longer, disable sim support automatically when the aforementioned conditions are met. 2016-01-02 Mike Frysinger PR sim/13418 * configure.ac: Set gdb_sim= when target is not powerpc*, and all_targets is true or rs6000-tdep.o is in TARGET_OBS. * configure: Regenerate. --- gdb/configure | 14 ++++++++++++++ gdb/configure.ac | 13 +++++++++++++ 2 files changed, 27 insertions(+) diff --git a/gdb/configure b/gdb/configure index 5afdbbc..57c1ea7 100755 --- a/gdb/configure +++ b/gdb/configure @@ -15840,6 +15840,20 @@ fi SIM= SIM_OBS= if test "${ignore_sim}" = "false"; then + # The ppc gdb/sim only works when it's the main target. PR sim/13418 + case $target in + powerpc*-*-*) ;; + *) + case "${all_targets}: ${TARGET_OBS} " in + true:*|*" rs6000-tdep.o "*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling sim integration for multitarget powerpc configs" >&5 +$as_echo "$as_me: WARNING: Disabling sim integration for multitarget powerpc configs" >&2;} + gdb_sim= + ;; + esac + ;; + esac + if test x"${gdb_sim}" != x ; then SIM="${gdb_sim}" SIM_OBS="remote-sim.o" diff --git a/gdb/configure.ac b/gdb/configure.ac index 5b618c9..458605f 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -2256,6 +2256,19 @@ fi SIM= SIM_OBS= if test "${ignore_sim}" = "false"; then + # The ppc gdb/sim only works when it's the main target. PR sim/13418 + case $target in + powerpc*-*-*) ;; + *) + case "${all_targets}: ${TARGET_OBS} " in + true:*|*" rs6000-tdep.o "*) + AC_MSG_WARN([Disabling sim integration for multitarget powerpc configs]) + gdb_sim= + ;; + esac + ;; + esac + if test x"${gdb_sim}" != x ; then SIM="${gdb_sim}" SIM_OBS="remote-sim.o"