public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Matthias Klose <doko@ubuntu.com>
Cc: Marcus Shawcroft <marcus.shawcroft@gmail.com>,
	       Marcus Shawcroft <marcus.shawcroft@arm.com>,
	       Andrew Pinski <pinskia@gmail.com>,
	Paolo Bonzini <bonzini@gnu.org>,
	       Alexandre Oliva <aoliva@redhat.com>,
	       "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix -print-multi-os-directory for aarch64
Date: Thu, 14 Mar 2013 18:26:00 -0000	[thread overview]
Message-ID: <20130314182551.GG12913@tucnak.redhat.com> (raw)
In-Reply-To: <514211D0.8020407@ubuntu.com>

On Fri, Mar 15, 2013 at 02:07:12AM +0800, Matthias Klose wrote:
> sorry, didn't comment about this patch because it didn't seem to affect
> multiarch.  However this patch assumes that every system does have at least a
> */lib64 symlink, if it doesn't have a */lib64 directory.  I think that is a
> wrong assumption.  Things like

Why do you think the patch assumes it?  And why do you care for multiarch?
It just adjusts where the libraries are searched.

In a cross, I see (for non-multiarch):
grep '^  \$ \.\.' ../config.log; strace -v -s1024 ./xgcc -B ./ -print-file-name=libc.so 2>&1 | grep access.*libc.so
  $ ../configure --target aarch64-linux --enable-languages=c,c++
access("./aarch64-linux/4.8.0/libc.so", R_OK) = -1 ENOENT (No such file or directory)
access("./libc.so", R_OK)               = -1 ENOENT (No such file or directory)
access("/usr/src/gcc/objaa/gcc/../lib/gcc/aarch64-linux/4.8.0/libc.so", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/src/gcc/objaa/gcc/../lib/gcc/libc.so", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/src/gcc/objaa/gcc/../lib/gcc/aarch64-linux/4.8.0/../../../../aarch64-linux/lib/aarch64-linux/4.8.0/libc.so", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/src/gcc/objaa/gcc/../lib/gcc/aarch64-linux/4.8.0/../../../../aarch64-linux/lib/../lib64/libc.so", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/src/gcc/objaa/gcc/../lib/gcc/aarch64-linux/4.8.0/../../../../aarch64-linux/lib/libc.so", R_OK) = -1 ENOENT (No such file or directory)

for multiarch:
grep '^  \$ \.\.' ../config.log; strace -v -s1024 ./xgcc -B ./ -print-file-name=libc.so 2>&1 | grep access.*libc.so
  $ ../configure --target aarch64-linux --enable-languages=c,c++ --enable-multiarch
access("./aarch64-linux/4.8.0/libc.so", R_OK) = -1 ENOENT (No such file or directory)
access("./aarch64-linux-gnu/libc.so", R_OK) = -1 ENOENT (No such file or directory)
access("./libc.so", R_OK)               = -1 ENOENT (No such file or directory)
access("/usr/src/gcc/objaa2/gcc/../lib/gcc/aarch64-linux/4.8.0/libc.so", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/src/gcc/objaa2/gcc/../lib/gcc/aarch64-linux-gnu/libc.so", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/src/gcc/objaa2/gcc/../lib/gcc/libc.so", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/src/gcc/objaa2/gcc/../lib/gcc/aarch64-linux/4.8.0/../../../../aarch64-linux/lib/aarch64-linux/4.8.0/libc.so", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/src/gcc/objaa2/gcc/../lib/gcc/aarch64-linux/4.8.0/../../../../aarch64-linux/lib/aarch64-linux-gnu/libc.so", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/src/gcc/objaa2/gcc/../lib/gcc/aarch64-linux/4.8.0/../../../../aarch64-linux/lib/../lib64/libc.so", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/src/gcc/objaa2/gcc/../lib/gcc/aarch64-linux/4.8.0/../../../../aarch64-linux/lib/libc.so", R_OK) = -1 ENOENT (No such file or directory)

as you can see, if lib64 paths don't exist, it just goes on to look in */lib (like it does on x86_64 etc).
And, for multiarch, it looks first in multiarch directories.

Checking for lib64 directory or symlink is what I'd prefer to avoid.

	Jakub

  reply	other threads:[~2013-03-14 18:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-07 11:15 Jakub Jelinek
2013-03-07 16:29 ` Andrew Pinski
2013-03-07 16:45   ` Jakub Jelinek
2013-03-08  9:04     ` Marcus Shawcroft
2013-03-08  9:33       ` Jakub Jelinek
2013-03-14  8:37         ` Marcus Shawcroft
2013-03-14 18:07           ` Matthias Klose
2013-03-14 18:26             ` Jakub Jelinek [this message]
2013-03-13 16:12     ` Andrew Pinski

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=20130314182551.GG12913@tucnak.redhat.com \
    --to=jakub@redhat.com \
    --cc=aoliva@redhat.com \
    --cc=bonzini@gnu.org \
    --cc=doko@ubuntu.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=marcus.shawcroft@arm.com \
    --cc=marcus.shawcroft@gmail.com \
    --cc=pinskia@gmail.com \
    /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).