public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/22110] New: Wrong ld search paths passed to libtool for 64-bit compiles
@ 2005-06-18  4:52 lucier at math dot purdue dot edu
  2005-06-18  4:53 ` [Bug target/22110] " lucier at math dot purdue dot edu
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: lucier at math dot purdue dot edu @ 2005-06-18  4:52 UTC (permalink / raw)
  To: gcc-bugs

It seems that the libtool command line may be wrong.  Here's a simple test.

[descartes:~/programs] lucier% cat conftest.c
int main2() { return 0;}
[descartes:~/programs] lucier% gcc -m64 -mcpu=970 -o conftest -dynamiclib
conftest.c -v -save-temps
Using built-in specs.
Target: powerpc-apple-darwin8.1.0
Configured with: ../configure --prefix=/pkgs/gcc-4.0-mainline
--with-gmp=/pkgs/gmp-4.1.3 --with-mpfr=/pkgs/gmp-4.1.3
--enable-languages=c,c++,objc,obj-c++,f95
Thread model: posix
gcc version 4.1.0 20050615 (experimental)
 /pkgs/gcc-4.0-mainline/libexec/gcc/powerpc-apple-darwin8.1.0/4.1.0/cc1 -E
-quiet -v -D__DYNAMIC__ -D__APPLE_CC__=1 conftest.c -fPIC -m64 -mcpu=970
-fpch-preprocess -o conftest.i
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/pkgs/gcc-4.0-mainline/lib/gcc/powerpc-apple-darwin8.1.0/4.1.0/../../../../powerpc-apple-darwin8.1.0/include"
#include "..." search starts here:
#include <...> search starts here:
 /pkgs/gcc-4.0-mainline/include
 /pkgs/gcc-4.0-mainline/lib/gcc/powerpc-apple-darwin8.1.0/4.1.0/include
 /usr/include
 /System/Library/Frameworks
 /Library/Frameworks
End of search list.
 /pkgs/gcc-4.0-mainline/libexec/gcc/powerpc-apple-darwin8.1.0/4.1.0/cc1
-fpreprocessed conftest.i -fPIC -quiet -dumpbase conftest.c -m64 -mcpu=970
-auxbase conftest -version -o conftest.s
GNU C version 4.1.0 20050615 (experimental) (powerpc-apple-darwin8.1.0)
        compiled by GNU C version 4.1.0 20050615 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 856564be1b7d2e1a3d0c80ce3c26789d
 as -arch ppc64 -o conftest.o conftest.s
 /usr/bin/libtool -dynamic -arch_only ppc64 -noall_load
-weak_reference_mismatches non-weak -o conftest
-L/pkgs/gcc-4.0-mainline/lib/gcc/powerpc-apple-darwin8.1.0/4.1.0/ppc64
-L/pkgs/gcc-4.0-mainline/lib/gcc/powerpc-apple-darwin8.1.0/4.1.0/../../../ppc64
conftest.o -lgcc_s_ppc64 -lgcc -lSystemStubs -lmx -lSystem
/usr/bin/libtool: can't locate file for: -lgcc_s_ppc64
/usr/bin/libtool: file: -lgcc_s_ppc64 is not an object file (not allowed in a
library)

However, if I add by hand /pkgs/gcc-4.0-mainline/lib, where
libgcc_s_ppc64.1.0.dylib is installed, to the link path to libtool, I get

[descartes:~/programs] lucier% /usr/bin/libtool -dynamic -arch_only ppc64
-noall_load -weak_reference_mismatches non-weak -o conftest
-L/pkgs/gcc-4.0-mainline/lib/gcc/powerpc-apple-darwin8.1.0/4.1.0/ppc64
-L/pkgs/gcc-4.0-mainline/lib/gcc/powerpc-apple-darwin8.1.0/4.1.0/../../../ppc64
conftest.o -lgcc_s_ppc64 -lgcc -lSystemStubs -lmx -lSystem
-L/pkgs/gcc-4.0-mainline/lib
[descartes:~/programs] lucier% file conftest
conftest: Mach-O 64-bit dynamically linked shared library ppc64
[descartes:~/programs] lucier% otool64 -L conftest
conftest:
        conftest (compatibility version 0.0.0, current version 0.0.0)
        /pkgs/gcc-4.0-mainline/lib/libgcc_s_ppc64.1.0.dylib (compatibility
version 1.0.0, current version 1.0.0)
        /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 92.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
88.0.0)

Compare the libtool command line from Xcode 2.1's gcc:

[descartes:~/programs] lucier% /usr/bin/!!
/usr/bin/gcc -m64 -mcpu=970 -o conftest -dynamiclib conftest.c -v -save-temps
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5026.obj~19/src/configure
--disable-checking --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^+.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/gcc/darwin/4.0/c++ --build=powerpc-apple-darwin8
--host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.0 (Apple Computer, Inc. build 5026)
 /usr/libexec/gcc/powerpc-apple-darwin8/4.0.0/cc1 -E -quiet -v -D__DYNAMIC__
conftest.c -fPIC -m64 -mcpu=970 -fpch-preprocess -o conftest.i
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../powerpc-apple-darwin8/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/include
 /usr/include
 /System/Library/Frameworks
 /Library/Frameworks
End of search list.
 /usr/libexec/gcc/powerpc-apple-darwin8/4.0.0/cc1 -fpreprocessed conftest.i
-fPIC -quiet -dumpbase conftest.c -m64 -mcpu=970 -auxbase conftest -version -o
conftest.s
GNU C version 4.0.0 (Apple Computer, Inc. build 5026) (powerpc-apple-darwin8)
        compiled by GNU C version 4.0.0 (Apple Computer, Inc. build 5026).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
 as -arch ppc64 -o conftest.o conftest.s
 /usr/bin/libtool -dynamic -arch_only ppc64 -noall_load
-weak_reference_mismatches non-weak -o conftest
-L/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/ppc64
-L/usr/lib/gcc/powerpc-apple-darwin8/4.0.0
-L/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/ppc64
-L/usr/lib/gcc/powerpc-apple-darwin8/4.0.0
-L/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../.. conftest.o -lgcc_s_ppc64
-lgcc -lSystemStubs -lmx -lSystem

In fact, libgcc_s_ppc64 is in 

$prefix/lib/gcc/powerpc-apple-darwin8.1/4.1.0/../../..

not

$prefix/lib/gcc/powerpc-apple-darwin8.1/4.1.0/../../../ppc64

I have no clue about how to change the search paths for libtool.

-- 
           Summary: Wrong ld search paths passed to libtool for 64-bit
                    compiles
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lucier at math dot purdue dot edu
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin8.1.0
  GCC host triplet: powerpc-apple-darwin8.1.0
GCC target triplet: powerpc-apple-darwin8.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22110


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/22110] Wrong ld search paths passed to libtool for 64-bit compiles
  2005-06-18  4:52 [Bug target/22110] New: Wrong ld search paths passed to libtool for 64-bit compiles lucier at math dot purdue dot edu
@ 2005-06-18  4:53 ` lucier at math dot purdue dot edu
  2005-06-18 19:37 ` lucier at math dot purdue dot edu
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: lucier at math dot purdue dot edu @ 2005-06-18  4:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lucier at math dot purdue dot edu  2005-06-18 04:53 -------
I re-enabled 64-bit multilib before building and installing gcc.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22110


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/22110] Wrong ld search paths passed to libtool for 64-bit compiles
  2005-06-18  4:52 [Bug target/22110] New: Wrong ld search paths passed to libtool for 64-bit compiles lucier at math dot purdue dot edu
  2005-06-18  4:53 ` [Bug target/22110] " lucier at math dot purdue dot edu
@ 2005-06-18 19:37 ` lucier at math dot purdue dot edu
  2005-06-18 23:19 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: lucier at math dot purdue dot edu @ 2005-06-18 19:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lucier at math dot purdue dot edu  2005-06-18 19:37 -------
This is fixed in today's cvs sources, perhaps because of

http://gcc.gnu.org/ml/gcc-cvs/2005-06/msg00681.html


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22110


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/22110] Wrong ld search paths passed to libtool for 64-bit compiles
  2005-06-18  4:52 [Bug target/22110] New: Wrong ld search paths passed to libtool for 64-bit compiles lucier at math dot purdue dot edu
  2005-06-18  4:53 ` [Bug target/22110] " lucier at math dot purdue dot edu
  2005-06-18 19:37 ` lucier at math dot purdue dot edu
@ 2005-06-18 23:19 ` pinskia at gcc dot gnu dot org
  2005-06-19  2:02 ` lucier at math dot purdue dot edu
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-18 23:19 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22110


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/22110] Wrong ld search paths passed to libtool for 64-bit compiles
  2005-06-18  4:52 [Bug target/22110] New: Wrong ld search paths passed to libtool for 64-bit compiles lucier at math dot purdue dot edu
                   ` (2 preceding siblings ...)
  2005-06-18 23:19 ` pinskia at gcc dot gnu dot org
@ 2005-06-19  2:02 ` lucier at math dot purdue dot edu
  2005-06-19  2:21 ` lucier at math dot purdue dot edu
  2005-06-19 13:14 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 8+ messages in thread
From: lucier at math dot purdue dot edu @ 2005-06-19  2:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lucier at math dot purdue dot edu  2005-06-19 02:02 -------
This is a simple patch that can and probably should be back-ported to 4.0.2
after the 4.0 branch is re-opened.

It seems that I probably made a mistake when I marked it resolved.  It is still
open on the 4.0 branch, I think.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22110


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/22110] Wrong ld search paths passed to libtool for 64-bit compiles
  2005-06-18  4:52 [Bug target/22110] New: Wrong ld search paths passed to libtool for 64-bit compiles lucier at math dot purdue dot edu
                   ` (3 preceding siblings ...)
  2005-06-19  2:02 ` lucier at math dot purdue dot edu
@ 2005-06-19  2:21 ` lucier at math dot purdue dot edu
  2005-06-19 13:14 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 8+ messages in thread
From: lucier at math dot purdue dot edu @ 2005-06-19  2:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lucier at math dot purdue dot edu  2005-06-19 02:21 -------
Well, I made more than one mistake today.

While Geoff's patch allows gcc to find libgcc_s_ppc64.dylib when running the
test suite, the installed compiler can't seem to find this library when trying
to build an executable.

So I'm re-opening the bug.  Sorry for the confusion.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|FIXED                       |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22110


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/22110] Wrong ld search paths passed to libtool for 64-bit compiles
  2005-06-18  4:52 [Bug target/22110] New: Wrong ld search paths passed to libtool for 64-bit compiles lucier at math dot purdue dot edu
                   ` (4 preceding siblings ...)
  2005-06-19  2:21 ` lucier at math dot purdue dot edu
@ 2005-06-19 13:14 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-19 13:14 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.0                       |---


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22110


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/22110] Wrong ld search paths passed to libtool for 64-bit compiles
       [not found] <bug-22110-271@http.gcc.gnu.org/bugzilla/>
@ 2006-11-09 23:47 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-11-09 23:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-11-09 23:47 -------
This was a bug in cctools.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22110


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-11-09 23:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-18  4:52 [Bug target/22110] New: Wrong ld search paths passed to libtool for 64-bit compiles lucier at math dot purdue dot edu
2005-06-18  4:53 ` [Bug target/22110] " lucier at math dot purdue dot edu
2005-06-18 19:37 ` lucier at math dot purdue dot edu
2005-06-18 23:19 ` pinskia at gcc dot gnu dot org
2005-06-19  2:02 ` lucier at math dot purdue dot edu
2005-06-19  2:21 ` lucier at math dot purdue dot edu
2005-06-19 13:14 ` pinskia at gcc dot gnu dot org
     [not found] <bug-22110-271@http.gcc.gnu.org/bugzilla/>
2006-11-09 23:47 ` pinskia at gcc dot gnu dot org

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).