public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/112669] GCN: wrong 'LIBRARY_PATH' in presence of several different '-march=[...]' flags
Date: Mon, 27 Nov 2023 14:54:58 +0000	[thread overview]
Message-ID: <bug-112669-4-COEN9H4fhu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112669-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Thomas Schwinge <tschwinge@gcc.gnu.org>:

https://gcc.gnu.org/g:297fe5c166f1d920da6d5ef9c7e02846b0148575

commit r14-5884-g297fe5c166f1d920da6d5ef9c7e02846b0148575
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Wed Nov 22 17:35:23 2023 +0100

    GCN: Tag '-march=[...]', '-mtune=[...]' as 'Negative' of themselves
[PR112669]

    Certain other command-line flags are mutually exclusive (random example:
GCN
    '-march=gfx906', '-march=gfx908').  If they're not appropriately marked up,
    this does disturb the multilib selection machinery, for example:

        $ build-gcc-offload-amdgcn-amdhsa/gcc/xgcc -print-multi-directory
-march=gfx906
        gfx906
        $ build-gcc-offload-amdgcn-amdhsa/gcc/xgcc -print-multi-directory
-march=gfx908
        gfx908
        $ build-gcc-offload-amdgcn-amdhsa/gcc/xgcc -print-multi-directory
-march=gfx906 -march=gfx908
        .

    In the last invocation, '-march=gfx900 -march=gfx906', for example, in
    'gcc/gcc.cc:set_multilib_dir' we see both flags -- which there doesn't
exist a
    matching multilib for, therefore we "fail" to the default ('.').  Tagges as
    'Negative', only the last flag survives, and we, for example, get the
expected:

        $ build-gcc-offload-amdgcn-amdhsa/gcc/xgcc -print-multi-directory
-march=gfx906 -march=gfx908
        gfx908

    I quickly found that the same also applies to GCN's '-mtune=[...]', but
I've
    not otherwise reviewed the GCN options.

            PR target/112669
            gcc/
            * config/gcn/gcn.opt (march=, mtune=): Tag as 'Negative' of
            themselves.

  parent reply	other threads:[~2023-11-27 14:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-22 10:57 [Bug target/112669] New: " tschwinge at gcc dot gnu.org
2023-11-22 11:29 ` [Bug target/112669] " tschwinge at gcc dot gnu.org
2023-11-22 16:18 ` tschwinge at gcc dot gnu.org
2023-11-27 14:54 ` cvs-commit at gcc dot gnu.org [this message]
2023-11-27 16:23 ` tschwinge 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-112669-4-COEN9H4fhu@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).