From: Takashi Iwai Subject: Re: [patch/rfc] add support for hosts that have custom symbol prefixes Date: Tue, 19 Sep 2006 18:01:49 +0200 Message-ID: References: <200609072047.01314.vapier@gentoo.org> <200609081619.03907.vapier@gentoo.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200609081619.03907.vapier@gentoo.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: Mike Frysinger Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Fri, 8 Sep 2006 16:18:55 -0400, Mike Frysinger wrote: > > On Friday 08 September 2006 09:53, Takashi Iwai wrote: > > At Thu, 7 Sep 2006 20:47:00 -0400, Mike Frysinger wrote: > > > some architectures, like Blackfin, have a prefix added to all symbols (in > > > our case it's historical baggage) > > > > > > while normally packages shouldnt care, when code starts mixing assembler > > > with C (like symbol versioning), you need to dip down into the inner > > > details. find attached a patch which queries gcc for the prefix (all gcc > > > toolchains have a builtin define of __USER_LABEL_PREFIX__) and then > > > automatically has asm() constructs utilize this > > > > > > since most targets define __USER_LABEL_PREFIX__ to nothing, hopefully > > > this shouldnt cause any problems :) > > > > So, the current build doesn't work for such architectures with > > __USER_LABEL_PREFIX__? > > correct ... on blackfin, __USER_LABEL_PREFIX__ is defined to _ > > so when you have a function foo() in C, the actual ELF symbol is _foo ... the > asm() tricks to do symbol aliasing then fail as they try to manipulate the > ELF symbol foo which doesnt exist > > > > diff -r 46221e609f45 include/alsa-symbols.h > > > --- a/include/alsa-symbols.h Wed Sep 06 14:39:01 2006 +0200 > > > +++ b/include/alsa-symbols.h Thu Sep 07 20:45:45 2006 -0400 > > > @@ -22,6 +22,14 @@ > > > #ifndef __ALSA_SYMBOLS_H > > > #define __ALSA_SYMBOLS_H > > > > > > +#ifdef __USER_LABEL_PREFIX__ > > > +# define __SYMBOL_PREFIX __USER_LABEL_PREFIX__ > > > +#else > > > +# define __SYMBOL_PREFIX > > > +#endif > > > + > > > +#include "local.h" > > > > This inclusion looks superfluous. This file itself is included from > > local.h. > > this is my first time hacking on ALSA code so i'll of course defer to anyone > with more experience :) i added this as a sanity check rather than digging > through the include paths in the headers > > if it isnt needed then simply disregard that hunk :) I committed the patch to ALSA HG tree now. Give it a try later. thanks, Takashi ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV