[uClibc]m68k-elf tools and uClibc.

David McCullough davidm at lineo.com
Wed Jul 11 03:43:27 UTC 2001


Jivin Erik Andersen lays it down ...
> On Wed Jul 11, 2001 at 01:05:28PM +1000, David McCullough wrote:
> > 
> > Ok,  the problem is with the weak_alias macro,  I have fix that I think is
> > not going to cause anyone pain :-)
> > 
> > Basically weak_alias declares the function and gcc thinks it's different
> > to the prototype in another file.  Most likely the parameters are causing
> > the error because "typeof" cannot do parameters to functions (i think),
> > 
> > My current workaround will be to add a ASM_WEAK_ALIASES config option
> > to cover this case,  sound reasonable ?
> 
> How about this instead?  Could you check if this fixes it?

That is effectively what I have done,  and it does fix it.  My version
looked like:

	#define weak_alias(name, aliasname) \
		asm(".global " #name ";.weak " #aliasname ";" #aliasname "=" #name ";");

Seems to have done the right thing.  Full build of the tools completed.

I also want to define __BEGIN_DECLS and __END_DECLS for the C++ libs.
Is there a reason we don't do this.  We could make it an option ?
You cannot use link against uClibc with C++ unless these are set
appropriately,  you get lots of unresolved symbols,

Cheers,
Davidm





> diff -u -b -B -w -p -r1.22 features.h
> --- include/features.h	2001/06/12 21:45:09	1.22
> +++ include/features.h	2001/07/11 03:27:23
> @@ -115,8 +115,7 @@
>  	asm (".section "  ".gnu.warning." #symbol  "\n\t.previous");  \
>  	    static const char __evoke_link_warning_##symbol[]     \
>  	    __attribute__ ((section (".gnu.warning." #symbol "\n\t#"))) = msg;
> -#   define weak_alias(name, aliasname) \
> -	extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
> +#   define weak_alias(name, aliasname) __asm__(".weak aliasname;aliasname = name");
>  #else
>  #   define link_warning(symbol, msg) \
>  	asm (".stabs \"" msg "\",30,0,0,0\n\t" \

-- 
David McCullough:  Ph: +61 7 3435 2815  Lineo (Where Open Meets Smart)
davidm at lineo.com   Fx: +61 7 3891 3630  825 Stanley St., W'gabba QLD 4102, Oz





More information about the uClibc mailing list