Re: ‘__ctype_touplow_t’ and ‘__ctype_mask_t’ does not name a type

2013-03-22 Thread Bernd Schmidt
On 03/22/2013 09:54 PM, Bernhard Reutner-Fischer wrote: Bernd, do you think that something like http://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gcc/gcc-4.7/gcc-uclibc-locale-ctype_touplow_t.patch would be acceptable? I couldn't say, I'm not a libstdc++-v3 maintainer.

Re: ipc.h struct layout fix

2011-07-11 Thread Bernd Schmidt
On 07/10/11 07:19, Mike Frysinger wrote: On Sat, Jul 9, 2011 at 18:38, Bernd Schmidt wrote: So, the list of those that have an int kernel_mode_t and use common/bits/ipc.h is x86_64 and v850. v850 has select ARCH_LITTLE_ENDIAN and x86_64 is known to be LE as well. looks fine then from

Re: ipc.h struct layout fix

2011-07-09 Thread Bernd Schmidt
On 07/09/11 21:14, Mike Frysinger wrote: On Thursday, July 07, 2011 08:04:37 Bernd Schmidt wrote: This fixes a problem identified by Mark Salter on C6X big-endian systems. We should not use unsigned short int mode; the proper type is in theory mode_t, but here we need to use kernel_mode_t

ipc.h struct layout fix

2011-07-07 Thread Bernd Schmidt
This fixes a problem identified by Mark Salter on C6X big-endian systems. We should not use unsigned short int mode; the proper type is in theory mode_t, but here we need to use kernel_mode_t since this structure is used for communication with the kernel, and some targets have a 16-bit

Re: ipc.h struct layout fix

2011-07-07 Thread Bernd Schmidt
On 07/07/11 20:41, Peter Mazinger wrote: Hi, This fixes a problem identified by Mark Salter on C6X big-endian systems. We should not use unsigned short int mode; the proper type is in theory mode_t, but here we need to use kernel_mode_t since this structure is used for communication with the

Fix a problem with remapping textrel segments on nommu

2011-05-26 Thread Bernd Schmidt
gets remapped, thereby invaliding anything that points to it, in particular certain dynamic tags such as DT_NEEDED. The following patch re-parses the dynamic info after the remapping so as to re-compute any invalid pointers. Signed-off-by: Bernd Schmidt ber...@codesourcery.com --- ldso/ldso/dl-elf.c

Fix malloc alignment

2011-04-06 Thread Bernd Schmidt
In commit 3e0a1f388, Richard tried to fix malloc alignments by using alignof (double __attribute_aligned__(sizeof (size_t))). This doesn't work, since attribute_aligned overrides the alignment rather than providing a minimum. On C6X, malloc returns four-byte aligned values rather than the

Re: Fix malloc alignment

2011-04-06 Thread Bernd Schmidt
On 04/06/2011 07:40 PM, Bernd Schmidt wrote: In commit 3e0a1f388, Richard tried to fix malloc alignments by using alignof (double __attribute_aligned__(sizeof (size_t))). This doesn't work, since attribute_aligned overrides the alignment rather than providing a minimum. On C6X, malloc returns

Re: nommu handling of DT_TEXTREL

2011-04-05 Thread Bernd Schmidt
On 04/05/2011 11:03 PM, Bernhard Reutner-Fischer wrote: On Fri, Apr 01, 2011 at 03:06:55PM +0200, Bernd Schmidt wrote: +char *piclib2map = 0; = NULL +#ifndef MIN +# define MIN(a,b) ((a) (b) ? (a) : (b)) MIN is always defined via sys/param.h +cant_map: Please use

nommu handling of DT_TEXTREL

2011-04-01 Thread Bernd Schmidt
We have a problem with DT_TEXTREL shared libraries on nommu machines. The dynamic linker's strategy is to map the text segment read-only first, then look for DT_TEXTREL, and use mprotect to change protections if necessary. This fails on nommu, since a nommu kernel can decide to share the memory

Support dynamic assignment of DSBT_INDEX

2011-04-01 Thread Bernd Schmidt
For DSBT targets (C6X only at this point), we'd like to support the case where the user did not specify --dsbt-index at link time when building a shared library. The dynamic linker can still assign an index at runtime and fix up the DSBT_INDEX relocs, at the cost of startup time and memory space.

UCLIBC_UCLINUX_BROKEN_MUNMAP

2011-03-09 Thread Bernd Schmidt
I propose the following patch, which changes the default for UCLIBC_UCLINUX_BROKEN_MUNMAP. That option changes malloc behaviour for nommu systems to match munmap and mmap calls exactly, which introduces extra overhead. Also, when I was at Analog, we've had a fair amount of trouble making it work

Re: C6X port, version 2

2011-03-07 Thread Bernd Schmidt
On 03/05/2011 08:11 PM, Bernhard Reutner-Fischer wrote: As to xdrproc_t, doesn't that change API WRT both manpage as well as glibc? Yes. However, it seems to change it to a more correct form given existing usage. There's no xdrproc I could find that's actually defined as variadic (every example

Re: Nanosleep hangs

2011-03-02 Thread Bernd Schmidt
On 03/02/2011 07:05 PM, Bernhard Reutner-Fischer wrote: clock_nanosleep was added just recently (to master). If you're referring to my patch, I've not committed that, as I noticed that librt now has a version of clock_nanosleep. Bernd ___ uClibc

C6X port, version 2

2011-03-02 Thread Bernd Schmidt
I've cleaned up a few issues in the previous version of these patches, such as those pointed out by Bernhard, a numer of whitespace issues, and some dead code. Mark Salter has also pointed out that the FINISH_BOOTSTRAP_RELOC macro isn't actually needed when ld.so is built with gcc, so I've

[PATCH 1/7] Add Makefile support for DSBT ELF.

2011-03-02 Thread Bernd Schmidt
From: Bernd Schmidt bernds_...@t-online.de ber...@codesourcery.com This adds support for a new binary format, DSBT ELF, to the Makefiles. Every shared library is assigned a DSBT index, and the link.so macro is adjusted to ensure the correct linker argument is passed. Configuration and ldso

[PATCH 2/7] Allow ABIs where SP points below the stack frame.

2011-03-02 Thread Bernd Schmidt
On C6X, the stack pointer points to a word that is not part of the current function's stack frame. It may be overwritten by callees. Take this into account when creating the stack for a cloned thread. Signed-off-by: Bernd Schmidt ber...@codesourcery.com --- libpthread/linuxthreads.old

[PATCH 3/7] Add support for DSBT ELF to ld.so

2011-03-02 Thread Bernd Schmidt
-by: Aurelien Jacquiot a-jacqu...@ti.com Signed-off-by: Bernd Schmidt ber...@codesourcery.com --- include/link.h | 13 - ldso/include/dl-defs.h |2 +- ldso/include/dl-elf.h | 11 ++- ldso/ldso/dl-elf.c | 23

[PATCH 5/7] Fix RPC xdrproc_t calls

2011-03-02 Thread Bernd Schmidt
From: Mark Salter msal...@redhat.com xdrproc_t is defined as a variadic function with two fixed arguments. However, the code uses typecasts of non-variadic functions in assignments to xdrproc_t types and later calls those functions as an xdrproc_t. This leads to undefined behavior in C. On C6X,

[PATCH 7/7] Add sanity checks to ld.so DSBT support

2011-03-02 Thread Bernd Schmidt
From: Mark Salter msal...@redhat.com This adds some DSBT index sanity checks to the runtime linker. It catches libraries which have no index (index 0) and libraries which try to use an already used index. Signed-off-by: Bernd Schmidt ber...@codesourcery.com --- ldso/ldso/dl-elf.c | 29

[PATCH 6/7] sunrpc: fix spurious fall-through

2011-03-02 Thread Bernd Schmidt
From: Mark Salter msal...@redhat.com Fix spurious fall-through. Signed-off-by: Mark Salter msal...@redhat.com --- libc/inet/rpc/clnt_tcp.c |1 + libc/inet/rpc/clnt_udp.c |1 + libc/inet/rpc/clnt_unix.c |1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git

Re: [PATCH 3/6] Add support for DSBT ELF to ld.so

2011-02-24 Thread Bernd Schmidt
On 02/24/2011 12:12 AM, Mike Frysinger wrote: On Wednesday, February 23, 2011 14:05:49 Bernd Schmidt wrote: --- a/ldso/include/dl-defs.h +++ b/ldso/include/dl-defs.h @@ -212,7 +212,7 @@ typedef struct { _dl_find_hash for this reloc TYPE. TPNT is the module in which the matching SYM

Re: [PATCH 1/6] Add Makefile support for DSBT ELF.

2011-02-24 Thread Bernd Schmidt
On 02/23/2011 10:56 PM, Bernhard Reutner-Fischer wrote: +ifeq ($(UCLIBC_FORMAT_DSBT_ELF),y) define link.so $(Q)$(RM) $@ $@.$(2) $(dir $@)$(1) @$(disp_ld) $(Q)$(CC) $(LDFLAGS-$(notdir $@)) -Wl,-soname=$(notdir $@).$(2) \ $(NOSTDLIB_CFLAGS) -o $(dir $@)$(1)

The C6X port

2011-02-23 Thread Bernd Schmidt
I will submit a series of patches in replies to this message which together add a port for the Texas Instruments C6X processor family to uClibc. A toolchain which can be used to build it is available at http://www.codesourcery.com/sgpp/lite/c6000/portal/release1703 We are in the process of

[PATCH 1/6] Add Makefile support for DSBT ELF.

2011-02-23 Thread Bernd Schmidt
This adds support for a new binary format, DSBT ELF, to the Makefiles. Every shared library is assigned a DSBT index, and the link.so macro is adjusted to ensure the correct linker argument is passed. Configuration and ldso support will follow in separate commits. Signed-off-by: Bernd Schmidt

[PATCH 6/6] sunrpc: fix spurious fall-through

2011-02-23 Thread Bernd Schmidt
From: Mark Salter msal...@redhat.com Fix spurious fall-through. Signed-off-by: Mark Salter msal...@redhat.com --- libc/inet/rpc/clnt_tcp.c |1 + libc/inet/rpc/clnt_udp.c |1 + libc/inet/rpc/clnt_unix.c |1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git

[PATCH 3/6] Add support for DSBT ELF to ld.so

2011-02-23 Thread Bernd Schmidt
-off-by: Bernd Schmidt ber...@codesourcery.com --- include/link.h | 13 - ldso/include/dl-defs.h |2 +- ldso/include/dl-elf.h | 11 ++- ldso/ldso/dl-elf.c | 23 ++- ldso/ldso/dl-startup.c

[PATCH 2/6] Allow ABIs where SP points below the stack frame.

2011-02-23 Thread Bernd Schmidt
On C6X, the stack pointer points to a word that is not part of the current function's stack frame. It may be overwritten by callees. Take this into account when creating the stack for a cloned thread. Signed-off-by: Bernd Schmidt ber...@codesourcery.com --- libpthread/linuxthreads.old

[PATCH 5/6] Fix RPC xdrproc_t calls

2011-02-23 Thread Bernd Schmidt
From: Mark Salter msal...@redhat.com xdrproc_t is defined as a variadic function with two fixed arguments. However, the code uses typecasts of non-variadic functions in assignments to xdrproc_t types and later calls those functions as an xdrproc_t. This leads to undefined behavior in C. On C6X,

Re: Patch: implement clock_nanosleep

2011-02-21 Thread Bernd Schmidt
, otherwise provide a function that sets errno to ENOSYS). Nathan, any input on why you chose to do it that way? Ok to check in this version? Signed-off-by: Bernd Schmidt ber...@codesourcery.com Bernd diff --git a/include/string.h b/include/string.h index ca22055..66f64e7 100644 --- a/include

Patch: Implement ffsl and ffsll

2011-02-19 Thread Bernd Schmidt
The following patch imports and adapts ffsll.c from glibc. The same mechanism as in glibc is used to choose between ffs and ffsll to implement ffsl. Ok? Bernd Index: include/string.h === --- include/string.h(revision 26250) +++

Patch: implement clock_nanosleep

2011-02-19 Thread Bernd Schmidt
This patch, written by Nathan Sidwell, implements clock_nanosleep. Ok? Bernd Index: include/time.h === --- include/time.h (revision 307155) +++ include/time.h (revision 307156) @@ -349,9 +349,8 @@ extern int clock_gettime

Re: [git commit master] convert // comments to /**/; remove empty #if/#endif pairs. no code changes

2009-09-18 Thread Bernd Schmidt
Denys Vlasenko wrote: +/* I think it's wrong: _toupper(c) assumes that c is a *lowercase* *letter* - + * it is defined as ((c) ^ 0x20)! + * if ((__uwchar_t) wc = 0x7f) { + * return (desc == _CTYPE_tolower) ? _tolower(wc) : _toupper(wc); + * } + */ This is awful. Please use #if 0 blocks,

Re: Illegal instruction on m68k nommu (solved. C and C++ now work.)

2009-05-04 Thread Bernd Schmidt
Lennart Sorensen wrote: On Mon, Apr 20, 2009 at 02:39:06PM -0400, Lennart Sorensen wrote: I decided to try the blackfin version of elf2flt entirely, since it also seems to have a fix for c++ support (not that I have any plans to use c++), and it turns out, it is missing a single line fix in

Re: HEADS UP: svn-git transition

2009-04-30 Thread Bernd Schmidt
Thierry Reding wrote: You use git fetch to update the local repository with the latest changes from the remote repository, then use git rebase origin/master to rebase all local commits onto the master branch of the origin repository. origin/master can of course be substituted with any other

Re: HEADS UP: svn-git transition

2009-04-30 Thread Bernd Schmidt
Mike Frysinger wrote: On Thursday 30 April 2009 08:57:14 Bernd Schmidt wrote: Thierry Reding wrote: You use git fetch to update the local repository with the latest changes from the remote repository, then use git rebase origin/master to rebase all local commits onto the master branch

Re: HEADS UP: svn-git transition

2009-04-29 Thread Bernd Schmidt
Bernhard Reutner-Fischer wrote: We will be switching to git (instead of svn) for our repositories. Any particular reason? As far as I know, git works on local repositories. How will we get things committed into a mainline repository? Bernd -- This footer brought to you by insane German

Re: HEADS UP: svn-git transition

2009-04-29 Thread Bernd Schmidt
Bernhard Reutner-Fischer wrote: git push -v --thin git+ssh://$usern...@uclibc.org/srv/git/uClibc.git Huh. Does git really work if multiple people push to the same repository? That's news to me. All the online examples seem to suggest using git push as a means to provide a git-pullable

Re: Illegal instruction on m68k nommu

2009-04-18 Thread Bernd Schmidt
Lennart Sorensen wrote: I now wonder if there is a bug in that gcc 4.3 code, or in the linker messing up the ordering, or possibly in the elf2flt tool. The mainline version of elf2flt sets __[CD]TOR_LIST__ and __[CD]TOR_END__ incorrectly. It sounds like you're hitting that problem, so you

Re: svn commit: branches/uClibc-nptl: libc/sysdeps/linux/common libpthread/lin etc...

2009-02-26 Thread Bernd Schmidt
Bernhard Reutner-Fischer wrote: On Wed, Feb 25, 2009 at 03:21:34PM +0100, Bernd Schmidt wrote: Denys Vlasenko wrote: On Wednesday 25 February 2009 01:31:01 pm Bernd Schmidt wrote: v...@uclibc.org wrote: reinstate __libc_foo for linuxthreads.old The code didn't seem to have the awful #ifdefs

Re: svn commit: branches/uClibc-nptl: libc/sysdeps/linux/common libpthread/lin etc...

2009-02-25 Thread Bernd Schmidt
v...@uclibc.org wrote: Author: vda Date: 2009-02-25 11:15:13 + (Wed, 25 Feb 2009) New Revision: 25450 Log: reinstate __libc_foo for linuxthreads.old The code didn't seem to have the awful #ifdefs before your checkins 24362 and 24363. I think it's a terrible idea to add more

Re: svn commit: branches/uClibc-nptl: libc/sysdeps/linux/common libpthread/lin etc...

2009-02-25 Thread Bernd Schmidt
Denys Vlasenko wrote: On Wednesday 25 February 2009 01:31:01 pm Bernd Schmidt wrote: v...@uclibc.org wrote: reinstate __libc_foo for linuxthreads.old The code didn't seem to have the awful #ifdefs before your checkins 24362 and 24363. I think it's a terrible idea to add more differences

Re: svn commit: trunk/uClibc: include

2009-01-13 Thread Bernd Schmidt
Denys Vlasenko wrote: On Monday 12 January 2009 14:07, Bernd Schmidt wrote: Rules.mak: add -funsigned-char, to forestall future PITA Yeah, that's just wrong for all the reasons given in the old thread. Please revert if you haven't already. Old thread said generated code for -fsigned-char

Re: What is the preferred code style for uclibc?

2008-12-02 Thread Bernd Schmidt
Denys Vlasenko wrote: I merely plan to follow the agreed-on style in the code I touch. IMO for code that is just touched, following the existing style in that file is best. Bernd -- This footer brought to you by insane German lawmakers. Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6

Re: svn commit: trunk/uClibc: libc/misc/syslog libc/pwd_grp libc/signa etc...

2008-12-01 Thread Bernd Schmidt
[EMAIL PROTECTED] wrote: -sigemptyset(sa.sa_mask); -sa.sa_flags = 0; +/* __sigemptyset(sa.sa_mask); */ +/* sa.sa_flags = 0; */ sigaction(s, sa, NULL); Please don't do this. Over time this will litter the code with historical remnants and make it

Re: Fun with the dynamic loader.

2008-11-14 Thread Bernd Schmidt
Rob Landley wrote: Can you explain what FD-PIC is in fewer words than this guy? It's a binary format. It works on nommu, but unlike flat, it allows all the normal ELF things like shared libraries and dynamic loading. It needs compiler linker support so it's not something you can implement in

Re: More on the svn 23660 breakage.

2008-10-29 Thread Bernd Schmidt
Rob Landley wrote: There are _three_ allocators right now, MALLOC, MALLOC_SIMPLE, and MALLOC_STANDARD. Is your objection that MALLOC does everything MALLOC_SIMPLE does (including nommu support), so there's no real need for MALLOC_SIMPLE? Simple = plain bad in this case. It has massive

Re: More on the svn 23660 breakage.

2008-10-27 Thread Bernd Schmidt
Rob Landley wrote: So svn 23660 broke arm with my .config, but if I change my .config from MALLOC=y to MALLOC_STANDARD=y it works again. Does anybody understand the difference between the MALLOC and MALLOC_SIMPLE options? The make help is not being useful here. Off to try

Re: confirmed working NPTL revision?

2008-09-16 Thread Bernd Schmidt
Carmelo AMOROSO wrote: No, what we do is we keep the 0.9.29 tarball around and if people have bugs trying to use 0.9.30 they _report_ them to us. If they want to use the old threading code, they can use the old version of the library. If they want the new features, then they help us find

Re: libc_hidden_proto removal en masse

2008-07-11 Thread Bernd Schmidt
Carmelo AMOROSO wrote: I'd like to highlight that we need to fix the testsuite build system. I've sent a patch recently putting together some suggestions by Bernard, Bernd and others. I'd like to have it reviewed so that it can be merged in. I had missed that in the old thread. The patch

Re: uclibc, uClinux-dist-2008R1-RC8 and fork

2008-06-30 Thread Bernd Schmidt
Denys Vlasenko wrote: Am I reading this correctly to mean that current uclibc svn can't be used unmodified to build uClinux-dist-2008R1-RC8 on blackfin? Correct. I'd mentioned this before. Bernd -- This footer brought to you by insane German lawmakers. Analog Devices GmbH

Re: Test build failed due to UCLIBC_INTERNAL header rework

2008-06-11 Thread Bernd Schmidt
Daniel Jacobowitz wrote: I have no comment on the patch itself, but I like the approach - I've concluded before that this is the only sane way to test toolchain pieces, especially compiler or C library. We do all of our testing after installation here. My patch doesn't really create a full

malloc in gethostbyname

2008-06-10 Thread Bernd Schmidt
For gethostbyname and related functions, I can see two alternatives to just reverting to pre-uc_malloc state, either of which would enable us to reduce the amount of static buffers. Looking at some other C libraries, glibc still seems to use static buffers, but in the FreeBSD C library, there

Re: Test build failed due to UCLIBC_INTERNAL header rework

2008-06-10 Thread Bernd Schmidt
Carmelo AMOROSO wrote: I've now figure out that I was looking at the previous version of string.h where all the hidden_proto were guarded by the UCLIBC_INTERNAL.. that now is changed again. SO my previous suggested fixed doesn't work.. so probably the only solution is as Bernd suggested.

Re: __uc_malloc

2008-06-09 Thread Bernd Schmidt
Denys Vlasenko wrote: A small story. I wrote a glibc's nscd replacement last year. glibc's nscd, when run on Google machines (and not only on them), was crashing or locking up, and since it was broken by design, References? I assume this has been reported and discussed somewhere? On MMU

Re: reentrant functions

2008-06-08 Thread Bernd Schmidt
Bernhard Fischer wrote: Just to make sure i understand correctly: - If a reentrant function exists then you want the non-reentrant func to be optional (via a central knob). - If non-reentrant funcs are off then they are aliased to their reentrant counterpart. No, they have different

Re: reentrant functions

2008-06-08 Thread Bernd Schmidt
Denys Vlasenko wrote: Ok, this is a scenario: the user runs a passwd utility on NOMMU box. This utility has 20k of text and 80k of data. 70k of this data is occupied by des.c static buffer. At this moment the machine has only 90k RAM available, has no swap etc. It cannot satisfy load

Re: svn commit: trunk/uClibc/libc/inet

2008-06-06 Thread Bernd Schmidt
[EMAIL PROTECTED] wrote: Author: vda Date: 2008-06-06 00:25:12 -0700 (Fri, 06 Jun 2008) New Revision: 22244 Log: Use more natural way to return a value in __read_etc_hosts_r: - if (buflen sizeof(char *)*(ALIAS_DIM)) + if (buflen sizeof(char *)*ALIAS_DIM) return

Re: svn commit: trunk/uClibc/libc/inet

2008-06-06 Thread Bernd Schmidt
[EMAIL PROTECTED] wrote: Remove superfluous attribute_hidden from function definition. I seems to produce spurious warning: libc/inet/resolv.c:1549: warning: 'visibility' attribute ignored on non-class types (seems like gcc bug) -FILE * attribute_hidden __open_etc_hosts(void) +FILE *

Re: svn commit: trunk/uClibc/libc/inet

2008-06-06 Thread Bernd Schmidt
Bernhard Fischer wrote: PS: You know that i usually do not blindly rewrite stuff, but the resolver code is really an ugly and bloated mess (and doesn't even work for IPv6-only), but this time i think it would be saner to write this thing from scratch and not try to beat it into shape. Surely

Re: svn commit: trunk/uClibc/libc/inet

2008-06-06 Thread Bernd Schmidt
Bernhard Fischer wrote: Author: vda Date: 2008-06-06 00:25:12 -0700 (Fri, 06 Jun 2008) New Revision: 22244 Log: Use more natural way to return a value in __read_etc_hosts_r: hah. vda bashing! ;) No, serious: The proper term is patch review. I've gone through the last 200 checkins

Re: svn commit: trunk/uClibc

2008-06-05 Thread Bernd Schmidt
[EMAIL PROTECTED] wrote: + libpthread/*/*.$(ext) libpthread/*/*/*.$(ext) \ + libpthread/*/*/*/*.$(ext) libpthread/*/*/*/*/*.$(ext) \ + libpthread/*/*/*/*/*/*.$(ext) libpthread/*/*/*/*/*/*/*.$(ext) \ + libpthread/*/*/*/*/*/*/*/*.$(ext)) Uh... is

Re: svn commit: trunk/uClibc/libc/unistd

2008-06-05 Thread Bernd Schmidt
[EMAIL PROTECTED] wrote: Author: vda Date: 2008-05-20 13:32:27 -0700 (Tue, 20 May 2008) New Revision: 22027 Log: getopt: do not needlessly use static structure. Reorder structure members and change some of them into smallints to reduce bss and text: textdatabss dec hex

Re: elf2flt questions

2008-06-04 Thread Bernd Schmidt
Denys Vlasenko wrote: I want to do it in Linux from scratch style. This way, I will get better understanding of the way it is done, and possibly stumble upon rough edges in busybox, uclubc, etc. This will lead to itch scratching and bug fixing. It will also lead to unnecessary pain. elf

Re: [RFC] build system replacement

2008-06-03 Thread Bernd Schmidt
There appears to be one additional problem. Sometimes I get the following cycle: [EMAIL PROTECTED] /local/src/uclibc/bernds/uClibc $ make make[1]: `conf' is up to date. STRIP -X --strip-debug -R .note -R .comment lib/libpthread.a AR cr lib/libpthread.a [EMAIL PROTECTED]

Re: blackfin toolchain build question

2008-06-03 Thread Bernd Schmidt
Denys Vlasenko wrote: Are you building blackfin toolchain(s) too? Can you let me know exact version of binutils you use, and also full configure command line which you use? Do you set some special CFLAGS etc? Just use the buildscript, please. That ensures you get the same toolchain that

Re: svn commit: trunk/uClibc: extra/Configs include include/netinet i etc...

2008-06-03 Thread Bernd Schmidt
Bernhard Fischer wrote: - adds several config-options to allow for turning off certain features This seems a good way to reduce size. One additional idea I had recently was to add a config option to turn off non-reentrant functions where a reentrant version exists (e.g. gethostbyname vs

Re: svn commit: trunk/uClibc: include libc/inet libc/inet/rpc libc/mis etc...

2008-06-02 Thread Bernd Schmidt
Denys Vlasenko wrote: Thanks. The attached patch fixes it (I applied it to uclibc svn). These patches are not self-explanatory. Could you provide some information about the cause of the failures, and how your patches fix them? Bernd -- This footer brought to you by insane German lawmakers.

Re: [RFC] build system replacement

2008-05-31 Thread Bernd Schmidt
Denys Vlasenko wrote: None of include files are tracked, though. find -name '*.h' | xargs touch + make only runs oldconfig but does not rebuild any object files. That seems like a better reason to change things around. Bernd -- This footer brought to you by insane German lawmakers. Analog

Re: [RFC] build system replacement

2008-05-31 Thread Bernd Schmidt
Denys Vlasenko wrote: The new system I have worked on simplifies these Makefiles. A lot of this is just the klib-y trick, which could be done just as well in the existing system. I don't think simplifying the Makefiles should be a goal by itself, as they aren't all that complicated - maybe a

Re: [RFC] build system replacement

2008-05-31 Thread Bernd Schmidt
Denys Vlasenko wrote: As I said, I am not obsessed with build system replacement. I started it as a necessity because I was bitten several times with the modification of files not being detected. I thought that it is a sign that build system is not maintained and is bit rotting. After recent

Re: svn commit: trunk/uClibc/ldso/ldso

2008-05-30 Thread Bernd Schmidt
[EMAIL PROTECTED] wrote: - if (!(tpnt-init_flag RELOCS_DONE)) + if (!(tpnt-init_flag RELOCS_DONE)) { _dl_if_debug_dprint(relocation processing: %s\n, tpnt-libname); - + } Seems to me it would be better to fix the macro than all of its callers? Bernd -- This

Re: svn commit: trunk/uClibc/ldso/ldso

2008-05-30 Thread Bernd Schmidt
Bernhard Fischer wrote: So the only immediately annoying thing in ldso remains: ldso/ldso/dl-elf.c: In function '_dl_load_shared_library': ldso/ldso/dl-elf.c:201: warning: unused parameter 'tpnt' The solution in the gcc tree is to use __attribute__((unused)) for anything that may be unused

Re: [RFC] build system replacement

2008-05-29 Thread Bernd Schmidt
Denys Vlasenko wrote: I noticed that uclibc build system is broken. After I touch a file, running make won't rebuild it. As far as I can tell, only files that go into libc.so and not into libc.a, such as forward.c from libpthread, are affected. This seems to have been broken by revision

Re: __uc_malloc

2008-02-12 Thread Bernd Schmidt
Denys Vlasenko wrote: Before I apply this, I wanted to start a discussion about whether __uc_malloc is a good idea at all. Space savings are all well and good, but these come at a cost in reliability. There is no cost in reliability. Face it: if you have no free memory - you have no free

fork on nommu

2008-02-07 Thread Bernd Schmidt
A number of programs, such as busybox, contain calls to fork which may not necessarily get executed at runtime. On nommu systems, this currently produces link errors since the function doesn't exist. In our Blackfin tree, we use the following patch (by Mike IIRC) to convert the link error into a

Re: [PATCH] Fix dladdr return value when cannot find symbol

2008-02-07 Thread Bernd Schmidt
Carmelo AMOROSO wrote: based on the patch from Nickolai, here you can find a comprehensive patch to fix dladdr function. With the current implementation, the invocation of dladdr((void *) 1, dlinfo) will fill dlinfo.dli_fname with the name of the application itself and dlinfo.dli_fbase

RFC: multilib support for uClibc

2008-01-22 Thread Bernd Schmidt
For the Blackfin, we need to compile several versions of uClibc and install them in such a way that the cross compilers will find them. To do this, we've come up with the following patch (combined from multiple contributions by Jie Zhang, Mike Frysinger and myself). Essentially, this adds two

Re: RFC: multilib support for uClibc

2008-01-22 Thread Bernd Schmidt
Daniel Jacobowitz wrote: We don't have any lib/$(MULTILIB) directories; it was much simpler to put each into its own sysroot and it works nicely at runtime too. Okay.. what kind of multilibs do you have, and what's your directory structure? Maybe Mike or Jie could comment on why exactly we use

Re: [PATCH] Fix dladdr return value when cannot find symbol

2008-01-21 Thread Bernd Schmidt
Carmelo AMOROSO wrote: based on the patch from Nickolai, here you can find a comprehensive patch to fix dladdr function. With the current implementation, the invocation of dladdr((void *) 1, dlinfo) will fill dlinfo.dli_fname with the name of the application itself and dlinfo.dli_fbase

Re: svn commit: trunk/uClibc/ldso: include ldso ldso/bfin libdl

2007-12-06 Thread Bernd Schmidt
Carmelo AMOROSO wrote: I think that when nptl merge will be completed, we could use something like that: #if defined USE_TLS || defined __FDPIC__ #define HASH_EXTRA_TPNT #else #undef HASH_EXTRA_TPNT #endif and use it in _dl_find_hash wrapper. I'd much rather get rid of the ifdeffery

Re: FD-PIC patches for uClibc

2007-12-03 Thread Bernd Schmidt
No one made further comments regarding the second set of patches, so I've now made another pass over them to fix a few problems and style issues, and checked them in. A few minor issues remain to be resolved to get the Blackfin support 100% working, and the FRV needs attention as well. I'll be

Re: FD-PIC patches for uClibc

2007-12-01 Thread Bernd Schmidt
Carmelo Amoroso wrote: with the solution proposed into the nptl branch, you can keep the caller of _dl_find_hash always the same. Where the extra tpnt parameter is not required, independently from TLS or FDPIC code, like into ldso.c to lookup some function (malloc), you can safely pass NULL

Re: FD-PIC patches for uClibc

2007-11-29 Thread Bernd Schmidt
Carmelo Amoroso wrote: please have a look at the nptl branch where already is the updated _dl_find_hash for NPTL using the same extra parameter you need. There is also a wrapper around it as suggested by Jocke. I think there is a way to use the interface for nptl into your case. In these

Re: FD-PIC patches for uClibc

2007-11-27 Thread Bernd Schmidt
Joakim Tjernlund wrote: The 02_underscores patch is really ugly. Any suggestions how to improve it? remove _ syms from gcc would be best. Do you really need them? Yes. The assembly language isn't really parseable otherwise. Don't like the dl_find_hash_mod v.s dl_find_hash thingy. What do

Re: FD-PIC patches for uClibc

2007-11-27 Thread Bernd Schmidt
Joakim Tjernlund wrote: -Original Message- From: Bernd Schmidt [mailto:[EMAIL PROTECTED] Joakim Tjernlund wrote: The 02_underscores patch is really ugly. Any suggestions how to improve it? remove _ syms from gcc would be best. Do you really need them? Yes. The assembly language

FD-PIC patches for uClibc

2007-11-25 Thread Bernd Schmidt
These are the FD-PIC patches necessary to get ld.so working on the Blackfin. These were originally written by Alex Oliva for the FRV and updated to work with current uClibc sources by myself. I'm posting these for review; I intend to check them in in a few days if there are no objections. Note

Re: FD-PIC patches for uClibc

2007-11-25 Thread Bernd Schmidt
Joakim Tjernlund wrote: Did a quick scan of the patches and came up with these comments: While they tell me what you dislike, they don't really provide much in the way of alternatives. The 02_underscores patch is really ugly. Any suggestions how to improve it? Don't like the

Re: libpthread vs libc dynamic link order

2007-11-22 Thread Bernd Schmidt
Joakim Tjernlund wrote: -Original Message- From: Bernd Schmidt [mailto:[EMAIL PROTECTED] Sent: den 24 juni 2007 16:42 To: Joakim Tjernlund Cc: 'uClibc' Subject: Re: libpthread vs libc dynamic link order Joakim Tjernlund wrote: I never got the hang of the hidden_{proto,def} stuff

uClibc shared flat fixes

2007-11-22 Thread Bernd Schmidt
We have the following patches in our tree to improve shared flat support in uClibc for the Blackfin. * We want to use -mleaf-id-shared-library to compile libc (but only libc). This works best by setting PICFLAG to -mleaf-id-shared-library and using libc_so.a instead of libc.a in the link.

Re: uClibc shared flat fixes

2007-11-22 Thread Bernd Schmidt
Koen Kooi wrote: Bernd Schmidt schreef: We have the following patches in our tree to improve shared flat support in uClibc for the Blackfin. * We want to use -mleaf-id-shared-library to compile libc ( Which upstream gcc version(s) support that flag? This is only for the Blackfin, where

Re: libpthread vs libc dynamic link order

2007-06-24 Thread Bernd Schmidt
Joakim Tjernlund wrote: I never got the hang of the hidden_{proto,def} stuff. I think these are way overcomplex. I don't see anything complex about hidden_proto/def. All they do is create a hidden version of the symbol (e.g. __GI_pthread_cond_signal) and an exported alias