Bug 22118

Summary: dwarf-2 is not support with -m64 on ppc-dariwn
Product: gcc Reporter: lucier
Component: targetAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED WORKSFORME    
Severity: normal CC: gcc-bugs
Priority: P2 Keywords: link-failure
Version: 4.1.0   
Target Milestone: ---   
Host: Target: powerpc-darwin
Build: Known to work:
Known to fail: Last reconfirmed: 2006-01-26 05:32:25

Description lucier 2005-06-19 03:53:46 UTC
After enabling multilibs, there are many c++ testsuite failures like the
following (taken from gcc/testsuite/g++.log):

Testing debug/const1.C, -gdwarf-21
Executing on host:
/Users/lucier/programs/gcc/gcc-mainline/objdir/gcc/testsuite/../g++
-B/Users/lucier/programs/gcc/gcc-mainline/objdir/gcc/testsuite/../
/Users/lucier/programs/gcc/gcc-mainline/gcc/testsuite/g++.dg/debug/const1.C 
-nostdinc++
-I/Users/lucier/programs/gcc/gcc-mainline/objdir/powerpc-apple-darwin8.1.0/ppc64/libstdc++-v3/include/powerpc-apple-darwin8.1.0
-I/Users/lucier/programs/gcc/gcc-mainline/objdir/powerpc-apple-darwin8.1.0/ppc64/libstdc++-v3/include
-I/Users/lucier/programs/gcc/gcc-mainline/libstdc++-v3/libsupc++
-I/Users/lucier/programs/gcc/gcc-mainline/libstdc++-v3/include/backward
-I/Users/lucier/programs/gcc/gcc-mainline/libstdc++-v3/testsuite
-fmessage-length=0 -gdwarf-21 -O   
-L/Users/lucier/programs/gcc/gcc-mainline/objdir/powerpc-apple-darwin8.1.0/ppc64/libstdc++-v3/src/.libs
-L/Users/lucier/programs/gcc/gcc-mainline/objdir/powerpc-apple-darwin8.1.0/ppc64/libiberty
 -multiply_defined suppress -lm   -m64 -o const1.exe    (timeout = 300)
ld64 failed: in /var/tmp//ccsaGdeJ.o, vanilla pointer relocation found that is
not 8-bytes^M
collect2: ld returned 1 exit status^M
compiler exited with status 1 
output is:
ld64 failed: in /var/tmp//ccsaGdeJ.o, vanilla pointer relocation found that is
not 8-bytes^M
collect2: ld returned 1 exit status^M

FAIL: g++.dg/debug/const1.C (test for excess errors)
Excess errors:
ld64 failed: in /var/tmp//ccsaGdeJ.o, vanilla pointer relocation found that is
not 8-bytes

I can't seem to figure out how to run the command by hand to get a .i file.
Comment 1 Andrew Pinski 2006-01-26 05:32:25 UTC
Confirmed, the problem is -dwarf-2.
Comment 2 Geoff Keating 2006-10-03 20:35:25 UTC
This is fixed in later versions of the darwin developer tools.