public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "iains at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug modula2/108182] gm2 driver mishandles target and multilib options
Date: Mon, 09 Jan 2023 20:35:24 +0000	[thread overview]
Message-ID: <bug-108182-4-dAwJ204MJI@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108182-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108182

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #54184|0                           |1
        is obsolete|                            |
  Attachment #54208|0                           |1
        is obsolete|                            |
  Attachment #54214|0                           |1
        is obsolete|                            |

--- Comment #11 from Iain Sandoe <iains at gcc dot gnu.org> ---
Created attachment 54220
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54220&action=edit
patch version 3.1


This is patch v3 + some specific changes. [hence it is 3.1 :) ]

The main issues with v3 (and v4 on PR108261) are:

 - link items are positional (you need to ensure that the runtime libraries
appear after the user's objects).
 - adding {f*} to the cc1gm2 line causes f options to be duplicated, this could
(potentially alter the behaviour of the command line when final values of
opposite switches are used - which is the 'usual' mechanism).
 - V3 was still adding the '-L' options for the various libraries which are not
needed (v4 fixes this, but not the other issues)

 - Supporting the target's ability to handle -Bstatic/dynamic in specs is going
to be hard.

---- so ... 


1. we use the specs now to insert the include paths; this works very nicely.

2. we use the existing sequencing the language-driver to ensure that the link
positional arguments are in the right places (and to handle the Bstatic/dynamic
stuff)

3. We remove the {f*} from the cc1gm2 spec [note it is possible that other
similar  entries will cause duplication of their content .. I did not check
this yet]

This means that we can drop the linker-related extra specs and code (and
actually simplify things a bit in the lang-specific driver).

4. We skip options that we will re-insert to avoid duplication there too.

-----

NOTE: with specs, it is usually necessary to ensure that they being and/or end
with whitespace because they can be arbitrarily concatenated.

-----

This does not fix PR108261 (neither does v4, FWIW) on Darwin.

  parent reply	other threads:[~2023-01-09 20:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19 23:36 [Bug modula2/108182] New: " iains at gcc dot gnu.org
2022-12-19 23:36 ` [Bug modula2/108182] " iains at gcc dot gnu.org
2022-12-19 23:45 ` pinskia at gcc dot gnu.org
2023-01-02 12:38 ` iains at gcc dot gnu.org
2023-01-03 21:20 ` gaius at gcc dot gnu.org
2023-01-04  1:55 ` gaius at gcc dot gnu.org
2023-01-05 17:09 ` iains at gcc dot gnu.org
2023-01-06 14:39 ` iains at gcc dot gnu.org
2023-01-06 21:16 ` gaius at gcc dot gnu.org
2023-01-06 21:23 ` gaius at gcc dot gnu.org
2023-01-09  1:28 ` gaius at gcc dot gnu.org
2023-01-09 15:08 ` gaius at gcc dot gnu.org
2023-01-09 20:35 ` iains at gcc dot gnu.org [this message]
2023-01-10 11:39 ` iains at gcc dot gnu.org
2023-01-11 16:16 ` iains at gcc dot gnu.org
2023-01-12 23:49 ` iains at gcc dot gnu.org
2023-01-13  0:15 ` iains at gcc dot gnu.org
2023-01-17 16:59 ` iains at gcc dot gnu.org
2023-01-23 17:29 ` cvs-commit at gcc dot gnu.org
2023-01-23 17:34 ` iains at gcc dot gnu.org
2023-01-25 15:24 ` cvs-commit at gcc dot gnu.org
2023-01-25 15:46 ` iains at gcc dot gnu.org
2023-01-27  8:48 ` cvs-commit at gcc dot gnu.org

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=bug-108182-4-dAwJ204MJI@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).