From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by sourceware.org (Postfix) with ESMTPS id 3005E3858D20 for ; Fri, 11 Aug 2023 06:43:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3005E3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2b9e6cc93c6so25118501fa.2 for ; Thu, 10 Aug 2023 23:43:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691736211; x=1692341011; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8efNmGYGh/wTgO4ZNm6ZDWuyeU/vpqfk4Z4Pv+uBEwo=; b=AcuPauOx+S63tigZcyF6i7EuLEoczYRVWp0ja9iyKnFvrKkcZsRIuGTfTXK5U7lmFN 3i3gpMPemkj9BNcgky/A5qcpvOLkEwI++u0gFUHCknVG90bdBFs9BUeUDxI/ZA5m3/z9 jYV6CwHcgB17eIZM1JIy1wL2z85h6A0iZWUIeftQ7ho/Ny6126sQ987Cv/RYm/nrRHvU kV632WHDf37EFzUumSAL9u8TWeYgxwNGqJRp8elAIiZlh8i3GbCz35bJ59I+BAbGIo8D koQlfjhEQuL9xL2QJapsXCXxblpiQ/Znk5agqg76FO77A27cLbpzIg/XhyrCKVaROck8 OcCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691736211; x=1692341011; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8efNmGYGh/wTgO4ZNm6ZDWuyeU/vpqfk4Z4Pv+uBEwo=; b=F6zAksuaLVYX2VylB/wEpPFv1nBr3IgAlvjJ0wBQcs1FxgIhajZ9j/TEmr5itlLtLK DWURM9925SKOnRwOeEf50crNt+BrHihoIE0GbuMe40AWSMkC2A+24fuWAJhD073FLvmM 2eAehQgvHT3CweaYr38Tf0JEpVn78j8946ustAhg5sYUNwxLFF4b9tYM3JEntPX2a002 58EuK7HgzgmyT9O9yh/7Po1qszCDkw1qTG0w4Pf6BHzBdNB29s5nZgIIXXgMGrU7wQlD 09LmvFu+mSYBoUuVq9EggQMlN9WziMvHeXf4eGA65iZE0vyLEEgXZppYkM4HdO+ppGqT fTNw== X-Gm-Message-State: AOJu0YzW8glZF40MT9QfCPdxLCDsWZ8hF9lsv88mCskbDZl1N8oZRPrm nJta7pDcrWv5ezrOcf3ci7XNnnxIbxtlxhSb3i6UUU6A X-Google-Smtp-Source: AGHT+IHX5B5Nn+9LQVUv/kv6WFHjZsilX+cqRpHy3F8i4JOxCferuRHcEDcFx4xlWP+xQovMOO1perkrIkT9v/pD85M= X-Received: by 2002:a2e:9002:0:b0:2b5:81bc:43a8 with SMTP id h2-20020a2e9002000000b002b581bc43a8mr850830ljg.0.1691736211086; Thu, 10 Aug 2023 23:43:31 -0700 (PDT) MIME-Version: 1.0 References: <5f53789-e0f5-7c5a-a0b1-b098a076d572@codesourcery.com> In-Reply-To: <5f53789-e0f5-7c5a-a0b1-b098a076d572@codesourcery.com> From: Richard Biener Date: Fri, 11 Aug 2023 08:43:19 +0200 Message-ID: Subject: Re: [PATCH] config: Fix host -rdynamic detection for build != host != target To: Joseph Myers Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Aug 10, 2023 at 11:31=E2=80=AFPM Joseph Myers wrote: > > The GCC_ENABLE_PLUGINS configure logic for detecting whether -rdynamic > is necessary and supported uses an appropriate objdump for $host > binaries (running on $build) in cases where $host is $build or > $target. > > However, it is missing such logic in the case where $host is neither > $build nor $target, resulting in the compilers not being linked with > -rdynamic and plugins not being usable with such a compiler. In fact > $ac_cv_prog_OBJDUMP, as used when $build =3D $host, is always an objdump > for $host binaries that runs on $build; that is, it's appropriate to > use in this case as well. > > Tested in such a configuration that it does result in cc1 being linked > with -rdynamic as expected. Also bootstrapped with no regressions for > x86_64-pc-linux-gnu. OK. > config/ > * gcc-plugin.m4 (GCC_ENABLE_PLUGINS): Use > export_sym_check=3D"$ac_cv_prog_OBJDUMP -T" also when host is not > build or target. > > gcc/ > * configure: Regenerate. > > libcc1/ > * configure: Regenerate. > > diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 > index c731a6fab38..c30cfdd8fad 100644 > --- a/config/gcc-plugin.m4 > +++ b/config/gcc-plugin.m4 > @@ -49,7 +49,7 @@ AC_DEFUN([GCC_ENABLE_PLUGINS], > elif test x$host =3D x$target; then > export_sym_check=3D"$gcc_cv_objdump -T" > else > - export_sym_check=3D > + export_sym_check=3D"$ac_cv_prog_OBJDUMP -T" > fi > ;; > esac > diff --git a/gcc/configure b/gcc/configure > index ea1ad6606a6..db5812d4a63 100755 > --- a/gcc/configure > +++ b/gcc/configure > @@ -31975,7 +31975,7 @@ fi > elif test x$host =3D x$target; then > export_sym_check=3D"$gcc_cv_objdump -T" > else > - export_sym_check=3D > + export_sym_check=3D"$ac_cv_prog_OBJDUMP -T" > fi > ;; > esac > diff --git a/libcc1/configure b/libcc1/configure > index 1a63a0e4e1a..2a914a0bfc8 100755 > --- a/libcc1/configure > +++ b/libcc1/configure > @@ -15120,7 +15120,7 @@ fi > elif test x$host =3D x$target; then > export_sym_check=3D"$gcc_cv_objdump -T" > else > - export_sym_check=3D > + export_sym_check=3D"$ac_cv_prog_OBJDUMP -T" > fi > ;; > esac > > -- > Joseph S. Myers > joseph@codesourcery.com