Re: Implementing {get,set,make,swap}context routines for ARM

2012-08-22 Thread Carmelo AMOROSO
On 19/08/2012 1.51, Mike Frysinger wrote:
 On Tuesday 26 June 2012 05:29:29 Timon ter Braak wrote:
 I am trying to build a gccgo (go language) cross compiler targetting an
 ARM system. Go uses the context control routines for coorperative
 multithreading. uClibc however does not implement them, so I am trying
 to port the functions to uClibc.

 The routines are available in glibc and eglibc, and for other
 architectures [1]. My port builds correctly, but segfaults while running.

 I noticed that (for example) the getcontext routine is quite different
 from the setjmp routine shipped with uClibc. Can anybody give me some
 pointers in what should be altered?

 A patch of my attempt is attached.
 
 you'll need to make them depend on UCLIBC_SUSV3_LEGACY as these functions 
 have 
 been removed from the latest POSIX spec and shouldn't be enabled/built by 
 default
 -mike
 
 

I have also a patch set for SH4 since time (never upstreamed). I will
consider to rebase and post a patch. I do need to use
UCLIBC_SUSV3_LEGACY as Mike suggested.

carmelo

 
 ___
 uClibc mailing list
 uClibc@uclibc.org
 http://lists.busybox.net/mailman/listinfo/uclibc
 


___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc


Re: Trouble compiling uClibc with NPTL support on Ubuntu 12.04

2012-08-22 Thread Carmelo AMOROSO
On 26/07/2012 20.41, Scott Moore wrote:
 Hi all,
 I'm trying to compile uClibc 0.9.33.2 with NPTL support, but I keep
 encountering build failures (possibly related to ldso). I have
 successfully built uClibc in with no thread support or with
 linuxthreads.old. I appreciate any help you can offer. Please let me
 know if there are additional details I can provide.
 Thanks,
 Scott
 
 Some specs:
 
 $ uname -a
 Linux ubuntu 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC
 2012 x86_64 x86_64 x86_64 GNU/Linux
 
 $ gcc -v
 Using built-in specs.
 COLLECT_GCC=gcc
 COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.5.3/lto-wrapper
 Target: x86_64-linux-gnu
 Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
 4.5.3-12ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs
 --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
 --program-suffix=-4.5 --enable-shared --enable-linker-build-id
 --with-system-zlib --libexecdir=/usr/lib --without-included-gettext
 --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5
 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
 --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin
 --enable-gold --enable-ld=default --with-plugin-ld=ld.gold
 --enable-objc-gc --disable-werror --with-arch-32=i686
 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
 --host=x86_64-linux-gnu --target=x86_64-linux-gnu
 Thread model: posix
 gcc version 4.5.3 (Ubuntu/Linaro 4.5.3-12ubuntu2)
 
 $ ld -v
 GNU ld (GNU Binutils for Ubuntu) 2.22
 
 
 
 
 Here are all of the errors or warnings that appear during compilation,
 followed by the command that fails and something that seem like it might
 help:
 
 $ make
.
.
.
   CC ldso/ldso/ldso.oS
 ldso/ldso/ldso.c: In function '_dl_get_ready_to_run':
 ldso/ldso/ldso.c:750:22: warning: cast from pointer to integer of
 different size
 ldso/ldso/ldso.c:750:16: warning: unused variable 'tmp'
.
.
.
 make[1]: `lib/ld64-uClibc.so' is up to date.
   CC ldso/libdl/libdl.oS
 ldso/libdl/libdl.c: In function 'do_dlsym':
 ldso/libdl/libdl.c:738:59: warning: cast from pointer to integer of
 different size
.
.
.
   CC libc/stdio/popen.os
 libc/stdio/popen.c:136:2: warning: #warning is pclose correct wrt the
 new mutex semantics?
.
.
.
   CC libc/stdio/_stdio.os
 libc/stdio/_stdio.c: In function '_stdio_term':
 libc/stdio/_stdio.c:199:2: warning: #warning check
.
.
.
   CC libc/stdio/_vfprintf_internal.os
 In file included from libc/stdio/_vfprintf_internal.c:9:0:
 libc/stdio/_vfprintf.c: In function '_vfprintf_internal':
 libc/stdio/_vfprintf.c:1448:15: warning: 'argptr$' may be used
 uninitialized in this function
.
.
.
   CC libc/stdio/fflush_unlocked.os
 In file included from libc/stdio/fflush_unlocked.c:9:0:
 libc/stdio/fflush.c: In function 'fflush_unlocked':
 libc/stdio/fflush.c:100:2: warning: #warning fix for nonatomic
 libc/stdio/fflush.c:101:2: warning: #warning unnecessary check if no
 threads
.
.
.
   CC libpthread/nptl/forward.oS
 libpthread/nptl/forward.c: In function '__pthread_unwind':
 libpthread/nptl/forward.c:158:1: warning: 'noreturn' function does return
.
.
.
   CC libpthread/nptl/sysdeps/pthread/pt-longjmp.oS
 libpthread/nptl/sysdeps/pthread/pt-longjmp.c: In function 'longjmp':
 libpthread/nptl/sysdeps/pthread/pt-longjmp.c:27:3: warning: implicit
 declaration of function '__libc_longjmp'
 libpthread/nptl/sysdeps/pthread/pt-longjmp.c:28:1: warning: 'noreturn'
 function does return
.
.
.
   CC libpthread/nptl/pt-cleanup.oS
 libpthread/nptl/pt-cleanup.c:27:1: warning: redeclaration of
 '__pthread_cleanup_upto' with different visibility (old visibility
 preserved)
 libpthread/nptl/pthreadP.h:357:1: note: previous declaration of
 '__pthread_cleanup_upto' was here
.
.
.
   CC libpthread/nptl/pthread_getspecific.oS
 libpthread/nptl/pthread_getspecific.c:27:1: warning: 'visibility'
 attribute ignored on non-class types
.
.
.
   CC libpthread/nptl/unwind.oS
 libpthread/nptl/unwind.c: In function 'unwind_stop':
 libpthread/nptl/unwind.c:96:5: warning: implicit declaration of function
 '__libc_longjmp'
 libpthread/nptl/unwind.c: At top level:
 libpthread/nptl/unwind.c:123:1: warning: redeclaration of
 '__pthread_unwind' with different visibility (old visibility preserved)
 libpthread/nptl/pthreadP.h:250:1: note: previous declaration of
 '__pthread_unwind' was here
   CC libpthread/nptl/vars.oS
   AR cr libpthread/nptl/libpthread_so.a
   STRIP -x -R .note -R .comment libpthread/nptl/libpthread_so.a
   CC libpthread/nptl/pthread_atfork.oS
   AR cr lib/libpthread_nonshared.a
   STRIP -x -R .note -R .comment lib/libpthread_nonshared.a
   CC libpthread/nptl/sysdeps/pthread/pt-initfini.s
   GEN libpthread/nptl/sysdeps/pthread/defs.h
   GEN libpthread/nptl/sysdeps/pthread/pt-crti.S
   AS libpthread/nptl/sysdeps/pthread/pt-crti.o
   GEN