public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Olivier Hainque <hainque@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Olivier Hainque <hainque@adacore.com>,
	Douglas Rupp <rupp@adacore.com>,
	Rasmus Villemoes <rv@rasmusvillemoes.dk>
Subject: [PATCH] Fix inaccuracies in VxWorks LINK_SPEC
Date: Fri, 10 Dec 2021 15:00:51 +0100	[thread overview]
Message-ID: <2C87D7EC-E4D4-4559-B34B-4171E45E5A1D@adacore.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 767 bytes --]

Hello,

The attached patch fixes a couple of incorrect things in
the VxWorks default LINK_SPEC, exposed during our work on
the support for building shared libraries.

-v needs to generate a -V not -v, as most/all other ports do,
to output the available emulations.

The latter causes collect2 to output exec'd collect-ld with same
switches, which in turn causes a configure test which accumulates
linker switches to contain duplicates, leading to a libstdc++ configure
failure in some configurations.

The change also removes reference to %(link_target), long obsolete.

Tested with builds and test runs on VxWorks 6.9 and 7.2.

Olivier


2021-12-07  Doug Rupp  <rupp@adacore.com>

	* config/vxworks.h (LINK_SPEC): Remove %(link_target).
	Change %{v:-v} to %{v:-V}.


[-- Attachment #2: 0001-Fix-inaccuracies-in-VxWorks-LINK_SPEC.patch --]
[-- Type: application/octet-stream, Size: 1415 bytes --]

From 774a2b0c67c5ca16607ee80e992b1097b446dd74 Mon Sep 17 00:00:00 2001
From: Douglas B Rupp <rupp@adacore.com>
Date: Thu, 8 Apr 2021 10:41:11 -0700
Subject: [PATCH] Fix inaccuracies in VxWorks LINK_SPEC

-v needs to generate a -V not -v, as most/all other ports do.

The latter causes collect2 to output exec'd collect-ld with same
switches, which in turn causes a configure test which accumulates
linker switches to contain duplicates, leading to a libstdc++ configure
failure in some configurations.

-V is typically used in such contexts to output the available
emulations.

The change also removes reference to %(link_target), long obsolete.

2021-12-07  Doug Rupp  <rupp@adacore.com>

	* config/vxworks.h (LINK_SPEC): Remove %(link_target).
	Change %{v:-v} to %{v:-V}.
---
 gcc/config/vxworks.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h
index bddf2c37f42..8210de467dd 100644
--- a/gcc/config/vxworks.h
+++ b/gcc/config/vxworks.h
@@ -141,8 +141,8 @@ along with GCC; see the file COPYING3.  If not see
  %{!shared:						\
    %{mrtp:-q %{h*}					\
           %{R*} %{!T*: %(link_start) }			\
-          %(link_target) %(link_os)}}			\
- %{v:-v}						\
+          %(link_os)}}					\
+ %{v:-V}						\
  %{shared:-shared}					\
  %{Bstatic:-Bstatic}					\
  %{Bdynamic:-Bdynamic}					\
-- 
2.25.1


                 reply	other threads:[~2021-12-10 14:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2C87D7EC-E4D4-4559-B34B-4171E45E5A1D@adacore.com \
    --to=hainque@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rupp@adacore.com \
    --cc=rv@rasmusvillemoes.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).