On Thursday 26 February 2009 02:16:02 Bernhard Reutner-Fischer wrote:
> On Wed, Feb 25, 2009 at 01:38:39PM -0600, Rob Landley wrote:
> >On Wednesday 25 February 2009 12:35:54 Bernhard Reutner-Fischer wrote:
> >> On Tue, Feb 24, 2009 at 12:27:34AM +0000, [email protected] wrote:
> >> > /* Special exit function which only terminates the current thread.  */
> >> >-extern void __exit_thread (int val) __attribute__ ((noreturn));
> >> >+extern void __exit_thread (int val) __attribute__ ((__noreturn__));
> >>
> >> This should rather be attribute_noreturn
> >
> >*shrug*  I just made it consistent with all the other declarations in the
> >file.  Is there documentation on this somewhere?
>
> libc-symbols.h

That's documentation, is it?  I'd previously believed that "This file is
part of the GNU C Library" at the top of those sort of files meant it
had been blindly copied from glibc, and not necessarily indicative of
uClibc's coding style.

Rummage, rummage...

I don't understand your recommendation.  include/unistd.h doesn't
#include libc-symbols.h.  Nothing does, it only gets included because
the uClibc build goes:

  CFLAGS := -include $(top_builddir)include/libc-symbols.h

in Rules.mak.  This means after the build, when unistd.h gets
installed in /usr/include, how the heck are programs that #include
it supposed to get a definition of attribute_noreturn (which would
be polluting the user symbol space anyway)?

Let me check the current source:

$ find include | grep -v .svn | xargs grep noreturn
include/libc-symbols.h:# define attribute_noreturn __attribute__ 
((__noreturn__))
include/libc-symbols.h:# define attribute_noreturn
include/unistd.h:extern void _exit (int __status) __attribute__ 
((__noreturn__));
include/unistd.h:extern void __exit_thread (int val) __attribute__ 
((__noreturn__));
include/setjmp.h:     __THROW __attribute__ ((__noreturn__));
include/setjmp.h:     __THROW __attribute__ ((__noreturn__));
include/setjmp.h:     __THROW __attribute__ ((__noreturn__));
include/stdlib.h:extern void abort (void) __THROW __attribute__ 
((__noreturn__));
include/stdlib.h:extern void exit (int __status) __THROW __attribute__ 
((__noreturn__));
include/stdlib.h:extern void _Exit (int __status) __THROW __attribute__ 
((__noreturn__));
include/err.h:     __attribute__ ((__noreturn__, __format__ (__printf__, 2, 
3)));
include/err.h:     __attribute__ ((__noreturn__, __format__ (__printf__, 2, 
0)));
include/err.h:     __attribute__ ((__noreturn__, __format__ (__printf__, 2, 
3)));
include/err.h:     __attribute__ ((__noreturn__, __format__ (__printf__, 2, 
0)));

So there are exactly two instances in the headers of attribute_noreturn,
both are the #defines you pointed two in libc-symbols.h.  Every other
instance is __attribute__ ((__noreturn__)).

Out of curiosity, let's see what happens if I make the change, make clean,
make defconfig, make...

  CC libc/sysdeps/linux/common/fstat.os
libc/sysdeps/linux/common/fstat.c:43: error: '__EI_fstat64' aliased to 
undefined symbol '__GI_fstat64'
make: *** [libc/sysdeps/linux/common/fstat.os] Error 1

Current svn doesn't build a defconfig on Ubuntu 8.10 x86_64 is what happens.
(Try with 2.6.29-rc5 kernel headers?  Nope, that's not it, it's the .config.)

Ok, so which config symbol controls that...
./libc/sysdeps/linux/common/.fstat.os.dep:libc/sysdeps/linux/common/fstat.os: 
libc/sysdeps/linux/common/fstat.c \

.fstat.os.dep?  Right, not the bug I'm looking for, so put a bit #if 0/#endif
around the entire contents of that file.  Do it _again_ when lstat.c breaks
the same way.  Do it _again_ for stat.c...

Oh this is fun:

  CC libpthread/linuxthreads.old/forward.oS
In file included from ./include/sys/procfs.h:32,
                 from 
libpthread/linuxthreads.old/../linuxthreads.old_db/proc_service.h:20,
                 from 
libpthread/linuxthreads.old/../linuxthreads.old_db/thread_dbP.h:9,
                 from libpthread/linuxthreads.old/internals.h:32,
                 from libpthread/linuxthreads.old/forward.c:50:
./include/sys/time.h:74: warning: asm declaration ignored due to conflict with 
previous rename
./include/sys/time.h:82: warning: asm declaration ignored due to conflict with 
previous rename
./include/sys/time.h:137: warning: asm declaration ignored due to conflict with 
previous rename
./include/sys/time.h:144: warning: asm declaration ignored due to conflict with 
previous rename

And then it has that problem again another dozen or so times, filling
several screens with warning messages...

Ok, defconfig is totally horked, lemme try the config I've been building
(and the one I submitted the patches you don't like so it would build).

Nope, build still goes nuts with current svn.  Pages of asm warnings, and
breaks on __EI_fstat64 if I don't #ifdef that out.  (And then fails to link
at the end anyway.)

Rob
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to