gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compile/link problems on linux/ppc


From: Wolfgang Lux
Subject: Re: compile/link problems on linux/ppc
Date: Mon, 26 Apr 2010 23:40:19 +0200

Riccardo Mottola wrote:

while compiling base on Linux/ppc32 with gcc 4.3.2 I get:

 Compiling file NSObject.m ...
/tmp/ccwBOh8K.s: Assembler messages:
/tmp/ccwBOh8K.s:8384: Error: symbol `incmodified' is already defined
make[4]: *** [obj/libgnustep-base.obj/NSObject.m.o] Error 1


What could that be? A compiler error? or some problematic code which confuses the linker/compiler?

It's a duplication of assembler labels in inline assembler code that is used more than once. I have fixed that in svn by using a local label instead of incmodified.

Fred Kiefer wrote:

What I don't understand is how this code could lead to a duplicate definition of this symbol. Could you try to have a look at the intermediate assembler file? Most likely it gets deleted before you may have a look, but you should be able to ask the compiler just to produce this file and stop compilation there.


Code duplication occurs because GSAtomicIncrement is used in NSIncrementExtraRefCount, which is a public inline function. Thus, the compiler generates the definition of NSIncrementExtraRefCount so that other files can call it. Furthermore the function's code is expanded inline where it is used in NSObject.m, namely in the -retain method.

Wolfgang





reply via email to

[Prev in Thread] Current Thread [Next in Thread]