public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-5609] For Modula-2 build-tree testing, also set up paths to compiler libraries
Date: Tue, 31 Jan 2023 22:28:45 +0000 (GMT)	[thread overview]
Message-ID: <20230131222845.97CF03858D33@sourceware.org> (raw)

https://gcc.gnu.org/g:94cacee20d817d0b937701b6759bb67dba3ee3f9

commit r13-5609-g94cacee20d817d0b937701b6759bb67dba3ee3f9
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Tue Jan 31 11:38:15 2023 +0100

    For Modula-2 build-tree testing, also set up paths to compiler libraries
    
    Currently, 'gcc/testsuite/lib/gm2.exp:gm2_link_flags' doesn't set up
    paths to compiler libraries (such as libgcc, which libstdc++
    may depend on).  For example, I see my x86_64-pc-linux-gnu '-m32' testing
    not pick up the build-tree libgcc, but instead some random system one,
    which (expectedly) doesn't satisfy requirements of other build-tree
    libraries:
    
        [...]/build-gcc/gcc/testsuite/gm225/m.x0: /lib/i386-linux-gnu/libgcc_s.so.1: version `GCC_7.0.0' not found (required by [...]/build-gcc/x86_64-pc-linux-gnu/32/libstdc++-v3/src/.libs/libstdc++.so.6)
    
    ..., and thus a lot of execution FAILs.
    
    As seen in a number of other '[...]_link_flags' procedures, the standard idiom
    seems to be to also consider 'gcc-set-multilib-library-path' for
    'ld_library_path'.
    
            gcc/testsuite/
            * lib/gm2.exp (gm2_link_flags) [$gccpath != ""]: Also consider
            'gcc-set-multilib-library-path' for 'ld_library_path'.

Diff:
---
 gcc/testsuite/lib/gm2.exp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/testsuite/lib/gm2.exp b/gcc/testsuite/lib/gm2.exp
index 7f41e19c89e..da08a565fc5 100644
--- a/gcc/testsuite/lib/gm2.exp
+++ b/gcc/testsuite/lib/gm2.exp
@@ -316,6 +316,9 @@ proc gm2_link_flags { paths } {
 	    }
 	    send_log "ld_library_path is ${ld_library_path}\n"
 	}
+
+	global GCC_UNDER_TEST
+	append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
     }
 
     set_ld_library_path_env_vars

                 reply	other threads:[~2023-01-31 22:28 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=20230131222845.97CF03858D33@sourceware.org \
    --to=tschwinge@gcc.gnu.org \
    --cc=gcc-cvs@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).