Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DWARF problem on PowerPC



Hello all.
I am trying to build small sample of application and shared library with DWARF symbolic info in external dSYM files.
My code is:

file test.c:
#include <stdio.h>

extern int sum(int a, int b);

int main()
{
int a = 10;
int b = 100;
int c = sum( a, b );
printf( "%d %d %d\n", a, b, c );
return 0;
}

file sum.c:
int sum(int a, int b)
{
return a+b;
}

I am building it with the following commands, assuming i am in the same folder where files are:
#! /bin/sh

#build shared lib
gcc -c -O3 -gdwarf-2 sum.c
gcc -o libsum.dylib -dynamiclib sum.o -install_name @executable_path/libsum.dylib
dsymutil -o libsum.dSYM libsum.dylib
strip -x libsum.dylib

#build test
gcc -c -O3 -gdwarf-2 test.c
gcc -o test test.o -L./ -lsum
dsymutil -o test.dSYM test
strip test

On the Intel iMac 20" Mac OS X 10.4.10 Xcode 2.4.1 Core Duo 2 2 GHz everything build and run nice.
On the PowerMac G5 (dual-core G5 2 GHz) Mac OS X 10.4.10 I am getting error message:
ERROR: No debug map or DWARF data was found to link
And no "dSYM" file for a shared library.

If i remove optimization flag (-O3) then I could build without any error. Adding any optimization (i had tryed -O1, -Os) gives me the same error.

Is it a bug in the compiler or i am doing something wrong?
Thank you in advance.
--
Sincerely, 
Rustam Muginov


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.