First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 20425
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Alan Modra <amodra@gmail.com>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Andreas Schwab <schwab@linux-m68k.org>
Add CC:
CC:
Remove selected CCs
Build:
Patch URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 20425 depends on: Show dependency tree
Show dependency graph
Bug 20425 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2005-12-07 12:42 Opened: 2005-03-11 12:49
-print-search-dirs ignores the current multi-os/multilib settings.  Thus "gcc 
-m64 -print-search-dirs" on powerpc-linux or "gcc -print-search-dirs" on 
x86-64-linux prints the wrong library directories.  libtool needs this 
information to find the libraries in the right directories.

------- Comment #1 From Andrew Pinski 2005-03-11 14:58 -------
Confirmed, I thought I saw this before.

------- Comment #2 From Andrew Pinski 2005-07-28 02:00 -------
*** Bug 23107 has been marked as a duplicate of this bug. ***

------- Comment #3 From olh@suse.de 2005-11-07 16:17 -------
ping

------- Comment #4 From Peter Bergner 2005-11-08 16:04 -------
Shouldn't libtool being using -print-multi-os-directory rather than
-print-search-dirs?

http://www.redhat.com/archives/fedora-devel-list/2004-January/msg01027.html

------- Comment #5 From Andreas Schwab 2005-11-08 16:16 -------
How do you find out where to splice the multi-os directory into the libraray
path?

------- Comment #6 From Alan Modra 2005-12-07 12:42 -------
I'm willing to write a patch for this as I'm inclined to think that changing
gcc --print-search-dirs is the best way to make gcc/libtool work together.  A
typical linux distribution contains many packages with differing versions of
libtool.  Updating them all is likely to be considerably more work than
applying a gcc patch to fix the distro compiler.

------- Comment #7 From David Edelsohn 2005-12-07 13:19 -------
Changing the behavior of GCC -print-search-dirs is a bad idea and will break
other applications relying on the current behavior.  Introducing a major
incompatibility into GCC is not a solution and I strongly oppose the proposal.

There is an appropriate option (-print-multi-os-directory), which libtool is
planning to use in a future release.  GCC should not be working around a
libtool problem.  A Linux distro can make changes to a local copy, but this
change should not be applied to FSF GCC.

------- Comment #8 From Alan Modra 2005-12-07 13:49 -------
There is no appropriate gcc option.  Some paths printed by -print-search-dirs
need the suffix printed by -print-multi-os-directory, others need the suffix
printed by -print-multi-directory.  How is libtool supposed to know which path
is which?

------- Comment #9 From Alexandre Oliva 2005-12-11 20:54 -------
IMHO it's better to add a new option with the desired meaning than modifying
the behavior of the current option.  -print-multi-search-dirs maybe?

------- Comment #10 From Alan Modra 2005-12-16 09:46 -------
Subject: Bug 20425

Author: amodra
Date: Fri Dec 16 09:46:22 2005
New Revision: 108635

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108635
Log:
        PR driver/20425
        * gcc.c (for_each_path): New function.
        (add_to_obstack, file_at_path): New functions.
        (struct file_at_path_info, struct add_to_obstack_info): New.
        (build_search_list): Rewrite using for_each_path.  Constify struct
        path_prefix pointer.  Add do_multi param.  Adjust all callers.
        (find_a_file): Similarly, but just change existing param to bool.
        (putenv_from_prefixes): Add do_multi param, make "paths" const.
        (do_spec_path): Delete.
        (struct spec_path_info): New.
        (spec_path): New function.
        (do_spec_1): Use for_each_path for %D and %I.
        (find_file): Adjust for find_a_file changes.
        (main): Search multilibs for specs.  Print multilib lib path for
        -print-search-dirs.  Likewise add multilibs to LIBRARY_PATH_ENV.
        (read_specs): Search multilibs for %include and %include_noerr.
        (is_directory): Remove second string param.  Change last param
        to a bool.  Don't use concat.  Remove SMALL_ARG_MAX test, always
        check path is a dir.  Update all callers.
        * doc/hostconfig.texi (SMALL_ARG_MAX): Remove mention.
        * system.h (SMALL_ARG_MAX): Poison.
        * config.gcc: Don't define SMALL_ARG_MAX.
        * config.host: Likewise.
        * config.build: Likewise.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config.build
    trunk/gcc/config.gcc
    trunk/gcc/config.host
    trunk/gcc/doc/hostconfig.texi
    trunk/gcc/gcc.c
    trunk/gcc/system.h

------- Comment #11 From Alan Modra 2005-12-16 09:49 -------
Fixed mainline.

First Last Prev Next    No search results available      Search page      Enter new bug