From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SMC4L5QATmGJQAAAWB0awg (envelope-from ) for ; Fri, 24 Sep 2021 12:45:08 -0400 Received: by simark.ca (Postfix, from userid 112) id C11DB1EE25; Fri, 24 Sep 2021 12:45:08 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 323811EDF0 for ; Fri, 24 Sep 2021 12:45:07 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE2373858403 for ; Fri, 24 Sep 2021 16:45:06 +0000 (GMT) Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 8E99A385843F for ; Fri, 24 Sep 2021 16:44:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8E99A385843F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wr1-x42c.google.com with SMTP id w29so29209039wra.8 for ; Fri, 24 Sep 2021 09:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=I16Y3FdVvrug/3GXSzFi+yO7bZVY9TQH+oGLyB4dAMA=; b=fBeqllvP5R7bI5N4uvubRVUBkWcm4X7rCubFkxiklBTbsScfBSuwH2sCz9x7BogBrr j7nx0TyKchFqGTLvJ9dImtNZ/8tU1oNEs5Vu/8HF7lK0dbvXrZK+eduEOUjbm9wciV5b tc7WSsYjMt7d5RUxlCfvbOyfaNhDzeb5J/DTJQVzsSwzh5UPG7PRVQktCWt/MV4PFiWr Clzde+LSeaSnQuEOWTe7Gow84Tavk2CFplVABwrj7+pHccbNwyr5C+d3IhNBDJV4KHxo kldsLnFjLKb04BKmWWP4mqbybfCIw+eC9OSK3QqudoSOAkK7VO3liFUAiv9VgE170kXA UMpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=I16Y3FdVvrug/3GXSzFi+yO7bZVY9TQH+oGLyB4dAMA=; b=t8+l+5un327R3HVAK+9mZEABe7+iVqvYtwiq50K7OGd/TsZ5ney7OTmVuiJ/jowf55 oCvz/rpOtry2OeGRu9bPHWTlIHZbpVouoWS535vo00gog3+xMeI/orDFDh/1aJx1OQXs YuEvs+ayPcnPSzkkoV7BLXt6m48Hi8HBFDZdfqSqnwYKfXaLgCMl5FFfrBq/JBZkTfkR zsTBeYPJayqH4mIIAlspwVFwbjPZQNTSMPdepWNjSLPk84MNw5888qrU6hibUdY/8hRx CQomVrRALN+qW9NIVsFoDgo5KUCYwC0Xf/Xq5aUowpHQ27y/rTsxbJiSmjG1o9heXalO O0Aw== X-Gm-Message-State: AOAM533uFCJiBo7pUAjaWY9favgWGbfeli9WMHMTdlibPmr2fm/pcBBA mRcJ0LiK/a3oI5FqTCxuDlQ+L3Ow59ZMWw== X-Google-Smtp-Source: ABdhPJxcqCdf6UYuLPVxLcNtZcQ9sj2KfG/FzImhkNkGrOYjZpWM2MX3Fg/u4sYpWDEJey1XseZuLg== X-Received: by 2002:adf:b7c1:: with SMTP id t1mr12278098wre.387.1632501877455; Fri, 24 Sep 2021 09:44:37 -0700 (PDT) Received: from localhost (92.40.178.171.threembb.co.uk. [92.40.178.171]) by smtp.gmail.com with ESMTPSA id k26sm3027987wms.39.2021.09.24.09.44.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 09:44:36 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Subject: [PATCH] gdbsupport: remove attempt to define TARGET_WORD_SIZE Date: Fri, 24 Sep 2021 17:44:13 +0100 Message-Id: <20210924164413.3770845-1-andrew.burgess@embecosm.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" In the gdbsupport configure.ac file, there is an attempt to define TARGET_WORD_SIZE. This is done by running grep on the file ../bfd/bfd-in3.h. The problem with this is, the file bfd-in3.h is generated into the bfd build directory when bfd is configured, and there is no dependency between the gdbsupport module and the bfd module, so, for example, if I do: $ ../src/configure $ make all-gdbsupport Then bfd will neither be configured, or built. In this case TARGET_WORD_SIZE ends up being defined, but with no value because the grep on bfd-in3.h fails. However, it turns out that this doesn't matter; we don't actually use TARGET_WORD_SIZE anywhere. My proposal in this commit is to just remove the definition of TARGET_WORD_SIZE, the alternative would be to add a dependency between configure-gdbsupport and configure-bfd into Makefile.def, but adding a dependency for something we don't need seems pretty pointless. --- gdbsupport/config.in | 3 --- gdbsupport/configure | 7 ------- gdbsupport/configure.ac | 4 ---- 3 files changed, 14 deletions(-) diff --git a/gdbsupport/config.in b/gdbsupport/config.in index f46e2612c74..e4e6fc062cc 100644 --- a/gdbsupport/config.in +++ b/gdbsupport/config.in @@ -354,9 +354,6 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Define to the word size for the target. */ -#undef TARGET_WORD_SIZE - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE diff --git a/gdbsupport/configure b/gdbsupport/configure index a9dd02c5b72..08800228aa5 100755 --- a/gdbsupport/configure +++ b/gdbsupport/configure @@ -10286,13 +10286,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -TARGET_WORD_SIZE=`sed -n 's,#define BFD_ARCH_SIZE \(.*\)$,\1,p' ../bfd/bfd-in3.h` - -cat >>confdefs.h <<_ACEOF -#define TARGET_WORD_SIZE $TARGET_WORD_SIZE -_ACEOF - - case ${host} in *mingw32*) diff --git a/gdbsupport/configure.ac b/gdbsupport/configure.ac index a8fcfe24c32..f10a856fe24 100644 --- a/gdbsupport/configure.ac +++ b/gdbsupport/configure.ac @@ -59,10 +59,6 @@ GDB_AC_PTRACE # Detect support warning flags. AM_GDB_WARNINGS -TARGET_WORD_SIZE=`sed -n 's,#define BFD_ARCH_SIZE \(.*\)$,\1,p' ../bfd/bfd-in3.h` -AC_DEFINE_UNQUOTED(TARGET_WORD_SIZE, $TARGET_WORD_SIZE, - [Define to the word size for the target.]) - case ${host} in *mingw32*) AC_DEFINE(USE_WIN32API, 1, -- 2.25.4