Package: mozilla Severity: serious The current mozilla package fails to build on alpha, arm, and ia64 because it uses __attribute__((unused)) to mark static functions that are called only from assembly routines. As of gcc 3.1, __attribute__((used)) exists for marking static functions that are used; as of gcc 4.0, __attribute__((unused)) still suppresses compiler warnings about unused static functions, but it does *not* prevent the compiler from optimizing them away.
The attached patch should fix this failure for all three architectures. It has only been tested on alpha, and each architecture has its own implementation for this bit of code, but this patch fixes all uses of __attribute__((unused)), so it should be sufficient. (FWIW, one other architecture -- i386 -- already uses ((used)) in the code...) Since this bug is in the XPCOM code, it also affects other packages that build copies of XPCOM. I'll clone this bug off to them as soon as I have a bug number back. Thanks, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. [EMAIL PROTECTED] http://www.debian.org/
diff -ur mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_alpha.cpp mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_alpha.cpp --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_alpha.cpp 2005-08-28 20:01:29.000000000 -0700 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_alpha.cpp 2005-08-28 02:36:43.000000000 -0700 @@ -43,7 +43,8 @@ /* Prototype specifies unmangled function name and disables unused warning */ static void invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s) -__asm__("invoke_copy_to_stack") __attribute__((unused)); +__asm__("invoke_copy_to_stack") __attribute__((used)); + static void invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s) diff -ur mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2002-03-04 22:35:50.000000000 -0800 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2005-08-28 02:46:41.000000000 -0700 @@ -45,7 +45,8 @@ #endif /* Specify explicitly a symbol for this function, don't try to guess the c++ mangled symbol. */ -static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch"); +static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch") +__attribute((used))__; static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) diff -ur mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ffi.cpp mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ffi.cpp --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ffi.cpp 2005-08-28 20:01:30.000000000 -0700 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ffi.cpp 2005-08-28 02:45:42.000000000 -0700 @@ -116,7 +116,7 @@ } static void xptc_dispatch (ffi_cif *, void *, void **, void *, void *) - __asm__("xptc_dispatch") __attribute__((unused)); + __asm__("xptc_dispatch") __attribute__((used)); static void xptc_dispatch (ffi_cif *common_cif, void *retp, void **common_args, diff -ur mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp 2005-08-28 20:01:29.000000000 -0700 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp 2005-08-28 02:37:54.000000000 -0700 @@ -43,7 +43,7 @@ /* Prototype specifies unmangled function name and disables unused warning */ static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args) -__asm__("PrepareAndDispatch") __attribute__((unused)); +__asm__("PrepareAndDispatch") __attribute__((used)); static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args)
signature.asc
Description: Digital signature