OSDN Git Service

uclinux-h8/uClibc.git
15 years agoBlackfin: fix incorrect attribute order
Mike Frysinger [Thu, 23 Jul 2009 09:02:41 +0000 (05:02 -0400)]
Blackfin: fix incorrect attribute order

The order of attributes in a function definition matters and in a few
places in the Blackfin code, it was being applied to the return type
instead of the function itself.

In file included from ldso/ldso/ldso.c:43:
ldso/ldso/bfin/elfinterp.c: At top level:
ldso/ldso/bfin/elfinterp.c:42: warning: '__visibility__' attribute ignored on non-class types

In file included from ldso/ldso/bfin/elfinterp.c:341,
                 from ldso/ldso/ldso.c:43:
libc/sysdeps/linux/bfin/crtreloc.c: At top level:
libc/sysdeps/linux/bfin/crtreloc.c:91: warning: 'visibility' attribute ignored on non-class types

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: add elf_machine_load_address() stub
Mike Frysinger [Thu, 23 Jul 2009 09:01:14 +0000 (05:01 -0400)]
Blackfin: add elf_machine_load_address() stub

The Blackfin port never defined elf_machine_load_address() because the one
place this code is called never matters to us.  But without it, common code
likes to hit a build failure, so stub it out.

ldso/ldso/dl-startup.c: In function '_dl_start':
ldso/ldso/dl-startup.c:170: warning: implicit declaration of function 'elf_machine_load_address'

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoldso: fix building for FDPIC systems
Mike Frysinger [Thu, 23 Jul 2009 08:58:56 +0000 (04:58 -0400)]
ldso: fix building for FDPIC systems

The force shareable code missed a spot of using the DL_RELOC_ADDR()
indirection thus leading to invalid operands:
ldso/ldso/ldso.c: In function '_dl_get_ready_to_run':
ldso/ldso/ldso.c:409: error: invalid operands to binary +
(have 'Elf32_Addr' and 'struct elf32_fdpic_loadaddr')

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agosilence warnings in Blackfin ldso code
Mike Frysinger [Thu, 23 Jul 2009 08:47:12 +0000 (04:47 -0400)]
silence warnings in Blackfin ldso code

In file included from ./ldso/include/ldso.h:135,
                 from ldso/ldso/ldso.c:34:
./ldso/ldso/bfin/dl-inlines.h: In function '__dl_init_loadaddr_map':
./ldso/ldso/bfin/dl-inlines.h:43: warning: assignment makes pointer from integer without a cast

In file included from ldso/ldso/ldso.c:43:
ldso/ldso/bfin/elfinterp.c: In function '_dl_do_lazy_reloc':
ldso/ldso/bfin/elfinterp.c:299: warning: assignment makes pointer from integer without a cast

ldso/ldso/ldso.c: In function '_dl_get_ready_to_run':
ldso/ldso/ldso.c:534: warning: assignment makes integer from pointer without a cast

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: add support for automatic loading of L2 SRAM regions
Jie Zhang [Tue, 2 Sep 2008 07:16:44 +0000 (07:16 +0000)]
Blackfin: add support for automatic loading of L2 SRAM regions

These match the kernel/etc... pieces already merged.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agodo not install bits/syscalls-common.h
Mike Frysinger [Thu, 23 Jul 2009 08:11:35 +0000 (04:11 -0400)]
do not install bits/syscalls-common.h

Since we stub out the installed bits/syscalls.h, the installed
bits/syscalls-common.h header is completely useless.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoadd more arch-specific include/ ignores
Mike Frysinger [Thu, 23 Jul 2009 08:08:17 +0000 (04:08 -0400)]
add more arch-specific include/ ignores

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agocreate real common vfork() function
Mike Frysinger [Thu, 23 Jul 2009 08:03:17 +0000 (04:03 -0400)]
create real common vfork() function

Rather than force people to always implement their own vfork(), have the
default implementation be sane.

For now, only the Blackfin port uses the new code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: no need to load P5 for shared FLAT
Jie Zhang [Thu, 12 Mar 2009 07:15:33 +0000 (07:15 +0000)]
Blackfin: no need to load P5 for shared FLAT

The register is already loaded for us upon entry by the kernel.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: fix generation of Scrt1.o for FDPIC
Jie Zhang [Sun, 4 Mar 2007 04:08:47 +0000 (04:08 +0000)]
Blackfin: fix generation of Scrt1.o for FDPIC

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: unify FDPIC/FLAT versions of clone
Mike Frysinger [Wed, 22 Jul 2009 16:51:54 +0000 (12:51 -0400)]
Blackfin: unify FDPIC/FLAT versions of clone

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoignore gdb/debugging files
Mike Frysinger [Wed, 22 Jul 2009 09:52:11 +0000 (05:52 -0400)]
ignore gdb/debugging files

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoadd hidden aliases for openat funcs
Mike Frysinger [Wed, 22 Jul 2009 05:48:08 +0000 (01:48 -0400)]
add hidden aliases for openat funcs

openat64() uses openat(), so we need hidden aliases for it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoadd hidden aliases for ntoh/hton functions
Mike Frysinger [Wed, 22 Jul 2009 05:44:38 +0000 (01:44 -0400)]
add hidden aliases for ntoh/hton functions

Sometimes references for these functions show up (like when debugging is
enabled), so add hidden aliases for them if needed.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agolinuxthreads.old: fix crash in debug code
Mike Frysinger [Wed, 22 Jul 2009 03:33:57 +0000 (23:33 -0400)]
linuxthreads.old: fix crash in debug code

If pthread_join() is called and there is nothing to join, then the debug
code will attempt to dereference a NULL pointer.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agolibpthread: add format attribute to __pthread_message()
Mike Frysinger [Wed, 22 Jul 2009 03:13:46 +0000 (23:13 -0400)]
libpthread: add format attribute to __pthread_message()

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agobyteswap: unify common definitions
Mike Frysinger [Mon, 20 Jul 2009 20:38:30 +0000 (16:38 -0400)]
byteswap: unify common definitions

The majority of the byteswap functions are the same across all arches, so
setup a common header to provide definitions if they don't exist.  This
allows arches to override only the ones they actually want to implement
with inline assembly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agos/UCLIBC_INTERNAL/_LIBC/g
Denys Vlasenko [Tue, 21 Jul 2009 18:09:13 +0000 (20:09 +0200)]
s/UCLIBC_INTERNAL/_LIBC/g

Undo my old mistake. I added UCLIBC_INTERNAL define,
but later I realized _LIBC is doing exactly the same thing.

This change converts all usages of UCLIBC_INTERNAL to _LIBC,
removing all instances of UCLIBC_INTERNAL.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agocorrected typo
Denys Vlasenko [Tue, 21 Jul 2009 18:08:24 +0000 (20:08 +0200)]
corrected typo

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agolibc/string/i386/string.h: fix -O0 build failure
Denys Vlasenko [Tue, 21 Jul 2009 13:44:39 +0000 (15:44 +0200)]
libc/string/i386/string.h: fix -O0 build failure

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoIt fixes the following warnings seen on mips build.
Khem Raj [Mon, 20 Jul 2009 20:41:28 +0000 (13:41 -0700)]
It fixes the following warnings seen on mips build.

libc/sysdeps/linux/mips/clone.S: Assembler messages:
libc/sysdeps/linux/mips/clone.S:122: Warning: No .frame pseudo-op used in PIC code
libc/sysdeps/linux/mips/clone.S:75: Warning: Pretending global symbol used as branch target is local.

libc/sysdeps/linux/mips/crt1.S: Assembler messages:
libc/sysdeps/linux/mips/crt1.S:134: Warning: No .cprestore pseudo-op used in PIC code

Signed-off-by: Khem Raj <raj.khem@gmail.com>
15 years agoavr32/microblaze/vax: punt local byteswap.h
Mike Frysinger [Mon, 20 Jul 2009 20:37:30 +0000 (16:37 -0400)]
avr32/microblaze/vax: punt local byteswap.h

These arches are generic C implementations of the byteswap functions, so
rather than keep a useless local copy, use the common C one.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agosyscall: convert cris/hppa to common syscalls
Mike Frysinger [Mon, 20 Jul 2009 19:24:38 +0000 (15:24 -0400)]
syscall: convert cris/hppa to common syscalls

The cris/hppa code appears to be easy to convert, so go ahead and do it
for them.  Build tested only.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoMAKEALL: find kernel headers better
Mike Frysinger [Mon, 20 Jul 2009 19:23:26 +0000 (15:23 -0400)]
MAKEALL: find kernel headers better

Work with pre-sysroot compilers that have kernel headers available in the
standard location, and let people force the location manually.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agosome ports define ENOTSUP
Mike Frysinger [Mon, 20 Jul 2009 19:22:33 +0000 (15:22 -0400)]
some ports define ENOTSUP

A port or two (like hppa) does define ENOTSUP, so don't assume that
everyone needs this fallback define.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoINLINE_SYSCALL_NCS: scope out local vars to avoid conflicts
Mike Frysinger [Mon, 20 Jul 2009 19:04:54 +0000 (15:04 -0400)]
INLINE_SYSCALL_NCS: scope out local vars to avoid conflicts

The INLINE_SYSCALL_NCS() macro was using "res" and "err" as local variable
names, but this caused conflicts with some code (like clock_getres) whose
arguments were named the same.

libc/sysdeps/linux/common/clock_getres.c: In function 'clock_getres':
libc/sysdeps/linux/common/clock_getres.c:15: warning: 'res' is used uninitialized in this function

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agolinuxthreads.old: extend workaround for asm rename warnings
Mike Frysinger [Mon, 20 Jul 2009 18:57:24 +0000 (14:57 -0400)]
linuxthreads.old: extend workaround for asm rename warnings

The libc_pthread_init.c needs the include workaround like forward.c, and
forward.c needs more includes now.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agofix building for systems w/out ldso support
Mike Frysinger [Mon, 20 Jul 2009 18:05:44 +0000 (14:05 -0400)]
fix building for systems w/out ldso support

If an arch (like alpha and others) have no ldso support at all, then there
is no point in attempting to walk loaded modules in the dl-* helper funcs.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoalpha: fix building with no asm/elf.h
Mike Frysinger [Mon, 20 Jul 2009 17:54:41 +0000 (13:54 -0400)]
alpha: fix building with no asm/elf.h

The latest sanitized linux kernel headers no longer export asm/elf.h, so do
not rely on it anymore.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agofdatasync: handle latest alpha syscalls
Mike Frysinger [Mon, 20 Jul 2009 17:52:26 +0000 (13:52 -0400)]
fdatasync: handle latest alpha syscalls

The latest alpha Linux kernel defines __NR_fdatasync like everyone else and
deprecates the older __NR_osf_fdatasync, so support that setup.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoalpha/sigprocmask: fix implicit memset() prototype
Mike Frysinger [Mon, 20 Jul 2009 17:50:48 +0000 (13:50 -0400)]
alpha/sigprocmask: fix implicit memset() prototype

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agofirst pass at implementing *at funcs
Mike Frysinger [Mon, 20 Jul 2009 17:36:52 +0000 (13:36 -0400)]
first pass at implementing *at funcs

Tested basic functionality with coreutils and things seem to work.  At
least gives us a basis to jump from.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agosync a few headers with glibc (no functional changes)
Mike Frysinger [Mon, 20 Jul 2009 17:34:16 +0000 (13:34 -0400)]
sync a few headers with glibc (no functional changes)

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agodirent: push dirent type to prototypes
Mike Frysinger [Mon, 20 Jul 2009 17:19:36 +0000 (13:19 -0400)]
dirent: push dirent type to prototypes

This syncs the dirent related functions with the glibc behavior -- rather
than take void pointers everywhere, make the struct dirent pointers
explicit in the API.  After all, the functions themselves will cast the
pointers to a dirent structure, so if it isn't as expected, people will
crash.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agostring: only include inline-asm if UCLIBC_HAS_STRING_ARCH_OPT
Mike Frysinger [Mon, 20 Jul 2009 17:17:38 +0000 (13:17 -0400)]
string: only include inline-asm if UCLIBC_HAS_STRING_ARCH_OPT

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoregex: convert #if to #ifdef
Mike Frysinger [Mon, 20 Jul 2009 17:09:55 +0000 (13:09 -0400)]
regex: convert #if to #ifdef

Avoid gcc warnings about #if statements with defines that aren't defined.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoadd a wchar.h stub
Mike Frysinger [Mon, 20 Jul 2009 17:07:38 +0000 (13:07 -0400)]
add a wchar.h stub

The basic C standard requires a few wchar types, so provide those even when
wchar support is disabled.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agomknod: convert to INLINE_SYSCALL() to sync with glibc
Mike Frysinger [Mon, 20 Jul 2009 14:50:49 +0000 (10:50 -0400)]
mknod: convert to INLINE_SYSCALL() to sync with glibc

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agonote that we do not want hidden malloc aliases
Mike Frysinger [Mon, 20 Jul 2009 13:03:29 +0000 (09:03 -0400)]
note that we do not want hidden malloc aliases

We want to let malloc() and friends be overridable at runtime so that apps
can insert their own implementation (think debugging, specialized setups,
etc...).  That means that C library functions that return allocated memory
have to go through the normal malloc() symbol as well as the external code
is the one who will be calling free().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agofix typo in frv endian comment
Mike Frysinger [Mon, 20 Jul 2009 12:35:53 +0000 (08:35 -0400)]
fix typo in frv endian comment

Reported-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agorelocate i386 string.h to i386-specific dir
Mike Frysinger [Mon, 20 Jul 2009 12:08:30 +0000 (08:08 -0400)]
relocate i386 string.h to i386-specific dir

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agostart ignoring include/ symlinks
Mike Frysinger [Mon, 20 Jul 2009 12:08:15 +0000 (08:08 -0400)]
start ignoring include/ symlinks

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agounifdef: implement err.h funcs locally
Mike Frysinger [Mon, 20 Jul 2009 11:32:40 +0000 (07:32 -0400)]
unifdef: implement err.h funcs locally

Since the err.h functions are optional in uClibc, make sure we can rebuild
ourselves if support is disabled.

URL: https://bugs.busybox.net/show_bug.cgi?id=257
Reported-by: Michael Deutschmann <michael@talamasca.ocis.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoppoll: switch to INLINE_SYSCALL() to match glibc
Mike Frysinger [Mon, 20 Jul 2009 11:16:39 +0000 (07:16 -0400)]
ppoll: switch to INLINE_SYSCALL() to match glibc

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoadd hidden aliases for older regex search functions
Mike Frysinger [Mon, 20 Jul 2009 09:42:31 +0000 (05:42 -0400)]
add hidden aliases for older regex search functions

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoinstall_headers: convert header removal to Kbuild style
Mike Frysinger [Wed, 15 Jul 2009 23:50:23 +0000 (19:50 -0400)]
install_headers: convert header removal to Kbuild style

Convert the large if...$(RM)...endif style to standard Kbuild foo-$(...) +=
style to make the list much easier to review and update.

This is largely a style change, but in the process, these two headers are
added to the "always remove" list: tls.h and uClibc_errno.h

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agouse -EB/-EL for all targets
Mike Frysinger [Wed, 15 Jul 2009 14:35:41 +0000 (10:35 -0400)]
use -EB/-EL for all targets

These are common linker options rather than target specific ones, so they
should be safe to use for all targets.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoFix ARM syscall argument loading.
Joseph Myers [Tue, 14 Jul 2009 15:52:27 +0000 (15:52 +0000)]
Fix ARM syscall argument loading.

This patch is a uClibc equivalent of
<http://sourceware.org/ml/libc-ports/2008-11/msg00006.html>, to
compute all syscall arguments on ARM in temporary variables before
loading them into register variables.  The principle is as for that
glibc patch; the problem I actually observed was a GCC internal
compiler error building ld.so for Thumb-2.

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
15 years agosh: Fix up optimized SH-4 memcpy on big endian.
Giuseppe Cavallaro [Mon, 13 Jul 2009 15:45:09 +0000 (17:45 +0200)]
sh: Fix up optimized SH-4 memcpy on big endian.

Signed-off-by: Hideo Saito <saito@densan.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
See Linux Kernel commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e08b954c9a140f2062649faec72514eb505f18c3
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
15 years agosyscall(): create a common version based on INLINE_SYSCALL_NCS()
Mike Frysinger [Thu, 9 Jul 2009 19:10:56 +0000 (15:10 -0400)]
syscall(): create a common version based on INLINE_SYSCALL_NCS()

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agosyscall: unify part 2: NCS variety
Mike Frysinger [Thu, 9 Jul 2009 19:09:29 +0000 (15:09 -0400)]
syscall: unify part 2: NCS variety

Declare common NCS (non-constant syscall) variants and convert the existing
ports over to this.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoMAKEALL: expand cross-compiler arch search
Mike Frysinger [Thu, 9 Jul 2009 18:27:59 +0000 (14:27 -0400)]
MAKEALL: expand cross-compiler arch search

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agosh: Change __HAVE_SHARED__ to __PIC__
Peter Griffin [Wed, 29 Apr 2009 11:02:47 +0000 (12:02 +0100)]
sh: Change __HAVE_SHARED__ to __PIC__

Generate PIC relocations when __PIC__ is defined rather than
__HAVE_SHARED__ (like other architectures).

Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
15 years agoignore generated .i files
Mike Frysinger [Thu, 9 Jul 2009 01:32:45 +0000 (21:32 -0400)]
ignore generated .i files

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agodrop missing {INLINE,INTERNAL}_SYSCALL fallback logic
Mike Frysinger [Sun, 5 Jul 2009 22:30:04 +0000 (18:30 -0400)]
drop missing {INLINE,INTERNAL}_SYSCALL fallback logic

Ports missing INLINE_SYSCALL() support need to get fixed, so drop the cruft
keeping them alive since it no longer works with the unification.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agosyscall: unify common syscall defines
Mike Frysinger [Fri, 3 Jul 2009 20:44:59 +0000 (16:44 -0400)]
syscall: unify common syscall defines

Unify all the common syscall defines in syscalls-common.h and scrub all
the duplicated code from relevant ports.  This should also make converting
existing ports to INLINE_SYSCALL() much easier as they don't have to get
lost in all the unrelated noise, as well as creating new ports.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agosparc: Update syscalls.h to define INTERNAL_SYSCALL
Austin Foxley [Mon, 6 Jul 2009 17:12:11 +0000 (10:12 -0700)]
sparc: Update syscalls.h to define INTERNAL_SYSCALL

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
15 years agoMAKEALL: start a quick build test helper script
Mike Frysinger [Sun, 5 Jul 2009 22:29:46 +0000 (18:29 -0400)]
MAKEALL: start a quick build test helper script

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoAvoid type-punned pointers that break strict-aliasing
Ron [Fri, 26 Jun 2009 19:14:28 +0000 (04:44 +0930)]
Avoid type-punned pointers that break strict-aliasing

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoAvoid warnings about shifting more bits than we have
Ron [Fri, 26 Jun 2009 19:14:27 +0000 (04:44 +0930)]
Avoid warnings about shifting more bits than we have

The test here is a constant expression and will compile out.
For platforms that don't need the shift the code gets slightly smaller
and simpler, for those that do the result is unchanged.

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoDon't shadow the chroot global
Ron [Fri, 26 Jun 2009 19:14:26 +0000 (04:44 +0930)]
Don't shadow the chroot global

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoDon't shadow the mask parameter with a local variable in the same function
Ron [Fri, 26 Jun 2009 19:14:25 +0000 (04:44 +0930)]
Don't shadow the mask parameter with a local variable in the same function

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoDon't shadow stat with a local variable
Ron [Fri, 26 Jun 2009 19:14:24 +0000 (04:44 +0930)]
Don't shadow stat with a local variable

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoDon't shadow the err() function with a local var
Ron [Fri, 26 Jun 2009 19:14:23 +0000 (04:44 +0930)]
Don't shadow the err() function with a local var

gcc-4.4 barks about that.

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoAdd a few missing includes
Ron [Fri, 26 Jun 2009 19:14:22 +0000 (04:44 +0930)]
Add a few missing includes

elf.h needs __BYTE_ORDER, and s_scalbn.c needs {LONG,INT}_MAX.
shm.c complains about no prototypes for shm_{open,unlink} without its header.

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoCheck #if feature test macros are defined where they may not be
Ron [Fri, 26 Jun 2009 19:14:21 +0000 (04:44 +0930)]
Check #if feature test macros are defined where they may not be

Once again all of these reduce the noise from gcc-4.4.
Replaces a few more (USE_TLS && HAVE___THREAD) with USE___THREAD while we need
to mess with them for this anyhow.

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoProvide token prototypes for functions that are external but have no header
Ron [Fri, 26 Jun 2009 19:14:20 +0000 (04:44 +0930)]
Provide token prototypes for functions that are external but have no header

This cuts down on a lot of noise from gcc-4.4

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoMake more utility functions static
Ron [Fri, 26 Jun 2009 19:14:19 +0000 (04:44 +0930)]
Make more utility functions static

This keeps gcc-4.4 from nagging that they have no prototypes.

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoAdd noreturn attributes to some functions that won't ever do so
Ron [Fri, 26 Jun 2009 19:14:18 +0000 (04:44 +0930)]
Add noreturn attributes to some functions that won't ever do so

usage() is also made static in answer to warnings about no prototype.
In __pthread_manager_event() we also have to drop the return statement,
else gcc will in turn complain about a non-returning function having one.

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoMove extern prototype out of function scope
Ron [Fri, 26 Jun 2009 19:14:17 +0000 (04:44 +0930)]
Move extern prototype out of function scope

gcc-4.4 now barks about this, so appease it.

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoAdd some missing printf/scanf format attributes
Ron [Fri, 26 Jun 2009 19:14:16 +0000 (04:44 +0930)]
Add some missing printf/scanf format attributes

The gcc-4.4 documentation still suggests that the compiler will automatically
do format checking for the standard format function prototypes, but it is now
also barking warnings suggesting that we add them for this lot too. So added.

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agouse -isystem with gcc paths
Mike Frysinger [Sun, 5 Jul 2009 20:50:27 +0000 (16:50 -0400)]
use -isystem with gcc paths

Use -isystem to include gcc header paths rather than -I as these are system
paths, not uClibc specific paths.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoi386: store errno value before using __set_errno()
Ingo van Lil [Thu, 4 Jun 2009 12:33:34 +0000 (14:33 +0200)]
i386: store errno value before using __set_errno()

The __syscall_error() function stores the errno value in the edx register
before invoking the __set_errno() macro.  When using the pthread library
this macro calls thread_self() to determine the errno location, which might
clobber the edx register.  The errno value must be stored in a "real"
variable so the compiler can take care of saving/restoring it if necessary.

Signed-off-by: Ingo van Lil <inguin@gmx.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoignore generated unifdef
Mike Frysinger [Fri, 3 Jul 2009 19:16:00 +0000 (15:16 -0400)]
ignore generated unifdef

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agouClibc_arch_features: sync defines between ports
Mike Frysinger [Fri, 3 Jul 2009 04:43:23 +0000 (00:43 -0400)]
uClibc_arch_features: sync defines between ports

Make sure each arch has the same complete list to make comparing between
them easier.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoMerge branch 'master' of git://uclibc.org/uClibc
Mike Frysinger [Fri, 3 Jul 2009 04:28:18 +0000 (00:28 -0400)]
Merge branch 'master' of git://uclibc.org/uClibc

15 years agoadd testcases for shm_{open,unlink}
Bernhard Reutner-Fischer [Thu, 2 Jul 2009 22:20:19 +0000 (00:20 +0200)]
add testcases for shm_{open,unlink}

Reported-by: Mikael Lund Jepsen <mlj@iccc.dk>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
15 years agosh: add cacheflush syscall wrapper
Carmelo Amoroso [Thu, 2 Jul 2009 09:02:13 +0000 (11:02 +0200)]
sh: add cacheflush syscall wrapper

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
15 years agoCorrect ARM memcpy comments.
Joseph Myers [Wed, 1 Jul 2009 14:37:15 +0000 (14:37 +0000)]
Correct ARM memcpy comments.

The comments on register usage in ARM memcpy had dest and src the
wrong way round; this patch (originally from Mark Shinwell) corrects
this and adds a note on the return value.

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
15 years agoFix Thumb-2 setjmp.
Joseph Myers [Tue, 30 Jun 2009 21:20:26 +0000 (21:20 +0000)]
Fix Thumb-2 setjmp.

Many Thumb-2 instructions cannot use sp or pc as operands, and the
assembler now diagnoses these.  setjmp had one such instruction, movs;
this patch changes it to mov.

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
15 years agoFix Thumb-2 memcpy.
Joseph Myers [Tue, 30 Jun 2009 21:16:56 +0000 (21:16 +0000)]
Fix Thumb-2 memcpy.

When an IT block was changed from having two instructions to having
one, the IT instruction at the start of the block was not updated,
causing memcpy to fail to assemble for Thumb-2; this patch makes the
obvious fix.

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
15 years agoAdd missing CLIBABI variables __aeabi_stdin, __aeabi_stdout, __aeabi_stderr.
Joseph Myers [Sun, 28 Jun 2009 23:48:09 +0000 (23:48 +0000)]
Add missing CLIBABI variables __aeabi_stdin, __aeabi_stdout, __aeabi_stderr.

The ARM EABI has a document CLIBABI specifying various __aeabi_*
functions and variables to be provided for the use of portable objects
that can be linked with different EABI-conforming C libraries.
__aeabi_stdin, __aeabi_stdout and __aeabi_stderr were missing in
uClibc; this patch (originally from Nathan Froyd and for glibc) adds
them.

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
15 years agolocale: gen_wc8bit: try to find UTF8 locale automatically
Mike Frysinger [Sun, 28 Jun 2009 18:43:01 +0000 (14:43 -0400)]
locale: gen_wc8bit: try to find UTF8 locale automatically

Rather than require everyone to have en_US.UTF-8 when we really need any
UTF8 locale, do a scan for possible UTF8 locales if the default en_US does
not exist.  Hopefully this should make the utility "just work" for most
people.

Reported-by: Daniel Cordero <theappleman@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agostop installing/screwing with linux-headers
Mike Frysinger [Sun, 28 Jun 2009 17:56:00 +0000 (13:56 -0400)]
stop installing/screwing with linux-headers

It is not uClibc's business to make sure the user's toolchain is sane and
has proper kernel headers configured/installed.  If they don't, then they
need to fix their toolchain, we don't need to try and magically do it for
them.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoadd gitignore for utils
Mike Frysinger [Sun, 28 Jun 2009 17:53:21 +0000 (13:53 -0400)]
add gitignore for utils

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agowchar: fix inverted parameters in error message
André Goddard Rosa [Tue, 2 Jun 2009 12:36:28 +0000 (09:36 -0300)]
wchar: fix inverted parameters in error message

The error message should output "fromcode -> tocode" rather than
"tocode -> fromcode".  Seems to be a typo due to the order of the func
called:
iconv_t iconv_open(const char *tocode, const char *fromcode);

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agolibc.so: include all output formats in linker script
Steve Bennett [Sun, 28 Jun 2009 17:16:42 +0000 (13:16 -0400)]
libc.so: include all output formats in linker script

Rather than ripping out the default output format from the linker, include
the big/little endian alternatives for the people who link with bi-endian
toolchains.

URL: http://lists.uclibc.org/pipermail/uclibc/2009-June/042595.html
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoutils: punt readelf
Mike Frysinger [Sun, 28 Jun 2009 17:00:02 +0000 (13:00 -0400)]
utils: punt readelf

This miniature version of readelf has never been terribly useful and has
caused significantly more headaches in its maintenance, so punt it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoinclude errno.h unconditionally
Bernhard Reutner-Fischer [Tue, 2 Jun 2009 15:58:58 +0000 (17:58 +0200)]
include errno.h unconditionally

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
15 years agoadd stub for shm_open() and shm_unlink
Bernhard Reutner-Fischer [Tue, 2 Jun 2009 14:53:24 +0000 (16:53 +0200)]
add stub for shm_open() and shm_unlink

  Untested and needs testsuite exercise added

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
15 years agoBlackfin: make sure all relocs are uppercase
Mike Frysinger [Tue, 2 Jun 2009 00:27:45 +0000 (20:27 -0400)]
Blackfin: make sure all relocs are uppercase

This is to match changes in the toolchain.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agowaitid: linux ABI takes 5 args, not 4
Mike Frysinger [Wed, 27 May 2009 23:32:18 +0000 (19:32 -0400)]
waitid: linux ABI takes 5 args, not 4

The POSIX waitid() takes 4 args, but the Linux one takes 5 args, so make
sure we stuff the 5th arg with a NULL.  Otherwise garbage gets randomly
passed up and considering this is a pointer, that's baaaad.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agotweak .gitignore
Bernhard Reutner-Fischer [Wed, 27 May 2009 21:00:25 +0000 (23:00 +0200)]
tweak .gitignore

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
15 years agoAdd working pipe implementation for sparc
Austin Foxley [Tue, 26 May 2009 22:35:16 +0000 (15:35 -0700)]
Add working pipe implementation for sparc

Also get rid of warning in sparc sigaction

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
15 years agofix compilation of linuxthreads for sparc64
Austin Foxley [Thu, 21 May 2009 20:53:53 +0000 (13:53 -0700)]
fix compilation of linuxthreads for sparc64

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
15 years agoAdd a sigaction implementation for sparc
Austin Foxley [Thu, 21 May 2009 01:05:24 +0000 (18:05 -0700)]
Add a sigaction implementation for sparc

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
15 years agoMerge branch 'master' of git+ssh://carmelo@git.uclibc.org/git/uClibc
Carmelo Amoroso [Tue, 5 May 2009 17:15:27 +0000 (19:15 +0200)]
Merge branch 'master' of git+ssh://carmelo@git.uclibc.org/git/uClibc

15 years agoAdd position independent code for crt1.S.
Carmelo Amoroso [Tue, 5 May 2009 17:07:03 +0000 (19:07 +0200)]
Add position independent code for crt1.S.
This will generate a Scrt1.o that is linked to executabled
when compiled as PIE code (position independent executable) without
requiring relocation in .text section (not allowed on uclibc/sh4).

Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
15 years agoAdd .gitignore
Austin Foxley [Tue, 5 May 2009 14:59:19 +0000 (07:59 -0700)]
Add .gitignore

ignore most of the build output

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
15 years agosh: Fix FPU config option
Peter Griffin [Wed, 29 Apr 2009 10:04:00 +0000 (11:04 +0100)]
sh: Fix FPU config option

Change to UCLIBC_HAS_FPU because UCLIBC_HAS_FLOATS can be used with
UCLIBC_HAS_SOFT_FLOAT option.