public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix inaccuracies in VxWorks LINK_SPEC
@ 2021-12-10 14:00 Olivier Hainque
  0 siblings, 0 replies; only message in thread
From: Olivier Hainque @ 2021-12-10 14:00 UTC (permalink / raw)
  To: gcc-patches; +Cc: Olivier Hainque, Douglas Rupp, Rasmus Villemoes

[-- 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-10 14:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-10 14:00 [PATCH] Fix inaccuracies in VxWorks LINK_SPEC Olivier Hainque

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).