uclibc: Add uclibc 0.9.32(to be)

In addition to stock OE uclibc it has more
Add argp support
Add x86_64 arch support
Only NPTL is supported for threading

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2011-03-24 03:09:08 -07:00
parent 3db8829a08
commit 48be1406a0
42 changed files with 10651 additions and 0 deletions

View File

@ -0,0 +1,474 @@
a64l
abs
access
__adjtimex
alarm
alphasort
argz_append
__argz_count
argz_create_sep
argz_insert
__argz_next
argz_next
__argz_stringify
argz_stringify
asprintf
atexit
atof
atoi
bcmp
bcopy
bindresvport
bind_textdomain_codeset
btowc
bzero
calloc
canonicalize_file_name
catgets
cfgetospeed
cfsetispeed
cfsetspeed
chmod
chown
chroot
clock
close
closedir
closelog
confstr
connect
daemon
dcgettext
difftime
dirfd
dirname
dngettext
dup2
ecvt
endgrent
endmntent
endpwent
endutent
endutxent
epoll_ctl
err
ether_hostton
ether_ntohost
euidaccess
execv
fchdir
fchmod
fchmodat
fchown
fchownat
fcntl
fcvt
fdatasync
fdopendir
feof_unlocked
fgets_unlocked
fgetxattr
finite
flistxattr
flock
flockfile
fnmatch
fork
fpathconf
__fpending
fprintf
free
freeaddrinfo
freeifaddrs
fseeko
__fsetlocking
fsetxattr
fstat64
fstat
fstatfs
fsync
ftello
ftime
ftruncate
funlockfile
futimes
futimesat
gai_strerror
gcvt
getaddrinfo
getc_unlocked
getcwd
getdelim
getdomainname
getdtablesize
getegid
getenv
geteuid
getgid
getgrent
getgrent_r
getgrgid_r
getgrnam
getgrnam_r
getgrouplist
getgroups
gethostbyaddr_r
gethostbyname2
gethostbyname
gethostbyname_r
gethostent
gethostid
gethostname
getifaddrs
getline
getloadavg
getmntent
getmsg
getnameinfo
getnetbyaddr_r
getnetgrent_r
getopt
getopt_long
getopt_long_only
getpagesize
getpass
getpeername
getpgrp
getpid
getppid
getprotoent_r
getpwent
getpwent_r
getpwnam
getpwnam_r
getpwuid
getpwuid_r
getresuid
getrlimit
getrusage
getservbyname
getservbyname_r
getservbyport_r
getservent
getservent_r
getspnam
getspnam_r
gettimeofday
getttyent
getttynam
getuid
getusershell
getutent
getutid
getutline
getutmp
getutmpx
getutxent
getutxid
getutxline
getwd
getxattr
glob
gmtime
gmtime_r
grantpt
group_member
herror
hstrerror
iconv
iconv_open
if_freenameindex
if_indextoname
if_nameindex
if_nametoindex
index
inet_addr
inet_aton
inet_ntoa
inet_ntop
inet_pton
initgroups
innetgr
iruserok
isascii
isatty
isblank
isgraph
isinf
isnan
isprint
isspace
iswalnum
iswcntrl
iswctype
iswprint
iswspace
iswupper
isxdigit
kill
killpg
lchown
lckpwdf
lgetxattr
link
listxattr
llistxattr
localtime
localtime_r
lockf
lrand48
lsearch
lseek64
lsetxattr
lstat
mallinfo
malloc
mblen
mbrlen
mbrtowc
mbsinit
mbsrtowcs
mbtowc
memalign
memchr
memcmp
memcpy
memmove
mempcpy
memrchr
memset
mkdir
mkdirat
mkdtemp
mkfifo
mknod
mkstemp64
mkstemp
mktime
mlock
mmap
mtrace
munlock
munmap
nanosleep
nice
nl_langinfo
ntp_adjtime
ntp_gettime
_obstack_free
on_exit
open64
open
openat
opendir
openlog
pathconf
pipe
poll
popen
posix_memalign
prctl
pread
printf
__progname
pselect
pthread_mutex_lock
ptsname
putenv
putgrent
putpwent
putspent
pututline
pututxline
putwc
pwrite
qsort
raise
rand
random
rand_r
read
readdir
readdir_r
readlink
realloc
realpath
re_comp
recvmsg
re_exec
regcomp
regexec
remove
rename
re_search
rmdir
rpmatch
rresvport_af
ruserok
ruserok_af
sbrk
scandir
sched_setscheduler
sched_yield
__secure_getenv
select
semctl
semget
sendmsg
setbuf
setbuffer
setegid
setenv
seteuid
setgid
setgroups
sethostname
setitimer
_setjmp
setjmp
setlinebuf
setlocale
setmntent
setpgid
setpgrp
setpriority
setregid
setresgid
setresuid
setreuid
setrlimit
setsid
setsockopt
settimeofday
setuid
setutent
setutxent
setvbuf
setxattr
sgetspent
shmat
shmctl
shmdt
shmget
shutdown
sigaction
sigaddset
sigaltstack
sigblock
sigemptyset
sighold
siginterrupt
signal
sigprocmask
sigset
sigsetmask
sigstack
sigsuspend
sigvec
snprintf
socket
socketpair
sprintf
srand48
srand
srandom
sscanf
stat
statfs
statvfs
stime
stpcpy
strcasecmp
strcasestr
strchr
strchrnul
strcmp
strcspn
strdup
strerror
strerror_r
strftime
strlen
strncasecmp
strncmp
strndup
strnlen
strpbrk
strptime
strrchr
strsep
strsignal
strspn
strstr
strtod
strtoimax
strtok_r
strtol
strtoll
strtoul
strtoull
strtoumax
strverscmp
strxfrm
symlink
sync
sysconf
sysctl
sysinfo
syslog
_sys_siglist
sys_siglist
system
tcgetattr
tcgetpgrp
tcsetattr
tcsetpgrp
time
timegm
times
timezone
tmpnam
towlower
towupper
truncate
tsearch
ttyname
tzset
ulimit
umask
uname
unlink
unsetenv
unshare
updwtmp
updwtmpx
usleep
ustat
utime
utimes
utmpname
utmpxname
valloc
vasprintf
verrx
vfork
vfprintf
vfscanf
vhangup
vprintf
vsnprintf
vsprintf
wait3
wait4
waitpid
wcrtomb
wcscoll
wcsdup
wcslen
wctob
wctomb
wctype
wcwidth
wmemchr
wmemcpy
wmempcpy

View File

@ -0,0 +1,156 @@
aio.h
alloca.h
argz.h
arpa/inet.h
arpa/nameser.h
asm/byteorder.h
asm/ioctls.h
asm/page.h
asm/types.h
assert.h
byteswap.h
crypt.h
ctype.h
dirent.h
dlfcn.h
elf.h
endian.h
err.h
errno.h
execinfo.h
fcntl.h
features.h
float.h
fstab.h
ftw.h
getopt.h
glob.h
grp.h
iconv.h
ifaddrs.h
inttypes.h
langinfo.h
lastlog.h
libgen.h
libintl.h
limits.h
linux/capability.h
linux/fd.h
linux/fs.h
linux/hayesesp.h
linux/hdreg.h
linux/icmp.h
linux/in6.h
linux/joystick.h
linux/ptrace.h
linux/serial.h
linux/sonypi.h
linux/unistd.h
linux/utsname.h
linux/version.h
locale.h
malloc.h
math.h
mcheck.h
memory.h
mntent.h
mqueue.h
netdb.h
net/if.h
netinet/ether.h
netinet/in.h
netinet/ip6.h
netinet/ip.h
netinet/tcp.h
netinet/udp.h
netipx/ipx.h
net/route.h
paths.h
poll.h
pthread.h
pty.h
pwd.h
regex.h
resolv.h
rpc/rpc.h
rpc/types.h
sched.h
scsi/scsi.h
search.h
semaphore.h
setjmp.h
sgtty.h
shadow.h
signal.h
stdarg.h
stdbool.h
stdc
stddef.h
stdint.h
stdio.h
stdlib.h
string.h
strings.h
stropts.h
sys/bitypes.h
sys/cdefs.h
sys/dir.h
sys/epoll.h
sysexits.h
sys/fcntl.h
sys/file.h
sys/fsuid.h
sys/ioctl.h
sys/ipc.h
syslog.h
sys/mman.h
sys/mount.h
sys/mtio.h
sys/param.h
sys/poll.h
sys/prctl.h
sys/ptrace.h
sys/queue.h
sys/reg.h
sys/resource.h
sys/select.h
sys/sem.h
sys/shm.h
sys/signal.h
sys/socket.h
sys/socketvar.h
sys/soundcard.h
sys/statfs.h
sys/stat.h
sys/statvfs.h
sys/stropts.h
sys/swap.h
sys/sysctl.h
sys/sysinfo.h
sys/sysmacros.h
sys/termios.h
sys/timeb.h
sys/time.h
sys/times.h
sys/timex.h
sys/types.h
sys/uio.h
sys/un.h
sys/unistd.h
sys/user.h
sys/utsname.h
sys/vfs.h
sys/wait.h
termio.h
termios.h
time.h
ttyent.h
ulimit.h
unistd.h
ustat.h
utime.h
utmp.h
utmpx.h
values.h
wchar.h
wctype.h

View File

@ -0,0 +1,21 @@
char
char *
double
float
int
long
long double
long int
long long
long long int
short
short int
signed char
unsigned char
unsigned int
unsigned long
unsigned long int
unsigned long long int
unsigned short
unsigned short int
void *

View File

@ -0,0 +1,157 @@
#
# General Library Settings
#
# HAVE_NO_PIC is not set
# DOPIC is not set
# HAVE_NO_SHARED is not set
# ARCH_HAS_NO_LDSO is not set
HAVE_SHARED=y
# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
LDSO_LDD_SUPPORT=y
LDSO_CACHE_SUPPORT=y
# LDSO_PRELOAD_FILE_SUPPORT is not set
LDSO_BASE_FILENAME="ld.so"
# UCLIBC_STATIC_LDCONFIG is not set
LDSO_RUNPATH=y
UCLIBC_CTOR_DTOR=y
LDSO_GNU_HASH_SUPPORT=y
# HAS_NO_THREADS is not set
UCLIBC_HAS_THREADS=y
UCLIBC_HAS_THREADS_NATIVE=y
PTHREADS_DEBUG_SUPPORT=y
# LINUXTHREADS_OLD is not set
UCLIBC_HAS_LFS=y
# MALLOC is not set
# MALLOC_SIMPLE is not set
MALLOC_STANDARD=y
MALLOC_GLIBC_COMPAT=y
UCLIBC_DYNAMIC_ATEXIT=y
COMPAT_ATEXIT=y
UCLIBC_SUSV3_LEGACY=y
UCLIBC_SUSV3_LEGACY_MACROS=y
UCLIBC_SUSV4_LEGACY=y
UCLIBC_HAS_SHADOW=y
UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
UCLIBC_HAS___PROGNAME=y
UNIX98PTY_ONLY=y
ASSUME_DEVPTS=y
UCLIBC_HAS_LIBUTIL=y
UCLIBC_HAS_TM_EXTENSIONS=y
UCLIBC_HAS_TZ_CACHING=y
UCLIBC_HAS_TZ_FILE=y
UCLIBC_HAS_TZ_FILE_READ_MANY=y
UCLIBC_TZ_FILE_PATH="/etc/TZ"
#
# Advanced Library Settings
#
UCLIBC_PWD_BUFFER_SIZE=256
UCLIBC_GRP_BUFFER_SIZE=256
#
# Networking Support
#
UCLIBC_HAS_IPV6=y
UCLIBC_HAS_RPC=y
UCLIBC_HAS_FULL_RPC=y
# UCLIBC_HAS_REENTRANT_RPC is not set
UCLIBC_USE_NETLINK=y
UCLIBC_SUPPORT_AI_ADDRCONFIG=y
UCLIBC_HAS_BSD_RES_CLOSE=y
UCLIBC_HAS_LIBRESOLV_STUB=y
UCLIBC_HAS_LIBNSL_STUB=y
#
# String and Stdio Support
#
UCLIBC_HAS_STRING_GENERIC_OPT=y
UCLIBC_HAS_STRING_ARCH_OPT=y
UCLIBC_HAS_CTYPE_TABLES=y
UCLIBC_HAS_CTYPE_SIGNED=y
# UCLIBC_HAS_CTYPE_UNSAFE is not set
UCLIBC_HAS_CTYPE_CHECKED=y
# UCLIBC_HAS_CTYPE_ENFORCED is not set
UCLIBC_HAS_WCHAR=y
# UCLIBC_HAS_LOCALE is not set
UCLIBC_HAS_HEXADECIMAL_FLOATS=y
UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y
# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
UCLIBC_HAS_STDIO_BUFSIZ_256=y
# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_4096 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
UCLIBC_HAS_STDIO_GETC_MACRO=y
UCLIBC_HAS_STDIO_PUTC_MACRO=y
UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
UCLIBC_HAS_PRINTF_M_SPEC=y
UCLIBC_HAS_ERRNO_MESSAGES=y
# UCLIBC_HAS_SYS_ERRLIST is not set
UCLIBC_HAS_SIGNUM_MESSAGES=y
# UCLIBC_HAS_SYS_SIGLIST is not set
UCLIBC_HAS_GNU_GETOPT=y
UCLIBC_HAS_GNU_GETSUBOPT=y
#
# Big and Tall
#
UCLIBC_HAS_REGEX=y
# UCLIBC_HAS_REGEX_OLD is not set
UCLIBC_HAS_FNMATCH=y
# UCLIBC_HAS_FNMATCH_OLD is not set
UCLIBC_HAS_WORDEXP=y
UCLIBC_HAS_NFTW=y
UCLIBC_HAS_FTW=y
UCLIBC_HAS_FTS=y
UCLIBC_HAS_GLOB=y
UCLIBC_HAS_GNU_GLOB=y
#
# Library Installation Options
#
SHARED_LIB_LOADER_PREFIX="/lib"
RUNTIME_PREFIX="/"
DEVEL_PREFIX="//usr"
#
# Security options
#
# UCLIBC_BUILD_PIE is not set
# UCLIBC_HAS_ARC4RANDOM is not set
# HAVE_NO_SSP is not set
# UCLIBC_HAS_SSP is not set
UCLIBC_BUILD_RELRO=y
UCLIBC_BUILD_NOW=y
UCLIBC_BUILD_NOEXECSTACK=y
#
# uClibc development/debugging options
#
CROSS_COMPILER_PREFIX=""
UCLIBC_EXTRA_CFLAGS=""
# DODEBUG is not set
# DODEBUG_PT is not set
# DOSTRIP is not set
# DOASSERTS is not set
# SUPPORT_LD_DEBUG is not set
# SUPPORT_LD_DEBUG_EARLY is not set
# UCLIBC_MALLOC_DEBUGGING is not set
WARNINGS="-Wall"
# EXTRA_WARNINGS is not set
# DOMULTI is not set
# UCLIBC_MJN3_ONLY is not set
# math stuff for perl
DO_C99_MATH=y
UCLIBC_HAS_LONG_DOUBLE_MATH=y

View File

@ -0,0 +1,116 @@
#
# Set the ARCH environment variable for uClibc compilation.
# Return value must match one of the architectures known to uClibc:
# libc/sysdeps/*/*
#
valid_archs = "\
alpha \
arm \
avr32 \
bfin \
cris \
e1 \
frv \
h8300 \
hppa \
i386 \
i960 \
ia64 \
m68k \
microblaze \
mips \
nios \
nios2 \
powerpc \
sh \
sh64 \
sparc \
v850 \
vax \
x86_64 \
xtensa \
"
def map_uclibc_arch(a, d):
"""Return the uClibc architecture for the given TARGET_ARCH."""
import re
valid_archs = bb.data.getVar('valid_archs', d, 1).split()
if re.match('^(arm|sa110).*', a): return 'arm'
elif re.match('^(i.86|athlon)$', a): return 'i386'
elif re.match('^mips.*', a): return 'mips'
elif re.match('^parisc.*', a): return 'hppa'
elif re.match('^ppc.*', a): return 'powerpc'
elif re.match('^s390.*', a): return 's390'
elif re.match('^sh.*', a): return 'sh'
elif re.match('^(sun|sparc).*', a): return 'sparc'
elif re.match('^xtensa.*', a): return 'xtensa'
elif a in valid_archs: return a
else:
bb.error("cannot map '%s' to a uClibc architecture" % a)
export UCLIBC_ARCH = "${@map_uclibc_arch(bb.data.getVar('TARGET_ARCH', d, 1), d)}"
def map_uclibc_abi(o, d):
"""Return the uClibc ABI for the given TARGET_OS."""
import re
arch = bb.data.getVar('TARGET_ARCH', d, 1)
if map_uclibc_arch(bb.data.getVar('TARGET_ARCH', d, 1), d) == "arm":
if re.match('.*eabi$', o): return 'ARM_EABI'
else: return 'ARM_OABI'
# FIXME: This is inaccurate! Handle o32, n32, n64
elif re.match('^mips.*64$', arch): return 'MIPS_N64_ABI'
elif re.match('^mips.*', arch): return 'MIPS_O32_ABI'
return ""
export UCLIBC_ABI = "${@map_uclibc_abi(bb.data.getVar('TARGET_OS', d, 1), d)}"
def map_uclibc_endian(a, d):
"""Return the uClibc endianess for the given TARGET_ARCH."""
import re
# Always BE
if re.match('^(avr32|e1|frv|(parisc|hppa)|m68k|microblaze|powerpc.*|(sparc|sun).*)$', a):
return 'BIG'
# Possibly BE
elif re.match('^((arm|sa110|arm.*eb)|h8300.*eb|(parisc|hppa).*eb|mips|sh.*eb|xtensa.*eb)$', a):
return 'BIG'
return 'LITTLE'
export UCLIBC_ENDIAN = "${@map_uclibc_endian(bb.data.getVar('TARGET_ARCH', d, 1), d)}"
# internal helper
def uclibc_cfg(feature, features, tokens, cnf, rem):
if type(tokens) == type(""):
tokens = [tokens]
rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens])
if type(features) == type([]) and feature in features:
cnf.extend([token + '=y' for token in tokens])
else:
cnf.extend(['# ' + token + ' is not set' for token in tokens])
# Map distro and machine features to config settings
def features_to_uclibc_settings(d):
cnf, rem = ([], [])
distro_features = bb.data.getVar('DISTRO_FEATURES', d, True).split()
machine_features = bb.data.getVar('MACHINE_FEATURES', d, True).split()
uclibc_cfg('ipv4', distro_features, 'UCLIBC_HAS_IPV4', cnf, rem)
uclibc_cfg('ipv6', distro_features, 'UCLIBC_HAS_IPV6', cnf, rem)
uclibc_cfg('largefile', distro_features, 'UCLIBC_HAS_LFS', cnf, rem)
uclibc_cfg('nls', distro_features, 'UCLIBC_HAS_LOCALE', cnf, rem)
uclibc_cfg('thumb-interwork', distro_features,'USE_BX', cnf, rem)
uclibc_cfg('xattr', distro_features, 'UCLIBC_HAS_XATTR', cnf, rem)
uclibc_cfg('ssp', distro_features, 'UCLIBC_HAS_SSP', cnf, rem)
uclibc_cfg('argp', distro_features, 'UCLIBC_HAS_ARGP', cnf, rem)
uclibc_cfg('kernel24', machine_features,'UCLIBC_LINUX_MODULE_24', cnf, rem)
return "\n".join(cnf), "\n".join(rem)
# X, Y = ${@features_to_uclibc_settings(d)}
# unfortunately doesn't seem to work with bitbake, workaround:
def features_to_uclibc_conf(d):
cnf, rem = features_to_uclibc_settings(d)
return cnf
def features_to_uclibc_del(d):
cnf, rem = features_to_uclibc_settings(d)
return rem

View File

@ -0,0 +1,581 @@
Added headers file needed by argp sources.
Signed-off-by: Salvatore Cro <salvatore.cro at st.com>
---
include/argp.h | 566 ++++++++++++++++++++++++++++++++++++++++++++
libc/argp/argp-fmtstream.h | 314 ++++++++++++++++++++++++
2 files changed, 880 insertions(+), 0 deletions(-)
create mode 100644 include/argp.h
create mode 100644 libc/argp/argp-fmtstream.h
Index: git/include/argp.h
===================================================================
--- /dev/null
+++ git/include/argp.h
@@ -0,0 +1,566 @@
+/* Hierarchial argument parsing, layered over getopt.
+ Copyright (C) 1995-1999, 2003, 2004, 2005, 2006, 2007, 2009
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles at gnu.ai.mit.edu>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA.
+
+ Modified for uClibc by: Salvatore Cro <salvatore.cro at st.com>
+*/
+
+#ifndef _ARGP_H
+#define _ARGP_H
+
+#include <stdio.h>
+#include <ctype.h>
+#include <limits.h>
+
+#define __need_error_t
+#include <errno.h>
+
+#ifndef __const
+# define __const const
+#endif
+
+#ifndef __THROW
+# define __THROW
+#endif
+#ifndef __NTH
+# define __NTH(fct) fct __THROW
+#endif
+
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || defined(__STRICT_ANSI__)
+# define __attribute__(Spec) /* empty */
+# endif
+/* The __-protected variants of `format' and `printf' attributes
+ are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || defined(__STRICT_ANSI__)
+# define __format__ format
+# define __printf__ printf
+# endif
+#endif
+
+/* GCC 2.95 and later have "__restrict"; C99 compilers have
+ "restrict", and "configure" may have defined "restrict". */
+#ifndef __restrict
+# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
+# if defined restrict || 199901L <= __STDC_VERSION__
+# define __restrict restrict
+# else
+# define __restrict
+# endif
+# endif
+#endif
+
+#ifndef __error_t_defined
+typedef int error_t;
+# define __error_t_defined
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* A description of a particular option. A pointer to an array of
+ these is passed in the OPTIONS field of an argp structure. Each option
+ entry can correspond to one long option and/or one short option; more
+ names for the same option can be added by following an entry in an option
+ array with options having the OPTION_ALIAS flag set. */
+struct argp_option
+{
+ /* The long option name. For more than one name for the same option, you
+ can use following options with the OPTION_ALIAS flag set. */
+ __const char *name;
+
+ /* What key is returned for this option. If > 0 and printable, then it's
+ also accepted as a short option. */
+ int key;
+
+ /* If non-NULL, this is the name of the argument associated with this
+ option, which is required unless the OPTION_ARG_OPTIONAL flag is set. */
+ __const char *arg;
+
+ /* OPTION_ flags. */
+ int flags;
+
+ /* The doc string for this option. If both NAME and KEY are 0, This string
+ will be printed outdented from the normal option column, making it
+ useful as a group header (it will be the first thing printed in its
+ group); in this usage, it's conventional to end the string with a `:'. */
+ __const char *doc;
+
+ /* The group this option is in. In a long help message, options are sorted
+ alphabetically within each group, and the groups presented in the order
+ 0, 1, 2, ..., n, -m, ..., -2, -1. Every entry in an options array with
+ if this field 0 will inherit the group number of the previous entry, or
+ zero if it's the first one, unless its a group header (NAME and KEY both
+ 0), in which case, the previous entry + 1 is the default. Automagic
+ options such as --help are put into group -1. */
+ int group;
+};
+
+/* The argument associated with this option is optional. */
+#define OPTION_ARG_OPTIONAL 0x1
+
+/* This option isn't displayed in any help messages. */
+#define OPTION_HIDDEN 0x2
+
+/* This option is an alias for the closest previous non-alias option. This
+ means that it will be displayed in the same help entry, and will inherit
+ fields other than NAME and KEY from the aliased option. */
+#define OPTION_ALIAS 0x4
+
+/* This option isn't actually an option (and so should be ignored by the
+ actual option parser), but rather an arbitrary piece of documentation that
+ should be displayed in much the same manner as the options. If this flag
+ is set, then the option NAME field is displayed unmodified (e.g., no `--'
+ prefix is added) at the left-margin (where a *short* option would normally
+ be displayed), and the documentation string in the normal place. For
+ purposes of sorting, any leading whitespace and punctuation is ignored,
+ except that if the first non-whitespace character is not `-', this entry
+ is displayed after all options (and OPTION_DOC entries with a leading `-')
+ in the same group. */
+#define OPTION_DOC 0x8
+
+/* This option shouldn't be included in `long' usage messages (but is still
+ included in help messages). This is mainly intended for options that are
+ completely documented in an argp's ARGS_DOC field, in which case including
+ the option in the generic usage list would be redundant. For instance,
+ if ARGS_DOC is "FOO BAR\n-x BLAH", and the `-x' option's purpose is to
+ distinguish these two cases, -x should probably be marked
+ OPTION_NO_USAGE. */
+#define OPTION_NO_USAGE 0x10
+
+struct argp; /* fwd declare this type */
+struct argp_state; /* " */
+struct argp_child; /* " */
+
+/* The type of a pointer to an argp parsing function. */
+typedef error_t (*argp_parser_t) (int __key, char *__arg,
+ struct argp_state *__state);
+
+/* What to return for unrecognized keys. For special ARGP_KEY_ keys, such
+ returns will simply be ignored. For user keys, this error will be turned
+ into EINVAL (if the call to argp_parse is such that errors are propagated
+ back to the user instead of exiting); returning EINVAL itself would result
+ in an immediate stop to parsing in *all* cases. */
+#define ARGP_ERR_UNKNOWN E2BIG /* Hurd should never need E2BIG. XXX */
+
+/* Special values for the KEY argument to an argument parsing function.
+ ARGP_ERR_UNKNOWN should be returned if they aren't understood.
+
+ The sequence of keys to a parsing function is either (where each
+ uppercased word should be prefixed by `ARGP_KEY_' and opt is a user key):
+
+ INIT opt... NO_ARGS END SUCCESS -- No non-option arguments at all
+ or INIT (opt | ARG)... END SUCCESS -- All non-option args parsed
+ or INIT (opt | ARG)... SUCCESS -- Some non-option arg unrecognized
+
+ The third case is where every parser returned ARGP_KEY_UNKNOWN for an
+ argument, in which case parsing stops at that argument (returning the
+ unparsed arguments to the caller of argp_parse if requested, or stopping
+ with an error message if not).
+
+ If an error occurs (either detected by argp, or because the parsing
+ function returned an error value), then the parser is called with
+ ARGP_KEY_ERROR, and no further calls are made. */
+
+/* This is not an option at all, but rather a command line argument. If a
+ parser receiving this key returns success, the fact is recorded, and the
+ ARGP_KEY_NO_ARGS case won't be used. HOWEVER, if while processing the
+ argument, a parser function decrements the NEXT field of the state it's
+ passed, the option won't be considered processed; this is to allow you to
+ actually modify the argument (perhaps into an option), and have it
+ processed again. */
+#define ARGP_KEY_ARG 0
+/* There are remaining arguments not parsed by any parser, which may be found
+ starting at (STATE->argv + STATE->next). If success is returned, but
+ STATE->next left untouched, it's assumed that all arguments were consume,
+ otherwise, the parser should adjust STATE->next to reflect any arguments
+ consumed. */
+#define ARGP_KEY_ARGS 0x1000006
+/* There are no more command line arguments at all. */
+#define ARGP_KEY_END 0x1000001
+/* Because it's common to want to do some special processing if there aren't
+ any non-option args, user parsers are called with this key if they didn't
+ successfully process any non-option arguments. Called just before
+ ARGP_KEY_END (where more general validity checks on previously parsed
+ arguments can take place). */
+#define ARGP_KEY_NO_ARGS 0x1000002
+/* Passed in before any parsing is done. Afterwards, the values of each
+ element of the CHILD_INPUT field, if any, in the state structure is
+ copied to each child's state to be the initial value of the INPUT field. */
+#define ARGP_KEY_INIT 0x1000003
+/* Use after all other keys, including SUCCESS & END. */
+#define ARGP_KEY_FINI 0x1000007
+/* Passed in when parsing has successfully been completed (even if there are
+ still arguments remaining). */
+#define ARGP_KEY_SUCCESS 0x1000004
+/* Passed in if an error occurs. */
+#define ARGP_KEY_ERROR 0x1000005
+
+/* An argp structure contains a set of options declarations, a function to
+ deal with parsing one, documentation string, a possible vector of child
+ argp's, and perhaps a function to filter help output. When actually
+ parsing options, getopt is called with the union of all the argp
+ structures chained together through their CHILD pointers, with conflicts
+ being resolved in favor of the first occurrence in the chain. */
+struct argp
+{
+ /* An array of argp_option structures, terminated by an entry with both
+ NAME and KEY having a value of 0. */
+ __const struct argp_option *options;
+
+ /* What to do with an option from this structure. KEY is the key
+ associated with the option, and ARG is any associated argument (NULL if
+ none was supplied). If KEY isn't understood, ARGP_ERR_UNKNOWN should be
+ returned. If a non-zero, non-ARGP_ERR_UNKNOWN value is returned, then
+ parsing is stopped immediately, and that value is returned from
+ argp_parse(). For special (non-user-supplied) values of KEY, see the
+ ARGP_KEY_ definitions below. */
+ argp_parser_t parser;
+
+ /* A string describing what other arguments are wanted by this program. It
+ is only used by argp_usage to print the `Usage:' message. If it
+ contains newlines, the strings separated by them are considered
+ alternative usage patterns, and printed on separate lines (lines after
+ the first are prefix by ` or: ' instead of `Usage:'). */
+ __const char *args_doc;
+
+ /* If non-NULL, a string containing extra text to be printed before and
+ after the options in a long help message (separated by a vertical tab
+ `\v' character). */
+ __const char *doc;
+
+ /* A vector of argp_children structures, terminated by a member with a 0
+ argp field, pointing to child argps should be parsed with this one. Any
+ conflicts are resolved in favor of this argp, or early argps in the
+ CHILDREN list. This field is useful if you use libraries that supply
+ their own argp structure, which you want to use in conjunction with your
+ own. */
+ __const struct argp_child *children;
+
+ /* If non-zero, this should be a function to filter the output of help
+ messages. KEY is either a key from an option, in which case TEXT is
+ that option's help text, or a special key from the ARGP_KEY_HELP_
+ defines, below, describing which other help text TEXT is. The function
+ should return either TEXT, if it should be used as-is, a replacement
+ string, which should be malloced, and will be freed by argp, or NULL,
+ meaning `print nothing'. The value for TEXT is *after* any translation
+ has been done, so if any of the replacement text also needs translation,
+ that should be done by the filter function. INPUT is either the input
+ supplied to argp_parse, or NULL, if argp_help was called directly. */
+ char *(*help_filter) (int __key, __const char *__text, void *__input);
+
+ /* If non-zero the strings used in the argp library are translated using
+ the domain described by this string. Otherwise the currently installed
+ default domain is used. */
+ const char *argp_domain;
+};
+
+/* Possible KEY arguments to a help filter function. */
+#define ARGP_KEY_HELP_PRE_DOC 0x2000001 /* Help text preceeding options. */
+#define ARGP_KEY_HELP_POST_DOC 0x2000002 /* Help text following options. */
+#define ARGP_KEY_HELP_HEADER 0x2000003 /* Option header string. */
+#define ARGP_KEY_HELP_EXTRA 0x2000004 /* After all other documentation;
+ TEXT is NULL for this key. */
+/* Explanatory note emitted when duplicate option arguments have been
+ suppressed. */
+#define ARGP_KEY_HELP_DUP_ARGS_NOTE 0x2000005
+#define ARGP_KEY_HELP_ARGS_DOC 0x2000006 /* Argument doc string. */
+
+/* When an argp has a non-zero CHILDREN field, it should point to a vector of
+ argp_child structures, each of which describes a subsidiary argp. */
+struct argp_child
+{
+ /* The child parser. */
+ __const struct argp *argp;
+
+ /* Flags for this child. */
+ int flags;
+
+ /* If non-zero, an optional header to be printed in help output before the
+ child options. As a side-effect, a non-zero value forces the child
+ options to be grouped together; to achieve this effect without actually
+ printing a header string, use a value of "". */
+ __const char *header;
+
+ /* Where to group the child options relative to the other (`consolidated')
+ options in the parent argp; the values are the same as the GROUP field
+ in argp_option structs, but all child-groupings follow parent options at
+ a particular group level. If both this field and HEADER are zero, then
+ they aren't grouped at all, but rather merged with the parent options
+ (merging the child's grouping levels with the parents). */
+ int group;
+};
+
+/* Parsing state. This is provided to parsing functions called by argp,
+ which may examine and, as noted, modify fields. */
+struct argp_state
+{
+ /* The top level ARGP being parsed. */
+ __const struct argp *root_argp;
+
+ /* The argument vector being parsed. May be modified. */
+ int argc;
+ char **argv;
+
+ /* The index in ARGV of the next arg that to be parsed. May be modified. */
+ int next;
+
+ /* The flags supplied to argp_parse. May be modified. */
+ unsigned flags;
+
+ /* While calling a parsing function with a key of ARGP_KEY_ARG, this is the
+ number of the current arg, starting at zero, and incremented after each
+ such call returns. At all other times, this is the number of such
+ arguments that have been processed. */
+ unsigned arg_num;
+
+ /* If non-zero, the index in ARGV of the first argument following a special
+ `--' argument (which prevents anything following being interpreted as an
+ option). Only set once argument parsing has proceeded past this point. */
+ int quoted;
+
+ /* An arbitrary pointer passed in from the user. */
+ void *input;
+ /* Values to pass to child parsers. This vector will be the same length as
+ the number of children for the current parser. */
+ void **child_inputs;
+
+ /* For the parser's use. Initialized to 0. */
+ void *hook;
+
+ /* The name used when printing messages. This is initialized to ARGV[0],
+ or PROGRAM_INVOCATION_NAME if that is unavailable. */
+ char *name;
+
+ /* Streams used when argp prints something. */
+ FILE *err_stream; /* For errors; initialized to stderr. */
+ FILE *out_stream; /* For information; initialized to stdout. */
+
+ void *pstate; /* Private, for use by argp. */
+};
+
+/* Flags for argp_parse (note that the defaults are those that are
+ convenient for program command line parsing): */
+
+/* Don't ignore the first element of ARGV. Normally (and always unless
+ ARGP_NO_ERRS is set) the first element of the argument vector is
+ skipped for option parsing purposes, as it corresponds to the program name
+ in a command line. */
+#define ARGP_PARSE_ARGV0 0x01
+
+/* Don't print error messages for unknown options to stderr; unless this flag
+ is set, ARGP_PARSE_ARGV0 is ignored, as ARGV[0] is used as the program
+ name in the error messages. This flag implies ARGP_NO_EXIT (on the
+ assumption that silent exiting upon errors is bad behaviour). */
+#define ARGP_NO_ERRS 0x02
+
+/* Don't parse any non-option args. Normally non-option args are parsed by
+ calling the parse functions with a key of ARGP_KEY_ARG, and the actual arg
+ as the value. Since it's impossible to know which parse function wants to
+ handle it, each one is called in turn, until one returns 0 or an error
+ other than ARGP_ERR_UNKNOWN; if an argument is handled by no one, the
+ argp_parse returns prematurely (but with a return value of 0). If all
+ args have been parsed without error, all parsing functions are called one
+ last time with a key of ARGP_KEY_END. This flag needn't normally be set,
+ as the normal behavior is to stop parsing as soon as some argument can't
+ be handled. */
+#define ARGP_NO_ARGS 0x04
+
+/* Parse options and arguments in the same order they occur on the command
+ line -- normally they're rearranged so that all options come first. */
+#define ARGP_IN_ORDER 0x08
+
+/* Don't provide the standard long option --help, which causes usage and
+ option help information to be output to stdout, and exit (0) called. */
+#define ARGP_NO_HELP 0x10
+
+/* Don't exit on errors (they may still result in error messages). */
+#define ARGP_NO_EXIT 0x20
+
+/* Use the gnu getopt `long-only' rules for parsing arguments. */
+#define ARGP_LONG_ONLY 0x40
+
+/* Turns off any message-printing/exiting options. */
+#define ARGP_SILENT (ARGP_NO_EXIT | ARGP_NO_ERRS | ARGP_NO_HELP)
+
+/* Parse the options strings in ARGC & ARGV according to the options in ARGP.
+ FLAGS is one of the ARGP_ flags above. If ARG_INDEX is non-NULL, the
+ index in ARGV of the first unparsed option is returned in it. If an
+ unknown option is present, ARGP_ERR_UNKNOWN is returned; if some parser
+ routine returned a non-zero value, it is returned; otherwise 0 is
+ returned. This function may also call exit unless the ARGP_NO_HELP flag
+ is set. INPUT is a pointer to a value to be passed in to the parser. */
+extern error_t argp_parse (__const struct argp *__restrict __argp,
+ int __argc, char **__restrict __argv,
+ unsigned __flags, int *__restrict __arg_index,
+ void *__restrict __input);
+
+/* Global variables. */
+
+/* If defined or set by the user program to a non-zero value, then a default
+ option --version is added (unless the ARGP_NO_HELP flag is used), which
+ will print this string followed by a newline and exit (unless the
+ ARGP_NO_EXIT flag is used). Overridden by ARGP_PROGRAM_VERSION_HOOK. */
+extern __const char *argp_program_version;
+
+/* If defined or set by the user program to a non-zero value, then a default
+ option --version is added (unless the ARGP_NO_HELP flag is used), which
+ calls this function with a stream to print the version to and a pointer to
+ the current parsing state, and then exits (unless the ARGP_NO_EXIT flag is
+ used). This variable takes precedent over ARGP_PROGRAM_VERSION. */
+extern void (*argp_program_version_hook) (FILE *__restrict __stream,
+ struct argp_state *__restrict
+ __state);
+
+/* If defined or set by the user program, it should point to string that is
+ the bug-reporting address for the program. It will be printed by
+ argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various
+ standard help messages), embedded in a sentence that says something like
+ `Report bugs to ADDR.'. */
+extern __const char *argp_program_bug_address;
+
+/* The exit status that argp will use when exiting due to a parsing error.
+ If not defined or set by the user program, this defaults to EX_USAGE from
+ <sysexits.h>. */
+extern error_t argp_err_exit_status;
+
+/* Flags for argp_help. */
+#define ARGP_HELP_USAGE 0x01 /* a Usage: message. */
+#define ARGP_HELP_SHORT_USAGE 0x02 /* " but don't actually print options. */
+#define ARGP_HELP_SEE 0x04 /* a `Try ... for more help' message. */
+#define ARGP_HELP_LONG 0x08 /* a long help message. */
+#define ARGP_HELP_PRE_DOC 0x10 /* doc string preceding long help. */
+#define ARGP_HELP_POST_DOC 0x20 /* doc string following long help. */
+#define ARGP_HELP_DOC (ARGP_HELP_PRE_DOC | ARGP_HELP_POST_DOC)
+#define ARGP_HELP_BUG_ADDR 0x40 /* bug report address */
+#define ARGP_HELP_LONG_ONLY 0x80 /* modify output appropriately to
+ reflect ARGP_LONG_ONLY mode. */
+
+/* These ARGP_HELP flags are only understood by argp_state_help. */
+#define ARGP_HELP_EXIT_ERR 0x100 /* Call exit(1) instead of returning. */
+#define ARGP_HELP_EXIT_OK 0x200 /* Call exit(0) instead of returning. */
+
+/* The standard thing to do after a program command line parsing error, if an
+ error message has already been printed. */
+#define ARGP_HELP_STD_ERR \
+ (ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
+/* The standard thing to do after a program command line parsing error, if no
+ more specific error message has been printed. */
+#define ARGP_HELP_STD_USAGE \
+ (ARGP_HELP_SHORT_USAGE | ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
+/* The standard thing to do in response to a --help option. */
+#define ARGP_HELP_STD_HELP \
+ (ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_EXIT_OK \
+ | ARGP_HELP_DOC | ARGP_HELP_BUG_ADDR)
+
+/* Output a usage message for ARGP to STREAM. FLAGS are from the set
+ ARGP_HELP_*. */
+extern void argp_help (__const struct argp *__restrict __argp,
+ FILE *__restrict __stream,
+ unsigned __flags, char *__restrict __name);
+
+/* The following routines are intended to be called from within an argp
+ parsing routine (thus taking an argp_state structure as the first
+ argument). They may or may not print an error message and exit, depending
+ on the flags in STATE -- in any case, the caller should be prepared for
+ them *not* to exit, and should return an appropiate error after calling
+ them. [argp_usage & argp_error should probably be called argp_state_...,
+ but they're used often enough that they should be short] */
+
+/* Output, if appropriate, a usage message for STATE to STREAM. FLAGS are
+ from the set ARGP_HELP_*. */
+extern void argp_state_help (__const struct argp_state *__restrict __state,
+ FILE *__restrict __stream,
+ unsigned int __flags);
+/* Possibly output the standard usage message for ARGP to stderr and exit. */
+extern void argp_usage (__const struct argp_state *__state);
+
+/* If appropriate, print the printf string FMT and following args, preceded
+ by the program name and `:', to stderr, and followed by a `Try ... --help'
+ message, then exit (1). */
+extern void argp_error (__const struct argp_state *__restrict __state,
+ __const char *__restrict __fmt, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+/* Similar to the standard gnu error-reporting function error(), but will
+ respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
+ to STATE->err_stream. This is useful for argument parsing code that is
+ shared between program startup (when exiting is desired) and runtime
+ option parsing (when typically an error code is returned instead). The
+ difference between this function and argp_error is that the latter is for
+ *parsing errors*, and the former is for other problems that occur during
+ parsing but don't reflect a (syntactic) problem with the input. */
+extern void argp_failure (__const struct argp_state *__restrict __state,
+ int __status, int __errnum,
+ __const char *__restrict __fmt, ...)
+ __attribute__ ((__format__ (__printf__, 4, 5)));
+/* Returns true if the option OPT is a valid short option. */
+extern int _option_is_short (__const struct argp_option *__opt) __THROW;
+extern int __option_is_short (__const struct argp_option *__opt) __THROW;
+
+/* Returns true if the option OPT is in fact the last (unused) entry in an
+ options array. */
+extern int _option_is_end (__const struct argp_option *__opt) __THROW;
+extern int __option_is_end (__const struct argp_option *__opt) __THROW;
+
+/* Return the input field for ARGP in the parser corresponding to STATE; used
+ by the help routines. */
+/* We think this should not be exported */
+extern void *__argp_input (__const struct argp *__restrict __argp,
+ __const struct argp_state *__restrict __state)
+ __THROW;
+
+#ifdef __USE_EXTERN_INLINES
+
+# ifndef ARGP_EI
+# define ARGP_EI __extern_inline
+# endif
+
+ARGP_EI void
+argp_usage (__const struct argp_state *__state)
+{
+ argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
+}
+
+ARGP_EI int
+__NTH (__option_is_short (__const struct argp_option *__opt))
+{
+ if (__opt->flags & OPTION_DOC)
+ return 0;
+ else
+ {
+ int __key = __opt->key;
+ return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
+ }
+}
+
+ARGP_EI int
+__NTH (__option_is_end (__const struct argp_option *__opt))
+{
+ return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
+}
+#endif /* Use extern inlines. */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* argp.h */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,69 @@
#
# Automatically generated make config: don't edit
# Mon May 14 10:23:14 2007
#
# TARGET_alpha is not set
TARGET_arm=y
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_vax is not set
# TARGET_x86_64 is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="arm"
FORCE_OPTIONS_FOR_ARCH=y
# CONFIG_ARM_OABI is not set
CONFIG_ARM_EABI=y
USE_BX=y
CONFIG_GENERIC_ARM=y
# CONFIG_ARM610 is not set
# CONFIG_ARM710 is not set
# CONFIG_ARM7TDMI is not set
# CONFIG_ARM720T is not set
# CONFIG_ARM920T is not set
# CONFIG_ARM922T is not set
# CONFIG_ARM926T is not set
# CONFIG_ARM10T is not set
# CONFIG_ARM1136JF_S is not set
# CONFIG_ARM1176JZ_S is not set
# CONFIG_ARM1176JZF_S is not set
# CONFIG_ARM_SA110 is not set
# CONFIG_ARM_SA1100 is not set
# CONFIG_ARM_XSCALE is not set
# CONFIG_ARM_IWMMXT is not set
TARGET_SUBARCH=""
#
# Using ELF file format
#
ARCH_ANY_ENDIAN=y
ARCH_LITTLE_ENDIAN=y
# ARCH_WANTS_BIG_ENDIAN is not set
ARCH_WANTS_LITTLE_ENDIAN=y
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
# UCLIBC_HAS_FPU is not set
UCLIBC_HAS_SOFT_FLOAT=y
KERNEL_HEADERS="/usr/include"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,53 @@
#
# Automatically generated make config: don't edit
#
# TARGET_alpha is not set
TARGET_arm=y
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
# TARGET_i960 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_x86_64 is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="arm"
ARCH_SUPPORTS_BIG_ENDIAN=y
ARCH_SUPPORTS_LITTLE_ENDIAN=y
FORCE_OPTIONS_FOR_ARCH=y
CONFIG_GENERIC_ARM=y
# CONFIG_ARM610 is not set
# CONFIG_ARM710 is not set
# CONFIG_ARM720T is not set
# CONFIG_ARM920T is not set
# CONFIG_ARM922T is not set
# CONFIG_ARM926T is not set
# CONFIG_ARM1136JF_S is not set
# CONFIG_ARM_SA110 is not set
# CONFIG_ARM_SA1100 is not set
# CONFIG_ARM_XSCALE is not set
# ARCH_LITTLE_ENDIAN is not set
ARCH_BIG_ENDIAN=y
# ARCH_HAS_NO_MMU is not set
ARCH_HAS_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
# UCLIBC_HAS_FENV is not set
KERNEL_HEADERS="<path/to/kernel/headers>"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,76 @@
#
# Automatically generated make config: don't edit
# Version: 0.9.32-git
# Mon Jul 19 01:34:29 2010
#
# TARGET_alpha is not set
TARGET_arm=y
# TARGET_avr32 is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_vax is not set
# TARGET_x86_64 is not set
# TARGET_xtensa is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="arm"
FORCE_OPTIONS_FOR_ARCH=y
# CONFIG_ARM_OABI is not set
CONFIG_ARM_EABI=y
USE_BX=y
CONFIG_GENERIC_ARM=y
# CONFIG_ARM610 is not set
# CONFIG_ARM710 is not set
# CONFIG_ARM7TDMI is not set
# CONFIG_ARM720T is not set
# CONFIG_ARM920T is not set
# CONFIG_ARM922T is not set
# CONFIG_ARM926T is not set
# CONFIG_ARM10T is not set
# CONFIG_ARM1136JF_S is not set
# CONFIG_ARM1176JZ_S is not set
# CONFIG_ARM1176JZF_S is not set
# CONFIG_ARM_CORTEX_M3 is not set
# CONFIG_ARM_CORTEX_M1 is not set
# CONFIG_ARM_SA110 is not set
# CONFIG_ARM_SA1100 is not set
# CONFIG_ARM_XSCALE is not set
# CONFIG_ARM_IWMMXT is not set
TARGET_SUBARCH=""
#
# Using ELF file format
#
ARCH_ANY_ENDIAN=y
ARCH_LITTLE_ENDIAN=y
# ARCH_WANTS_BIG_ENDIAN is not set
ARCH_WANTS_LITTLE_ENDIAN=y
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
# UCLIBC_HAS_FPU is not set
UCLIBC_HAS_SOFT_FLOAT=y
DO_C99_MATH=y
# DO_XSI_MATH is not set
# UCLIBC_HAS_FENV is not set
KERNEL_HEADERS="/usr/include"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,75 @@
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313307agb;
Sat, 8 Jan 2011 16:45:20 -0800 (PST)
Received: by 10.227.141.78 with SMTP id l14mr16920947wbu.128.1294533919168;
Sat, 08 Jan 2011 16:45:19 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id w30si33755908wbd.17.2011.01.08.16.45.18;
Sat, 08 Jan 2011 16:45:19 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClHDo; Sun, 09 Jan 2011 01:45:18 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 6/7] ARM: detect BX availibility at build time
Date: Sun, 9 Jan 2011 01:45:09 +0100
Message-Id: <1294533910-19305-7-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
The "use BX" option is now a suggestion that BX be used if available.
Use a macro to detect if BX is available at build time. If so, and
the user requested it be used, then use it. Otherwise, error out.
Macro courtesy Khem RAJ:
http://lists.uclibc.org/pipermail/uclibc/2009-April/042301.html
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
extra/Configs/Config.arm | 4 +++-
libc/sysdeps/linux/arm/bits/arm_asm.h | 9 ++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index 227b90c..9aa9e56 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -33,4 +33,6 @@ config COMPILE_IN_THUMB_MODE
config USE_BX
bool "Use BX in function return"
help
- Use BX instruction for THUMB aware architectures.
+ Say 'y' to use BX to return from functions on your thumb-aware
+ processor. Say 'y' if you need to use interworking. Say 'n' if not.
+ It is safe to say 'y' even if you're not doing interworking.
diff --git a/libc/sysdeps/linux/arm/bits/arm_asm.h b/libc/sysdeps/linux/arm/bits/arm_asm.h
index 1d87df6..921c9a3 100644
--- a/libc/sysdeps/linux/arm/bits/arm_asm.h
+++ b/libc/sysdeps/linux/arm/bits/arm_asm.h
@@ -24,5 +24,12 @@
#define THUMB1_ONLY 1
#endif
-#endif /* _ARM_ASM_H */
+#if defined(__USE_BX__)
+# if ( defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \
+ || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \
+ )
+# error Use of BX was requested, but is not available on the target processor.
+# endif /* ARCH level */
+#endif /* __USE_BX__ */
+#endif /* _ARM_ASM_H */
--
1.7.1

View File

@ -0,0 +1,45 @@
#
# Automatically generated make config: don't edit
# Wed Dec 20 11:05:48 2006
#
# TARGET_alpha is not set
# TARGET_arm is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
TARGET_powerpc=y
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_vax is not set
# TARGET_x86_64 is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="powerpc"
FORCE_OPTIONS_FOR_ARCH=y
ARCH_BIG_ENDIAN=y
#
# Using Big Endian
#
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
KERNEL_HEADERS="<path/to/kernel/headers>"
HAVE_DOT_CONFIG=y

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,59 @@
#
# Automatically generated make config: don't edit
#
# TARGET_alpha is not set
# TARGET_arm is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
TARGET_i386=y
# TARGET_i960 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_x86_64 is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="i386"
# ARCH_SUPPORTS_BIG_ENDIAN is not set
ARCH_SUPPORTS_LITTLE_ENDIAN=y
FORCE_OPTIONS_FOR_ARCH=y
# CONFIG_GENERIC_386 is not set
# CONFIG_386 is not set
# CONFIG_486 is not set
# CONFIG_586 is not set
# CONFIG_586MMX is not set
# CONFIG_686 is not set
# CONFIG_PENTIUMII is not set
# CONFIG_PENTIUMIII is not set
CONFIG_PENTIUM4=y
# CONFIG_K6 is not set
# CONFIG_K7 is not set
# CONFIG_ELAN is not set
# CONFIG_CRUSOE is not set
# CONFIG_WINCHIPC6 is not set
# CONFIG_WINCHIP2 is not set
# CONFIG_CYRIXIII is not set
# CONFIG_NEHEMIAH is not set
ARCH_LITTLE_ENDIAN=y
# ARCH_BIG_ENDIAN is not set
# ARCH_HAS_NO_MMU is not set
ARCH_HAS_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
# UCLIBC_HAS_FENV is not set
KERNEL_HEADERS="<path/to/kernel/headers>"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,62 @@
#
# Automatically generated make config: don't edit
# Fri Dec 22 23:09:11 2006
#
# TARGET_alpha is not set
# TARGET_arm is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
TARGET_i386=y
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_vax is not set
# TARGET_x86_64 is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="i386"
FORCE_OPTIONS_FOR_ARCH=y
# CONFIG_GENERIC_386 is not set
# CONFIG_386 is not set
CONFIG_486=y
# CONFIG_586 is not set
# CONFIG_586MMX is not set
# CONFIG_686 is not set
# CONFIG_PENTIUMII is not set
# CONFIG_PENTIUMIII is not set
# CONFIG_PENTIUM4 is not set
# CONFIG_K6 is not set
# CONFIG_K7 is not set
# CONFIG_ELAN is not set
# CONFIG_CRUSOE is not set
# CONFIG_WINCHIPC6 is not set
# CONFIG_WINCHIP2 is not set
# CONFIG_CYRIXIII is not set
# CONFIG_NEHEMIAH is not set
ARCH_LITTLE_ENDIAN=y
#
# Using Little Endian
#
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
KERNEL_HEADERS="<path/to/kernel/headers>"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,62 @@
#
# Automatically generated make config: don't edit
# Sat Feb 24 08:24:11 2007
#
# TARGET_alpha is not set
# TARGET_arm is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
TARGET_i386=y
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_vax is not set
# TARGET_x86_64 is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="i386"
FORCE_OPTIONS_FOR_ARCH=y
# CONFIG_GENERIC_386 is not set
# CONFIG_386 is not set
# CONFIG_486 is not set
# CONFIG_586 is not set
# CONFIG_586MMX is not set
# CONFIG_686 is not set
# CONFIG_PENTIUMII is not set
CONFIG_PENTIUMIII=y
# CONFIG_PENTIUM4 is not set
# CONFIG_K6 is not set
# CONFIG_K7 is not set
# CONFIG_ELAN is not set
# CONFIG_CRUSOE is not set
# CONFIG_WINCHIPC6 is not set
# CONFIG_WINCHIP2 is not set
# CONFIG_CYRIXIII is not set
# CONFIG_NEHEMIAH is not set
ARCH_LITTLE_ENDIAN=y
#
# Using Little Endian
#
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
KERNEL_HEADERS="<path/to/kernel/headers>"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,59 @@
#
# Automatically generated make config: don't edit
#
# TARGET_alpha is not set
# TARGET_arm is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
TARGET_i386=y
# TARGET_i960 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_x86_64 is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="i386"
# ARCH_SUPPORTS_BIG_ENDIAN is not set
ARCH_SUPPORTS_LITTLE_ENDIAN=y
FORCE_OPTIONS_FOR_ARCH=y
# CONFIG_GENERIC_386 is not set
# CONFIG_386 is not set
# CONFIG_486 is not set
# CONFIG_586 is not set
# CONFIG_586MMX is not set
# CONFIG_686 is not set
# CONFIG_PENTIUMII is not set
# CONFIG_PENTIUMIII is not set
CONFIG_PENTIUM4=y
# CONFIG_K6 is not set
# CONFIG_K7 is not set
# CONFIG_ELAN is not set
# CONFIG_CRUSOE is not set
# CONFIG_WINCHIPC6 is not set
# CONFIG_WINCHIP2 is not set
# CONFIG_CYRIXIII is not set
# CONFIG_NEHEMIAH is not set
ARCH_LITTLE_ENDIAN=y
# ARCH_BIG_ENDIAN is not set
# ARCH_HAS_NO_MMU is not set
ARCH_HAS_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
# UCLIBC_HAS_FENV is not set
KERNEL_HEADERS="<path/to/kernel/headers>"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,65 @@
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313304agb;
Sat, 8 Jan 2011 16:45:19 -0800 (PST)
Received: by 10.227.155.75 with SMTP id r11mr17188266wbw.3.1294533918432;
Sat, 08 Jan 2011 16:45:18 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id k3si33753340wbx.29.2011.01.08.16.45.17;
Sat, 08 Jan 2011 16:45:18 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClHDf; Sun, 09 Jan 2011 01:45:17 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 5/7] ARM: #include <bits/arm_asm.h> where __USE_BX__ is used
Date: Sun, 9 Jan 2011 01:45:08 +0100
Message-Id: <1294533910-19305-6-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
The check for __USE_BX__ will be available in bits/arm_asm.h,
so the latter must be included wherever the former is used.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
ldso/ldso/arm/dl-startup.h | 1 +
libc/sysdeps/linux/arm/sysdep.h | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ldso/ldso/arm/dl-startup.h b/ldso/ldso/arm/dl-startup.h
index a95389d..2dfdaff 100644
--- a/ldso/ldso/arm/dl-startup.h
+++ b/ldso/ldso/arm/dl-startup.h
@@ -7,6 +7,7 @@
*/
#include <features.h>
+#include <bits/arm_asm.h>
#if !defined(__thumb__)
__asm__(
diff --git a/libc/sysdeps/linux/arm/sysdep.h b/libc/sysdeps/linux/arm/sysdep.h
index 013f88c..e498695 100644
--- a/libc/sysdeps/linux/arm/sysdep.h
+++ b/libc/sysdeps/linux/arm/sysdep.h
@@ -21,6 +21,7 @@
#define _LINUX_ARM_SYSDEP_H 1
#include <common/sysdep.h>
+#include <bits/arm_asm.h>
#include <sys/syscall.h>
/* For Linux we can use the system call table in the header file
--
1.7.1

View File

@ -0,0 +1,21 @@
Index: uClibc/ldso/ldso/arm/resolve.S
===================================================================
--- uClibc.orig/ldso/ldso/arm/resolve.S 2009-03-20 12:03:32.000000000 -0700
+++ uClibc/ldso/ldso/arm/resolve.S 2009-03-20 12:04:23.000000000 -0700
@@ -97,7 +97,6 @@
.text
.align 4 @ 16 byte boundary and there are 32 bytes below (arm case)
- #if !defined(__thumb__) || defined(__thumb2__)
.arm
.globl _dl_linux_resolve
.type _dl_linux_resolve,%function
@@ -129,7 +128,7 @@
#else
mov pc,ip
#endif
-#else
+#if 0
@ In the thumb case _dl_linux_resolver is thumb. If a bl is used
@ from arm code the linker will insert a stub call which, with
@ binutils 2.16, is not PIC. Since this code is accessed by an

View File

@ -0,0 +1,63 @@
#
# Automatically generated make config: don't edit
# Wed Jul 9 13:37:36 2008
#
# TARGET_alpha is not set
# TARGET_arm is not set
# TARGET_avr32 is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
TARGET_mips=y
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_vax is not set
# TARGET_x86_64 is not set
# TARGET_xtensa is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="mips"
FORCE_OPTIONS_FOR_ARCH=y
ARCH_CFLAGS="-mno-split-addresses"
# CONFIG_MIPS_O32_ABI is not set
# CONFIG_MIPS_N32_ABI is not set
CONFIG_MIPS_N64_ABI=y
# CONFIG_MIPS_ISA_1 is not set
# CONFIG_MIPS_ISA_2 is not set
# CONFIG_MIPS_ISA_3 is not set
# CONFIG_MIPS_ISA_4 is not set
# CONFIG_MIPS_ISA_MIPS32 is not set
CONFIG_MIPS_ISA_MIPS64=y
TARGET_SUBARCH=""
#
# Using ELF file format
#
ARCH_ANY_ENDIAN=y
# ARCH_BIG_ENDIAN is not set
ARCH_WANTS_BIG_ENDIAN=y
# ARCH_WANTS_LITTLE_ENDIAN=y
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
# DO_C99_MATH is not set
# UCLIBC_HAS_FENV is not set
KERNEL_HEADERS="/usr/include"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,63 @@
#
# Automatically generated make config: don't edit
# Wed Jul 9 13:37:36 2008
#
# TARGET_alpha is not set
# TARGET_arm is not set
# TARGET_avr32 is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
TARGET_mips=y
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_vax is not set
# TARGET_x86_64 is not set
# TARGET_xtensa is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="mips"
FORCE_OPTIONS_FOR_ARCH=y
ARCH_CFLAGS="-mno-split-addresses"
CONFIG_MIPS_O32_ABI=y
# CONFIG_MIPS_N32_ABI is not set
# CONFIG_MIPS_N64_ABI is not set
# CONFIG_MIPS_ISA_1 is not set
# CONFIG_MIPS_ISA_2 is not set
# CONFIG_MIPS_ISA_3 is not set
# CONFIG_MIPS_ISA_4 is not set
CONFIG_MIPS_ISA_MIPS32=y
# CONFIG_MIPS_ISA_MIPS64 is not set
TARGET_SUBARCH=""
#
# Using ELF file format
#
ARCH_ANY_ENDIAN=y
# ARCH_BIG_ENDIAN is not set
# ARCH_WANTS_BIG_ENDIAN is not set
ARCH_WANTS_LITTLE_ENDIAN=y
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
# DO_C99_MATH is not set
# UCLIBC_HAS_FENV is not set
KERNEL_HEADERS="/usr/include"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,73 @@
#
# Automatically generated make config: don't edit
# Sat May 12 22:07:03 2007
#
# TARGET_alpha is not set
TARGET_arm=y
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_vax is not set
# TARGET_x86_64 is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="arm"
FORCE_OPTIONS_FOR_ARCH=y
# CONFIG_ARM_OABI is not set
CONFIG_ARM_EABI=y
USE_BX=y
# CONFIG_GENERIC_ARM is not set
# CONFIG_ARM610 is not set
# CONFIG_ARM710 is not set
# CONFIG_ARM7TDMI is not set
# CONFIG_ARM720T is not set
# CONFIG_ARM920T is not set
# CONFIG_ARM922T is not set
# CONFIG_ARM926T is not set
# CONFIG_ARM10T is not set
# CONFIG_ARM1136JF_S is not set
# CONFIG_ARM1176JZ_S is not set
# CONFIG_ARM1176JZF_S is not set
# CONFIG_ARM_SA110 is not set
# CONFIG_ARM_SA1100 is not set
CONFIG_ARM_XSCALE=y
# CONFIG_ARM_CORTEX_M3 is not set
# CONFIG_ARM_CORTEX_M1 is not set
# CONFIG_ARM_IWMMXT is not set
TARGET_SUBARCH=""
#
# Using ELF file format
#
ARCH_ANY_ENDIAN=y
ARCH_BIG_ENDIAN=y
ARCH_WANTS_BIG_ENDIAN=y
# ARCH_WANTS_LITTLE_ENDIAN is not set
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
# UCLIBC_HAS_FPU is not set
UCLIBC_HAS_SOFT_FLOAT=y
DO_C99_MATH=y
# DO_XSI_MATH is not set
# UCLIBC_HAS_FENV is not set
KERNEL_HEADERS="/usr/include"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,46 @@
#
# Automatically generated make config: don't edit
# Tue Feb 6 19:17:06 2007
#
# TARGET_alpha is not set
# TARGET_arm is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
TARGET_powerpc=y
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_vax is not set
# TARGET_x86_64 is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="powerpc"
FORCE_OPTIONS_FOR_ARCH=y
ARCH_BIG_ENDIAN=y
#
# Using Big Endian
#
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
KERNEL_HEADERS="/usr/include"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,107 @@
Index: git/libc/sysdeps/linux/powerpc/Makefile.arch
===================================================================
--- git.orig/libc/sysdeps/linux/powerpc/Makefile.arch
+++ git/libc/sysdeps/linux/powerpc/Makefile.arch
@@ -5,7 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := __syscall_error.c pread_write.c ioctl.c
+CSRC := __syscall_error.c pread_write.c ioctl.c copysignl.c
ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
CSRC += posix_fadvise.c posix_fadvise64.c
Index: git/libc/sysdeps/linux/powerpc/copysignl.c
===================================================================
--- /dev/null
+++ git/libc/sysdeps/linux/powerpc/copysignl.c
@@ -0,0 +1,89 @@
+/* s_copysignl.c -- long double version of s_copysign.c.
+ * Conversion to long double by Ulrich Drepper,
+ * Cygnus Support, drepper@cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * copysignl(long double x, long double y)
+ * copysignl(x,y) returns a value with the magnitude of x and
+ * with the sign bit of y.
+ */
+
+#include <endian.h>
+#include <stdint.h>
+
+#if __FLOAT_WORD_ORDER == BIG_ENDIAN
+
+typedef union
+{
+ long double value;
+ struct
+ {
+ int sign_exponent:16;
+ unsigned int empty:16;
+ uint32_t msw;
+ uint32_t lsw;
+ } parts;
+} ieee_long_double_shape_type;
+
+#endif
+
+#if __FLOAT_WORD_ORDER == LITTLE_ENDIAN
+
+typedef union
+{
+ long double value;
+ struct
+ {
+ uint32_t lsw;
+ uint32_t msw;
+ int sign_exponent:16;
+ unsigned int empty:16;
+ } parts;
+} ieee_long_double_shape_type;
+
+#endif
+
+/* Get int from the exponent of a long double. */
+
+#define GET_LDOUBLE_EXP(exp,d) \
+do { \
+ ieee_long_double_shape_type ge_u; \
+ ge_u.value = (d); \
+ (exp) = ge_u.parts.sign_exponent; \
+} while (0)
+
+/* Set exponent of a long double from an int. */
+
+#define SET_LDOUBLE_EXP(d,exp) \
+do { \
+ ieee_long_double_shape_type se_u; \
+ se_u.value = (d); \
+ se_u.parts.sign_exponent = (exp); \
+ (d) = se_u.value; \
+} while (0)
+
+long double copysignl(long double x, long double y);
+libc_hidden_proto(copysignl);
+
+long double copysignl(long double x, long double y)
+{
+ uint32_t es1,es2;
+ GET_LDOUBLE_EXP(es1,x);
+ GET_LDOUBLE_EXP(es2,y);
+ SET_LDOUBLE_EXP(x,(es1&0x7fff)|(es2&0x8000));
+ return x;
+}
+
+libc_hidden_def(copysignl);

View File

@ -0,0 +1,76 @@
#
# Automatically generated make config: don't edit
# Version: 0.9.32-git
# Mon Jul 19 01:34:29 2010
#
# TARGET_alpha is not set
TARGET_arm=y
# TARGET_avr32 is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_vax is not set
# TARGET_x86_64 is not set
# TARGET_xtensa is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="arm"
FORCE_OPTIONS_FOR_ARCH=y
# CONFIG_ARM_OABI is not set
CONFIG_ARM_EABI=y
USE_BX=y
# CONFIG_GENERIC_ARM is not set
# CONFIG_ARM610 is not set
# CONFIG_ARM710 is not set
# CONFIG_ARM7TDMI is not set
# CONFIG_ARM720T is not set
# CONFIG_ARM920T is not set
# CONFIG_ARM922T is not set
CONFIG_ARM926T=y
# CONFIG_ARM10T is not set
# CONFIG_ARM1136JF_S is not set
# CONFIG_ARM1176JZ_S is not set
# CONFIG_ARM1176JZF_S is not set
# CONFIG_ARM_CORTEX_M3 is not set
# CONFIG_ARM_CORTEX_M1 is not set
# CONFIG_ARM_SA110 is not set
# CONFIG_ARM_SA1100 is not set
# CONFIG_ARM_XSCALE is not set
# CONFIG_ARM_IWMMXT is not set
TARGET_SUBARCH=""
#
# Using ELF file format
#
ARCH_ANY_ENDIAN=y
ARCH_LITTLE_ENDIAN=y
# ARCH_WANTS_BIG_ENDIAN is not set
ARCH_WANTS_LITTLE_ENDIAN=y
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
# UCLIBC_HAS_FPU is not set
UCLIBC_HAS_SOFT_FLOAT=y
DO_C99_MATH=y
# DO_XSI_MATH is not set
# UCLIBC_HAS_FENV is not set
KERNEL_HEADERS="/usr/include"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,63 @@
#
# Automatically generated make config: don't edit
# Wed Jul 9 13:37:36 2008
#
# TARGET_alpha is not set
# TARGET_arm is not set
# TARGET_avr32 is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
TARGET_mips=y
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_vax is not set
# TARGET_x86_64 is not set
# TARGET_xtensa is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="mips"
FORCE_OPTIONS_FOR_ARCH=y
ARCH_CFLAGS="-mno-split-addresses"
CONFIG_MIPS_O32_ABI=y
# CONFIG_MIPS_N32_ABI is not set
# CONFIG_MIPS_N64_ABI is not set
# CONFIG_MIPS_ISA_1 is not set
# CONFIG_MIPS_ISA_2 is not set
# CONFIG_MIPS_ISA_3 is not set
# CONFIG_MIPS_ISA_4 is not set
CONFIG_MIPS_ISA_MIPS32=y
# CONFIG_MIPS_ISA_MIPS64 is not set
TARGET_SUBARCH=""
#
# Using ELF file format
#
ARCH_ANY_ENDIAN=y
# ARCH_BIG_ENDIAN is not set
ARCH_WANTS_BIG_ENDIAN=y
# ARCH_WANTS_LITTLE_ENDIAN=y
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
# DO_C99_MATH is not set
# UCLIBC_HAS_FENV is not set
KERNEL_HEADERS="/usr/include"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,59 @@
#
# Automatically generated make config: don't edit
#
# TARGET_alpha is not set
# TARGET_arm is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
TARGET_i386=y
# TARGET_i960 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_x86_64 is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="i386"
# ARCH_SUPPORTS_BIG_ENDIAN is not set
ARCH_SUPPORTS_LITTLE_ENDIAN=y
FORCE_OPTIONS_FOR_ARCH=y
# CONFIG_GENERIC_386 is not set
# CONFIG_386 is not set
# CONFIG_486 is not set
# CONFIG_586 is not set
# CONFIG_586MMX is not set
# CONFIG_686 is not set
# CONFIG_PENTIUMII is not set
# CONFIG_PENTIUMIII is not set
CONFIG_PENTIUM4=y
# CONFIG_K6 is not set
# CONFIG_K7 is not set
# CONFIG_ELAN is not set
# CONFIG_CRUSOE is not set
# CONFIG_WINCHIPC6 is not set
# CONFIG_WINCHIP2 is not set
# CONFIG_CYRIXIII is not set
# CONFIG_NEHEMIAH is not set
ARCH_LITTLE_ENDIAN=y
# ARCH_BIG_ENDIAN is not set
# ARCH_HAS_NO_MMU is not set
ARCH_HAS_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
# UCLIBC_HAS_FENV is not set
KERNEL_HEADERS="<path/to/kernel/headers>"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,91 @@
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313309agb;
Sat, 8 Jan 2011 16:45:20 -0800 (PST)
Received: by 10.216.173.7 with SMTP id u7mr612034wel.50.1294533919433;
Sat, 08 Jan 2011 16:45:19 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id e10si33752027wer.68.2011.01.08.16.45.19;
Sat, 08 Jan 2011 16:45:19 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClJDu; Sun, 09 Jan 2011 01:45:18 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 7/7] ARM: remove EABI/OABI selection
Date: Sun, 9 Jan 2011 01:45:10 +0100
Message-Id: <1294533910-19305-8-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
Rely on the compiler to be properly setup for the default ABI.
When installing-headers, there are two cases:
- NPTL: no issue, a cross-compiler is already expected
- LinuxThreads: no issue, EABI/OABI has no impact on installed headers.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
extra/Configs/Config.arm | 11 -----------
libc/sysdeps/linux/arm/Makefile.arch | 9 +++++++--
libc/sysdeps/linux/arm/bits/huge_val.h | 4 ++--
3 files changed, 9 insertions(+), 15 deletions(-)
Index: git/libc/sysdeps/linux/arm/Makefile.arch
===================================================================
--- git.orig/libc/sysdeps/linux/arm/Makefile.arch
+++ git/libc/sysdeps/linux/arm/Makefile.arch
@@ -24,7 +24,12 @@ ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
CSRC += posix_fadvise.c posix_fadvise64.c
endif
-ifeq ($(CONFIG_ARM_EABI),y)
+# Is our compiler set up for EABI ?
+IS_EABI:=$(shell $(CC) $(CFLAGS) -x c - -E -dM </dev/null 2>/dev/null \
+ |sed -r -e '/^\#[[:space:]]*define[[:space:]]+__ARM_EABI__([[:space:]]+1)?$$/!d; s/.+/y/;' \
+ )
+
+ifeq ($(IS_EABI),y)
CSRC += aeabi_assert.c aeabi_atexit.c aeabi_errno_addr.c \
aeabi_localeconv.c aeabi_memclr.c aeabi_memcpy.c \
aeabi_memmove.c aeabi_memset.c find_exidx.c
@@ -37,7 +42,7 @@ else
CSRC += syscall.c
endif
-ifeq ($(CONFIG_ARM_EABI),y)
+ifeq ($(IS_EABI),y)
libc-static-y += $(ARCH_OUT)/aeabi_lcsts.o $(ARCH_OUT)/aeabi_math.o \
$(ARCH_OUT)/aeabi_sighandlers.o
libc-nonshared-y += $(ARCH_OUT)/aeabi_lcsts.os $(ARCH_OUT)/aeabi_math.os \
Index: git/libc/sysdeps/linux/arm/bits/huge_val.h
===================================================================
--- git.orig/libc/sysdeps/linux/arm/bits/huge_val.h
+++ git/libc/sysdeps/linux/arm/bits/huge_val.h
@@ -32,7 +32,7 @@
# define HUGE_VAL (__extension__ 0x1.0p2047)
#elif defined __GNUC__
-#ifndef __CONFIG_ARM_EABI__
+#ifndef __ARM_EABI__
# define HUGE_VAL \
(__extension__ \
((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
@@ -50,7 +50,7 @@
typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
-#ifndef __CONFIG_ARM_EABI__
+#ifndef __ARM_EABI__
# if __BYTE_ORDER == __BIG_ENDIAN
# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0x7f, 0xf0, 0, 0 }
# endif

View File

@ -0,0 +1,215 @@
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313303agb;
Sat, 8 Jan 2011 16:45:18 -0800 (PST)
Received: by 10.227.98.158 with SMTP id q30mr1255804wbn.151.1294533917314;
Sat, 08 Jan 2011 16:45:17 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id r3si33749838wbr.54.2011.01.08.16.45.16;
Sat, 08 Jan 2011 16:45:17 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClGDS; Sun, 09 Jan 2011 01:45:16 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 3/7] ARM: remove sub-arch/variants selection from menuconfig
Date: Sun, 9 Jan 2011 01:45:06 +0100
Message-Id: <1294533910-19305-4-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
Rely on the compiler to be correctly set up to generate
appropriate code for the target variant.
This exposes the Thumb option, as it is no longer auto-selected.
The "Use BX" no longer depends on supported CPU to be selected,
so it now defaults to 'n' as it shall work by default on CPUs
that do not have BX.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
Rules.mak | 19 -------
extra/Configs/Config.arm | 125 ++--------------------------------------------
2 files changed, 5 insertions(+), 139 deletions(-)
diff --git a/Rules.mak b/Rules.mak
index 2a16908..09741a6 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -332,25 +332,6 @@ ifeq ($(TARGET_ARCH),arm)
OPTIMIZATION+=-fstrict-aliasing
CPU_CFLAGS-$(ARCH_LITTLE_ENDIAN)+=-mlittle-endian
CPU_CFLAGS-$(ARCH_BIG_ENDIAN)+=-mbig-endian
- CPU_CFLAGS-$(CONFIG_GENERIC_ARM)+=
- CPU_CFLAGS-$(CONFIG_ARM610)+=-mtune=arm610 -march=armv3
- CPU_CFLAGS-$(CONFIG_ARM710)+=-mtune=arm710 -march=armv3
- CPU_CFLAGS-$(CONFIG_ARM7TDMI)+=-mtune=arm7tdmi -march=armv4t
- CPU_CFLAGS-$(CONFIG_ARM720T)+=-mtune=arm7tdmi -march=armv4t
- CPU_CFLAGS-$(CONFIG_ARM920T)+=-mtune=arm9tdmi -march=armv4t
- CPU_CFLAGS-$(CONFIG_ARM922T)+=-mtune=arm9tdmi -march=armv4t
- CPU_CFLAGS-$(CONFIG_ARM926T)+=-mtune=arm9e -march=armv5te
- CPU_CFLAGS-$(CONFIG_ARM10T)+=-mtune=arm10tdmi -march=armv5t
- CPU_CFLAGS-$(CONFIG_ARM1136JF_S)+=-mtune=arm1136jf-s -march=armv6
- CPU_CFLAGS-$(CONFIG_ARM1176JZ_S)+=-mtune=arm1176jz-s -march=armv6
- CPU_CFLAGS-$(CONFIG_ARM1176JZF_S)+=-mtune=arm1176jzf-s -march=armv6
- CPU_CFLAGS-$(CONFIG_ARM_SA110)+=-mtune=strongarm110 -march=armv4
- CPU_CFLAGS-$(CONFIG_ARM_SA1100)+=-mtune=strongarm1100 -march=armv4
- CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=$(call check_gcc,-mtune=xscale,-mtune=strongarm110)
- CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=-march=armv5te -Wa,-mcpu=xscale
- CPU_CFLAGS-$(CONFIG_ARM_IWMMXT)+=-march=iwmmxt -Wa,-mcpu=iwmmxt -mabi=iwmmxt
- CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M3)+=-mcpu=cortex-m3
- CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M1)+=-mcpu=cortex-m1
CPU_CFLAGS-$(COMPILE_IN_THUMB_MODE)+=-mthumb
endif
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index c9c40d4..6c75a00 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -30,129 +30,14 @@ config CONFIG_ARM_EABI
endchoice
-choice
- prompt "Target Processor Type"
- default CONFIG_GENERIC_ARM
- help
- This is the processor type of your CPU. This information is used for
- optimizing purposes. To build a library that will run on all ARMCPU
- types (albeit not optimally fast), you can specify "Generic Arm" here.
- If you pick anything other than "Generic Arm", there is no guarantee
- that uClibc will even run on anything other than the selected
- processor type.
-
- Here are the settings recommended for greatest speed:
- - "Generic Arm" select this if your compiler is already setup to
- optimize things properly, or if you want to run on pretty much
- everything, or you just don't much care.
- - For anything else, pick the ARM core type that best matches the
- cpu you will be using on your device.
-
- If you don't know what to do, choose "Generic Arm".
-
-config CONFIG_GENERIC_ARM
- bool "Generic Arm"
-
-config CONFIG_ARM610
- bool "Arm 610"
- select ARCH_HAS_MMU
-
-config CONFIG_ARM710
- bool "Arm 710"
- select ARCH_HAS_MMU
-
-config CONFIG_ARM7TDMI
- bool "Arm 7TDMI"
- select ARCH_HAS_NO_MMU
- select HAS_THUMB
-
-config CONFIG_ARM720T
- bool "Arm 720T"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM920T
- bool "Arm 920T"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM922T
- bool "Arm 922T"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM926T
- bool "Arm 926T"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM10T
- bool "Arm 10T"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM1136JF_S
- bool "Arm 1136JF-S"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM1176JZ_S
- bool "Arm 1176JZ-S"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM1176JZF_S
- bool "Arm 1176JZF-S"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM_CORTEX_M3
- bool "Arm Cortex-M3"
- select ARCH_HAS_NO_MMU
- select FORCE_THUMB
-
-config CONFIG_ARM_CORTEX_M1
- bool "Arm Cortex-M1"
- select ARCH_HAS_NO_MMU
- select FORCE_THUMB
-
-config CONFIG_ARM_SA110
- bool "Intel StrongArm SA-110"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM_SA1100
- bool "Intel StrongArm SA-1100"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM_XSCALE
- bool "Intel Xscale"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM_IWMMXT
- bool "Intel Xscale With WMMX PXA27x"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-endchoice
-
-config HAS_THUMB
- bool
-
-config FORCE_THUMB
- bool
- select HAS_THUMB
- select COMPILE_IN_THUMB_MODE
- select USE_BX
-
config COMPILE_IN_THUMB_MODE
- bool
+ bool "Build using Thumb mode"
+ select USE_BX
+ help
+ Say 'y' here to force building uClibc in thumb mode.
+ Say 'n' to use your compiler's default mode.
config USE_BX
bool "Use BX in function return"
- default y
- depends on HAS_THUMB
help
Use BX instruction for THUMB aware architectures.
--
1.7.1

View File

@ -0,0 +1,186 @@
Index: git/include/features.h
===================================================================
--- git.orig/include/features.h
+++ git/include/features.h
@@ -186,7 +186,6 @@
# define __need_uClibc_config_h
# include <bits/uClibc_config.h>
# undef __need_uClibc_config_h
-
/* For uClibc, always optimize for size -- this should disable
* a lot of expensive inlining...
* TODO: this is wrong! __OPTIMIZE_SIZE__ is an indicator of
Index: git/libpthread/nptl/pthread_mutex_timedlock.c
===================================================================
--- git.orig/libpthread/nptl/pthread_mutex_timedlock.c
+++ git/libpthread/nptl/pthread_mutex_timedlock.c
@@ -29,7 +29,9 @@
* error: can't find a register in class GENERAL_REGS while reloading asm
*/
int
+#ifndef __OPTIMIZE__
attribute_optimize("Os")
+#endif
pthread_mutex_timedlock (
pthread_mutex_t *mutex,
const struct timespec *abstime)
Index: git/libc/sysdeps/linux/powerpc/bits/mathinline.h
===================================================================
--- git.orig/libc/sysdeps/linux/powerpc/bits/mathinline.h
+++ git/libc/sysdeps/linux/powerpc/bits/mathinline.h
@@ -27,7 +27,7 @@
#ifdef __cplusplus
# define __MATH_INLINE __inline
#else
-# define __MATH_INLINE extern __inline
+# define __MATH_INLINE __extern_inline
#endif /* __cplusplus */
#if defined __GNUC__ && !defined _SOFT_FLOAT
Index: git/libc/sysdeps/linux/alpha/bits/mathinline.h
===================================================================
--- git.orig/libc/sysdeps/linux/alpha/bits/mathinline.h
+++ git/libc/sysdeps/linux/alpha/bits/mathinline.h
@@ -25,7 +25,7 @@
#ifdef __cplusplus
# define __MATH_INLINE __inline
#else
-# define __MATH_INLINE extern __inline
+# define __MATH_INLINE __extern_inline
#endif
#if defined __USE_ISOC99 && defined __GNUC__ && !__GNUC_PREREQ(3,0)
Index: git/libc/sysdeps/linux/common/bits/socket.h
===================================================================
--- git.orig/libc/sysdeps/linux/common/bits/socket.h
+++ git/libc/sysdeps/linux/common/bits/socket.h
@@ -302,7 +302,7 @@ extern struct cmsghdr *__cmsg_nxthdr (st
libc_hidden_proto(__cmsg_nxthdr)
#ifdef __USE_EXTERN_INLINES
# ifndef _EXTERN_INLINE
-# define _EXTERN_INLINE extern __inline
+# define _EXTERN_INLINE __extern_inline
# endif
_EXTERN_INLINE struct cmsghdr *
__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
Index: git/libc/sysdeps/linux/i386/bits/mathinline.h
===================================================================
--- git.orig/libc/sysdeps/linux/i386/bits/mathinline.h
+++ git/libc/sysdeps/linux/i386/bits/mathinline.h
@@ -26,7 +26,7 @@
#ifdef __cplusplus
# define __MATH_INLINE __inline
#else
-# define __MATH_INLINE extern __inline
+# define __MATH_INLINE __extern_inline
#endif
Index: git/libc/sysdeps/linux/ia64/bits/mathinline.h
===================================================================
--- git.orig/libc/sysdeps/linux/ia64/bits/mathinline.h
+++ git/libc/sysdeps/linux/ia64/bits/mathinline.h
@@ -24,7 +24,7 @@
#ifdef __cplusplus
# define __MATH_INLINE __inline
#else
-# define __MATH_INLINE extern __inline
+# define __MATH_INLINE __extern_inline
#endif
#if defined __USE_ISOC99 && defined __GNUC__ && __GNUC__ >= 2
Index: git/libc/sysdeps/linux/m68k/bits/mathinline.h
===================================================================
--- git.orig/libc/sysdeps/linux/m68k/bits/mathinline.h
+++ git/libc/sysdeps/linux/m68k/bits/mathinline.h
@@ -92,7 +92,7 @@
# ifdef __cplusplus
# define __m81_inline __inline
# else
-# define __m81_inline extern __inline
+# define __m81_inline __extern_inline
# endif
# define __M81_MATH_INLINES 1
#endif
@@ -351,14 +351,14 @@ __inline_functions (long double,l)
/* Note that there must be no whitespace before the argument passed for
NAME, to make token pasting work correctly with -traditional. */
# define __inline_forward_c(rettype, name, args1, args2) \
-extern __inline rettype __attribute__((__const__)) \
+__extern_inline rettype __attribute__((__const__)) \
name args1 \
{ \
return __CONCAT(__,name) args2; \
}
# define __inline_forward(rettype, name, args1, args2) \
-extern __inline rettype name args1 \
+__extern_inline rettype name args1 \
{ \
return __CONCAT(__,name) args2; \
}
Index: git/libc/sysdeps/linux/mips/bits/socket.h
===================================================================
--- git.orig/libc/sysdeps/linux/mips/bits/socket.h
+++ git/libc/sysdeps/linux/mips/bits/socket.h
@@ -307,7 +307,7 @@ extern struct cmsghdr *__cmsg_nxthdr (st
libc_hidden_proto(__cmsg_nxthdr)
#ifdef __USE_EXTERN_INLINES
# ifndef _EXTERN_INLINE
-# define _EXTERN_INLINE extern __inline
+# define _EXTERN_INLINE __extern_inline
# endif
_EXTERN_INLINE struct cmsghdr *
__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
Index: git/libc/sysdeps/linux/mips/sys/tas.h
===================================================================
--- git.orig/libc/sysdeps/linux/mips/sys/tas.h
+++ git/libc/sysdeps/linux/mips/sys/tas.h
@@ -30,7 +30,7 @@ extern int _test_and_set (int *p, int v)
#ifdef __USE_EXTERN_INLINES
# ifndef _EXTERN_INLINE
-# define _EXTERN_INLINE extern __inline
+# define _EXTERN_INLINE __extern_inline
# endif
_EXTERN_INLINE int
Index: git/libc/sysdeps/linux/sparc/bits/mathinline.h
===================================================================
--- git.orig/libc/sysdeps/linux/sparc/bits/mathinline.h
+++ git/libc/sysdeps/linux/sparc/bits/mathinline.h
@@ -131,7 +131,7 @@
# ifdef __cplusplus
# define __MATH_INLINE __inline
# else
-# define __MATH_INLINE extern __inline
+# define __MATH_INLINE __extern_inline
# endif /* __cplusplus */
/* The gcc, version 2.7 or below, has problems with all this inlining
Index: git/libc/sysdeps/linux/sparc/bits/socket.h
===================================================================
--- git.orig/libc/sysdeps/linux/sparc/bits/socket.h
+++ git/libc/sysdeps/linux/sparc/bits/socket.h
@@ -292,7 +292,7 @@ extern struct cmsghdr *__cmsg_nxthdr (st
libc_hidden_proto(__cmsg_nxthdr)
#ifdef __USE_EXTERN_INLINES
# ifndef _EXTERN_INLINE
-# define _EXTERN_INLINE extern __inline
+# define _EXTERN_INLINE __extern_inline
# endif
_EXTERN_INLINE struct cmsghdr *
__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
Index: git/libc/sysdeps/linux/x86_64/bits/mathinline.h
===================================================================
--- git.orig/libc/sysdeps/linux/x86_64/bits/mathinline.h
+++ git/libc/sysdeps/linux/x86_64/bits/mathinline.h
@@ -25,7 +25,7 @@
#ifdef __cplusplus
# define __MATH_INLINE __inline
#else
-# define __MATH_INLINE extern __inline
+# define __MATH_INLINE __extern_inline
#endif

View File

@ -0,0 +1,72 @@
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313299agb;
Sat, 8 Jan 2011 16:45:16 -0800 (PST)
Received: by 10.227.134.5 with SMTP id h5mr1312651wbt.75.1294533915992;
Sat, 08 Jan 2011 16:45:15 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id m42si33753731wej.65.2011.01.08.16.45.15;
Sat, 08 Jan 2011 16:45:15 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClEDA; Sun, 09 Jan 2011 01:45:15 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 1/7] ARM: reorder "Use BX" option
Date: Sun, 9 Jan 2011 01:45:04 +0100
Message-Id: <1294533910-19305-2-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
"Use BX" is not available on all CPUs, so the option depends on
a correct CPU to be chosen . It is weird that e BX" then appears
_above_ the CPU selection, not below.
Move the "Use BX" after the CPU selection.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
extra/Configs/Config.arm | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index b060ace..3b90e67 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -30,13 +30,6 @@ config CONFIG_ARM_EABI
endchoice
-config USE_BX
- bool "Use BX in function return"
- default y
- depends on !CONFIG_GENERIC_ARM && !CONFIG_ARM610 && !CONFIG_ARM710
- help
- Use BX instruction for THUMB aware architectures.
-
choice
prompt "Target Processor Type"
default CONFIG_GENERIC_ARM
@@ -131,3 +124,10 @@ config CONFIG_ARM_IWMMXT
select ARCH_HAS_MMU
endchoice
+
+config USE_BX
+ bool "Use BX in function return"
+ default y
+ depends on !CONFIG_GENERIC_ARM && !CONFIG_ARM610 && !CONFIG_ARM710
+ help
+ Use BX instruction for THUMB aware architectures.
--
1.7.1

View File

@ -0,0 +1,172 @@
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313301agb;
Sat, 8 Jan 2011 16:45:17 -0800 (PST)
Received: by 10.216.186.82 with SMTP id v60mr20017574wem.56.1294533916559;
Sat, 08 Jan 2011 16:45:16 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id o13si33755824wee.56.2011.01.08.16.45.16;
Sat, 08 Jan 2011 16:45:16 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClFDL; Sun, 09 Jan 2011 01:45:16 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 2/7] ARM: introduce blind options to select & force THUMB mode
Date: Sun, 9 Jan 2011 01:45:05 +0100
Message-Id: <1294533910-19305-3-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
Add three new blind options to set use of Thumb mode:
- COMPILE_IN_THUMB_MODE
- if set, CFLAGS will contain -mthumb
- if unset, the compiler's default is used
- HAS_THUMB
- CPUS with Thumb instruction set can select this
- use of BX depends on this
- FORCE_THUMB
- CPUs that are Thumb-only must select this
- this selects: HAS_THUMB, COMPILE_IN_THUMB_MODE and USE_BX
Also, remove leading space in Rules.mak.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
Rules.mak | 7 ++++---
extra/Configs/Config.arm | 31 ++++++++++++++++++++++++++++---
2 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/Rules.mak b/Rules.mak
index eecdc64..2a16908 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -348,9 +348,10 @@ ifeq ($(TARGET_ARCH),arm)
CPU_CFLAGS-$(CONFIG_ARM_SA1100)+=-mtune=strongarm1100 -march=armv4
CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=$(call check_gcc,-mtune=xscale,-mtune=strongarm110)
CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=-march=armv5te -Wa,-mcpu=xscale
- CPU_CFLAGS-$(CONFIG_ARM_IWMMXT)+=-march=iwmmxt -Wa,-mcpu=iwmmxt -mabi=iwmmxt
- CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M3)+=-mcpu=cortex-m3 -mthumb
- CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M1)+=-mcpu=cortex-m1 -mthumb
+ CPU_CFLAGS-$(CONFIG_ARM_IWMMXT)+=-march=iwmmxt -Wa,-mcpu=iwmmxt -mabi=iwmmxt
+ CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M3)+=-mcpu=cortex-m3
+ CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M1)+=-mcpu=cortex-m1
+ CPU_CFLAGS-$(COMPILE_IN_THUMB_MODE)+=-mthumb
endif
ifeq ($(TARGET_ARCH),mips)
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index 3b90e67..c9c40d4 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -64,70 +64,95 @@ config CONFIG_ARM710
config CONFIG_ARM7TDMI
bool "Arm 7TDMI"
select ARCH_HAS_NO_MMU
+ select HAS_THUMB
config CONFIG_ARM720T
bool "Arm 720T"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM920T
bool "Arm 920T"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM922T
bool "Arm 922T"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM926T
bool "Arm 926T"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM10T
bool "Arm 10T"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM1136JF_S
bool "Arm 1136JF-S"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM1176JZ_S
bool "Arm 1176JZ-S"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM1176JZF_S
bool "Arm 1176JZF-S"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM_CORTEX_M3
bool "Arm Cortex-M3"
select ARCH_HAS_NO_MMU
- select USE_BX
+ select FORCE_THUMB
config CONFIG_ARM_CORTEX_M1
bool "Arm Cortex-M1"
select ARCH_HAS_NO_MMU
- select USE_BX
+ select FORCE_THUMB
config CONFIG_ARM_SA110
bool "Intel StrongArm SA-110"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM_SA1100
bool "Intel StrongArm SA-1100"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM_XSCALE
bool "Intel Xscale"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM_IWMMXT
bool "Intel Xscale With WMMX PXA27x"
select ARCH_HAS_MMU
+ select HAS_THUMB
endchoice
+config HAS_THUMB
+ bool
+
+config FORCE_THUMB
+ bool
+ select HAS_THUMB
+ select COMPILE_IN_THUMB_MODE
+ select USE_BX
+
+config COMPILE_IN_THUMB_MODE
+ bool
+
config USE_BX
bool "Use BX in function return"
default y
- depends on !CONFIG_GENERIC_ARM && !CONFIG_ARM610 && !CONFIG_ARM710
+ depends on HAS_THUMB
help
Use BX instruction for THUMB aware architectures.
--
1.7.1

View File

@ -0,0 +1,48 @@
#
# Automatically generated make config: don't edit
#
# TARGET_alpha is not set
# TARGET_arm is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
# TARGET_i960 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
TARGET_sh=y
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_x86_64 is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="sh"
ARCH_SUPPORTS_BIG_ENDIAN=y
ARCH_SUPPORTS_LITTLE_ENDIAN=y
FORCE_OPTIONS_FOR_ARCH=y
# CONFIG_SH2A is not set
# CONFIG_SH2 is not set
# CONFIG_SH3 is not set
CONFIG_SH4=y
ARCH_LITTLE_ENDIAN=y
# ARCH_BIG_ENDIAN is not set
ARCH_WANTS_LITTLE_ENDIAN=y
# ARCH_WANTS_BIG_ENDIAN is not set
# ARCH_HAS_NO_MMU is not set
ARCH_HAS_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
# UCLIBC_HAS_FENV is not set
KERNEL_HEADERS="<path/to/kernel/headers>"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,71 @@
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313305agb;
Sat, 8 Jan 2011 16:45:19 -0800 (PST)
Received: by 10.216.153.210 with SMTP id f60mr573848wek.114.1294533918335;
Sat, 08 Jan 2011 16:45:18 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id n4si33737071wej.152.2011.01.08.16.45.17;
Sat, 08 Jan 2011 16:45:18 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClGDX; Sun, 09 Jan 2011 01:45:17 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 4/7] ARM: transform the EABI/OABI choice into a boolean
Date: Sun, 9 Jan 2011 01:45:07 +0100
Message-Id: <1294533910-19305-5-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
The CONFIG_ARM_OABI option is never used.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
extra/Configs/Config.arm | 23 ++++++++---------------
1 files changed, 8 insertions(+), 15 deletions(-)
Index: git/extra/Configs/Config.arm
===================================================================
--- git.orig/extra/Configs/Config.arm
+++ git/extra/Configs/Config.arm
@@ -12,23 +12,16 @@ config FORCE_OPTIONS_FOR_ARCH
default y
select ARCH_ANY_ENDIAN
-choice
- prompt "Target ABI"
- default CONFIG_ARM_EABI
+config CONFIG_ARM_EABI
+ bool "Build for EABI"
help
- If you choose "EABI" here, functions and constants required by the
- ARM EABI will be built into the library. You should choose "EABI"
+ If you say 'y' here, functions and constants required by the
+ ARM EABI will be built into the library. You should say 'y'
if your compiler uses the ARM EABI, in which case you will also
- need a kernel supporting the EABI system call interface, or "OABI"
- for a compiler using the old Linux ABI.
-
-config CONFIG_ARM_OABI
- bool "OABI"
-
-config CONFIG_ARM_EABI
- bool "EABI"
+ need a kernel supporting the EABI system call interface.
-endchoice
+ If you say 'n' here, then the library will be built for the
+ old Linux ABI.
config COMPILE_IN_THUMB_MODE
bool "Build using Thumb mode"

View File

@ -0,0 +1,157 @@
#
# General Library Settings
#
# HAVE_NO_PIC is not set
# DOPIC is not set
# HAVE_NO_SHARED is not set
# ARCH_HAS_NO_LDSO is not set
HAVE_SHARED=y
# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
LDSO_LDD_SUPPORT=y
LDSO_CACHE_SUPPORT=y
# LDSO_PRELOAD_FILE_SUPPORT is not set
LDSO_BASE_FILENAME="ld.so"
# UCLIBC_STATIC_LDCONFIG is not set
LDSO_RUNPATH=y
UCLIBC_CTOR_DTOR=y
LDSO_GNU_HASH_SUPPORT=y
# HAS_NO_THREADS is not set
UCLIBC_HAS_THREADS=y
UCLIBC_HAS_THREADS_NATIVE=y
PTHREADS_DEBUG_SUPPORT=y
# LINUXTHREADS_OLD is not set
UCLIBC_HAS_LFS=y
# MALLOC is not set
# MALLOC_SIMPLE is not set
MALLOC_STANDARD=y
MALLOC_GLIBC_COMPAT=y
UCLIBC_DYNAMIC_ATEXIT=y
COMPAT_ATEXIT=y
UCLIBC_SUSV3_LEGACY=y
UCLIBC_SUSV3_LEGACY_MACROS=y
UCLIBC_SUSV4_LEGACY=y
UCLIBC_HAS_SHADOW=y
UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
UCLIBC_HAS___PROGNAME=y
UNIX98PTY_ONLY=y
ASSUME_DEVPTS=y
UCLIBC_HAS_LIBUTIL=y
UCLIBC_HAS_TM_EXTENSIONS=y
UCLIBC_HAS_TZ_CACHING=y
UCLIBC_HAS_TZ_FILE=y
UCLIBC_HAS_TZ_FILE_READ_MANY=y
UCLIBC_TZ_FILE_PATH="/etc/TZ"
#
# Advanced Library Settings
#
UCLIBC_PWD_BUFFER_SIZE=256
UCLIBC_GRP_BUFFER_SIZE=256
#
# Networking Support
#
UCLIBC_HAS_IPV6=y
UCLIBC_HAS_RPC=y
UCLIBC_HAS_FULL_RPC=y
# UCLIBC_HAS_REENTRANT_RPC is not set
UCLIBC_USE_NETLINK=y
UCLIBC_SUPPORT_AI_ADDRCONFIG=y
UCLIBC_HAS_BSD_RES_CLOSE=y
UCLIBC_HAS_LIBRESOLV_STUB=y
UCLIBC_HAS_LIBNSL_STUB=y
#
# String and Stdio Support
#
UCLIBC_HAS_STRING_GENERIC_OPT=y
UCLIBC_HAS_STRING_ARCH_OPT=y
UCLIBC_HAS_CTYPE_TABLES=y
UCLIBC_HAS_CTYPE_SIGNED=y
# UCLIBC_HAS_CTYPE_UNSAFE is not set
UCLIBC_HAS_CTYPE_CHECKED=y
# UCLIBC_HAS_CTYPE_ENFORCED is not set
UCLIBC_HAS_WCHAR=y
# UCLIBC_HAS_LOCALE is not set
UCLIBC_HAS_HEXADECIMAL_FLOATS=y
UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y
# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
UCLIBC_HAS_STDIO_BUFSIZ_256=y
# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_4096 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
UCLIBC_HAS_STDIO_GETC_MACRO=y
UCLIBC_HAS_STDIO_PUTC_MACRO=y
UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
UCLIBC_HAS_PRINTF_M_SPEC=y
UCLIBC_HAS_ERRNO_MESSAGES=y
# UCLIBC_HAS_SYS_ERRLIST is not set
UCLIBC_HAS_SIGNUM_MESSAGES=y
# UCLIBC_HAS_SYS_SIGLIST is not set
UCLIBC_HAS_GNU_GETOPT=y
UCLIBC_HAS_GNU_GETSUBOPT=y
#
# Big and Tall
#
UCLIBC_HAS_REGEX=y
# UCLIBC_HAS_REGEX_OLD is not set
UCLIBC_HAS_FNMATCH=y
# UCLIBC_HAS_FNMATCH_OLD is not set
UCLIBC_HAS_WORDEXP=y
UCLIBC_HAS_NFTW=y
UCLIBC_HAS_FTW=y
UCLIBC_HAS_FTS=y
UCLIBC_HAS_GLOB=y
UCLIBC_HAS_GNU_GLOB=y
#
# Library Installation Options
#
SHARED_LIB_LOADER_PREFIX="/lib"
RUNTIME_PREFIX="/"
DEVEL_PREFIX="//usr"
#
# Security options
#
# UCLIBC_BUILD_PIE is not set
# UCLIBC_HAS_ARC4RANDOM is not set
# HAVE_NO_SSP is not set
# UCLIBC_HAS_SSP is not set
UCLIBC_BUILD_RELRO=y
UCLIBC_BUILD_NOW=y
UCLIBC_BUILD_NOEXECSTACK=y
#
# uClibc development/debugging options
#
CROSS_COMPILER_PREFIX=""
UCLIBC_EXTRA_CFLAGS=""
# DODEBUG is not set
# DODEBUG_PT is not set
# DOSTRIP is not set
# DOASSERTS is not set
# SUPPORT_LD_DEBUG is not set
# SUPPORT_LD_DEBUG_EARLY is not set
# UCLIBC_MALLOC_DEBUGGING is not set
WARNINGS="-Wall"
# EXTRA_WARNINGS is not set
# DOMULTI is not set
# UCLIBC_MJN3_ONLY is not set
# math stuff for perl
DO_C99_MATH=y
UCLIBC_HAS_LONG_DOUBLE_MATH=y

View File

@ -0,0 +1,13 @@
Index: uclibc-0.9.29/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h
===================================================================
--- uclibc-0.9.29.orig/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h
+++ uclibc-0.9.29/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h
@@ -38,4 +38,8 @@
/* define if target supports IEEE signed zero floats */
#define __UCLIBC_HAVE_SIGNED_ZERO__
+#ifdef __ARM_EABI__
+# define __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+#endif
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

View File

@ -0,0 +1,30 @@
Index: uClibc/test/math/libm-test.inc
===================================================================
--- uClibc/test/math/libm-test.inc (revision 23784)
+++ uClibc/test/math/libm-test.inc (working copy)
@@ -3414,7 +3414,6 @@
}
-#if 0
static void
log2_test (void)
{
@@ -3444,7 +3443,6 @@
END (log2);
}
-#endif
static void
@@ -4967,9 +4965,7 @@
log_test ();
log10_test ();
log1p_test ();
-#if 0
log2_test ();
-#endif
logb_test ();
modf_test ();
ilogb_test ();

View File

@ -0,0 +1,42 @@
#
# Automatically generated make config: don't edit
#
# TARGET_alpha is not set
# TARGET_arm is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
# TARGET_i960 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
TARGET_x86_64=y
#
# Target Architecture Features and Options
#
TARGET_ARCH="x86_64"
# ARCH_SUPPORTS_BIG_ENDIAN is not set
ARCH_SUPPORTS_LITTLE_ENDIAN=y
FORCE_OPTIONS_FOR_ARCH=y
ARCH_LITTLE_ENDIAN=y
# ARCH_BIG_ENDIAN is not set
# ARCH_HAS_NO_MMU is not set
ARCH_HAS_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
# UCLIBC_HAS_FENV is not set
KERNEL_HEADERS="<path/to/kernel/headers>"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,33 @@
SECTION = "base"
require uclibc_git.bb
DEPENDS = "linux-libc-headers ncurses-native virtual/${TARGET_PREFIX}gcc-initial"
PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
PACKAGES = ""
PACKAGES_DYNAMIC = ""
STAGINGCC = "gcc-cross-initial"
STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-initial"
do_install() {
# Install initial headers into the cross dir
make PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \
install_headers install_startfiles
${CC} -nostdlib -nostartfiles -shared -x c /dev/null \
-o lib/libc.so
${CC} -nostdlib -nostartfiles -shared -x c /dev/null \
-o lib/libm.so
install -d ${D}${libdir}
install -m 755 lib/lib[cm].so ${D}${libdir}
# add links to linux-libc-headers: gcc-{cross,crossdk}-intermediate need this.
}
do_compile() {
:
}
do_siteconfig () {
:
}
do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}"

View File

@ -0,0 +1,212 @@
SUMMARY = "C library for embedded systems"
DESCRIPTION = "The name uClibc is an abbreviation for 'the \
microcontroller C library'. For simplicity, uClibc is pronounced \
'yew-see-lib-see'. The goal of uClibc is to provide as much \
functionality as possible in a small amount of space, and it is intended \
primarily for embedded use. It is also highly configurable in supported \
features, at the cost of ABI differences for different configurations. \
uClibc has been designed from the ground up to be a C library for \
embedded Linux. It is NOT compatible with binaries linked against glibc."
LICENSE = "LGPL"
SECTION = "libs"
PRIORITY = "required"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://COPYING.LIB.boilerplate;md5=aaddeadcddeb918297e0e4afc52ce46f \
file://${S}/test/regex/testregex.c;startline=1;endline=31;md5=234efb227d0a40677f895e4a1e26e960"
INC_PR = "r0"
require uclibc-config.inc
STAGINGCC = "gcc-cross-intermediate"
STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-intermediate"
PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
# siteconfig.bbclass runs configure which needs a working compiler
# For the compiler to work we need a working libc yet libc isn't
# in the sysroots directory at this point. This means the libc.so
# linker script won't work as the --sysroot setting isn't correct.
# Here we create a hacked up libc linker script and pass in the right
# flags to let configure work. Ugly.
EXTRASITECONFIG = "CFLAGS='${CFLAGS} -Wl,-L${WORKDIR}/site_config_libc -L${WORKDIR}/site_config_libc -L${SYSROOT_DESTDIR}${libdir} -L${SYSROOT_DESTDIR}${base_libdir} -Wl,-L${SYSROOT_DESTDIR}${libdir} -Wl,-L${SYSROOT_DESTDIR}${base_libdir}'"
siteconfig_do_siteconfig_gencache_prepend = " \
mkdir -p ${WORKDIR}/site_config_libc; \
cp ${SYSROOT_DESTDIR}${libdir}/libc.so ${WORKDIR}/site_config_libc; \
sed -i -e 's# ${base_libdir}# ${SYSROOT_DESTDIR}${base_libdir}#g' -e 's# ${libdir}# ${SYSROOT_DESTDIR}${libdir}#g' ${WORKDIR}/site_config_libc/libc.so; \
"
#
# For now, we will skip building of a gcc package if it is a uclibc one
# and our build is not a uclibc one, and we skip a glibc one if our build
# is a uclibc build.
#
# See the note in gcc/gcc_3.4.0.oe
#
python __anonymous () {
import bb, re
uc_os = (re.match('.*uclibc*', bb.data.getVar('TARGET_OS', d, 1)) != None)
if not uc_os:
raise bb.parse.SkipPackage("incompatible with target %s" %
bb.data.getVar('TARGET_OS', d, 1))
}
PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
DEPENDS = "virtual/${TARGET_PREFIX}binutils \
virtual/${TARGET_PREFIX}gcc-intermediate \
linux-libc-headers ncurses-native"
RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
INHIBIT_DEFAULT_DEPS = "1"
PACKAGES =+ "ldd uclibc-utils-dbg uclibc-utils uclibc-gconv uclibc-thread-db"
LEAD_SONAME = "libc.so"
# The last line (gdb and lib1) is for uclinux-uclibc builds
uclibc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so \
${base_libdir}/libintl*.so.* ${base_libdir}/libintl-*.so \
${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so \
${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so \
${base_libdir}/ld*.so.* ${base_libdir}/ld*.so \
${base_libdir}/libc*.so.* ${base_libdir}/libuClibc-*.so \
${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so \
${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so \
${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so \
${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so \
${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so \
${libdir}/libc.gdb ${libdir}/libc ${base_libdir}/lib1.so \
"
FILES_${PN} = "${sysconfdir} ${uclibc_baselibs} /sbin/ldconfig \
${libexecdir} ${datadir}/zoneinfo ${libdir}/locale"
FILES_ldd = "${bindir}/ldd"
FILES_uclibc-dev_append = "\
${libdir}/lib*.so \
${libdir}/*_nonshared.a \
${libdir}/[S]*crt[1in].o \
${libdir}/crtreloc*.o \
${libdir}/lib*.a \
${includedir}/*.h ${includedir}/*/*.h \
"
FILES_uclibc-utils = "${bindir} ${sbindir}"
FILES_uclibc-utils-dbg += "${bindir}/.debug ${sbindir}/.debug"
FILES_uclibc-gconv = "${libdir}/gconv"
FILES_uclibc-thread-db = "/lib/libthread_db*"
RPROVIDES_uclibc-dev += "libc-dev virtual-libc-dev"
# uclibc does not really have libsegfault but then using the one from glibc is also not
# going to work. So we pretend that we have it to make bitbake not pull other recipes
# to satisfy this dependency for the images/tasks
RPROVIDES_${PN} += "libsegfault"
SRC_URI = "\
http://www.uclibc.org/downloads/uClibc-${PV}.tar.bz2;name=uClibc-${PV} \
"
# do_stage barfs on a CC with whitespace, therefore put the 'HOST_CC_ARCH' in
# the CFLAGS (when building the utils).
OEMAKE_NO_CC = "'STRIPTOOL=true' 'LD=${LD}'"
EXTRA_OEMAKE = "${OEMAKE_NO_CC} \
'HOSTCC=${BUILD_CC}' \
'HOST_CFLAGS=${BUILD_CFLAGS}' \
'CC=${CC}' \
ARCH=${UCLIBC_ARCH}"
EXTRA_OEMAKE_task_do_package = "${OEMAKE_NO_CC}"
# enable verbose output:
export V="2"
# -O<n> -fno-omit-frame-pointer ends up with GCC ICE on thumb as reported
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44860
#
CFLAGS_arm := "${@oe_filter_out('-fno-omit-frame-pointer', '${CFLAGS}', d)}"
UCLIBC_EXTRA_CFLAGS := "${@oe_filter_out('(-I\S+|-i\S+)', '${CFLAGS}', d)}"
UCLIBC_EXTRA_LDFLAGS := "${@oe_filter_out('(-L\S+|-l\S+)', '${LDFLAGS}', d)}"
do_compile_prepend () {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
}
configmangle = '/^KERNEL_HEADERS/d; \
/^RUNTIME_PREFIX/d; \
/^DEVEL_PREFIX/d; \
/^SHARED_LIB_LOADER_PREFIX/d; \
/^UCLIBC_EXTRA_CFLAGS/d; \
s,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g; \
${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][bb.data.getVar("USE_NLS", d, 1) == "yes"]} \
${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][bb.data.getVar("TARGET_ARCH", d, 1) in ['mips', 'mipsel', 'mips64', 'mips64el', 'avr32']]} \
/^CROSS/d; \
/^TARGET_ARCH=/d; \
/^TARGET_/s,^\([^=]*\).*,# \1 is not set,g; \
s,^DOSTRIP.*,# DOSTRIP is not set,g; \
/_[EO]*ABI/d; \
/HAS_FPU/d; \
'
OE_FEATURES := "${@features_to_uclibc_conf(d)}"
OE_DEL := "${@features_to_uclibc_del(d)}"
python () {
if "${OE_DEL}":
bb.data.setVar('configmangle_append', "${OE_DEL}" + "\n", d)
if "${OE_FEATURES}":
bb.data.setVar('configmangle_append',
"/^### DISTRO FEATURES$/a\\\n%s\n\n" %
("\\n".join((bb.data.expand("${OE_FEATURES}", d).split("\n")))),
d)
bb.data.setVar('configmangle_append',
"/^### CROSS$/a\\\n%s\n" %
("\\n".join(["CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"",
"UCLIBC_EXTRA_CFLAGS=\"${UCLIBC_EXTRA_CFLAGS}\"",
"KERNEL_HEADERS=\"${STAGING_INCDIR}\"",
"RUNTIME_PREFIX=\"/\"",
"DEVEL_PREFIX=\"/${prefix}\"",
"SHARED_LIB_LOADER_PREFIX=\"/lib\"",
])
),
d)
bb.data.setVar('configmangle_append',
"/^### TGT$/a\\\nTARGET_ARCH=\"%s\"\\nTARGET_%s=y\n" %
("${UCLIBC_ARCH}", "${UCLIBC_ARCH}"),
d)
bb.data.setVar('configmangle_append',
"/^### FPU$/a\\\n%s\n\n" % (["UCLIBC_HAS_FPU=y","# UCLIBC_HAS_FPU is not set"][bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]]), d)
if "${UCLIBC_ENDIAN}":
bb.data.setVar('configmangle_append',
"/^### ABI$/a\\\nARCH_%s_ENDIAN=y\n\n" % ("${UCLIBC_ENDIAN}"),
d)
if "${UCLIBC_ABI}":
bb.data.setVar('configmangle_append',
"/^### ABI$/a\\\nCONFIG_%s=y\n\n" % ("${UCLIBC_ABI}"),
d)
}
do_patch_append() {
os.system("ln -sf ${STAGING_INCDIR}/linux ${S}/include/linux")
os.system("ln -sf ${STAGING_INCDIR}/asm ${S}/include/asm")
}
do_configure() {
rm -f ${S}/.config
# OpenEmbedded splits the uClibc.config in two parts:
# uClibc.machine, uClibc.distro
echo "### uClibc.machine ###" >${S}/merged.config
cat ${WORKDIR}/uClibc.machine >>${S}/merged.config
echo "### uClibc.distro ###" >>${S}/merged.config
cat ${WORKDIR}/uClibc.distro >>${S}/merged.config
echo "### CROSS" >>${S}/merged.config
echo "### TGT" >>${S}/merged.config
echo "### MMU" >>${S}/merged.config
echo "### FPU" >>${S}/merged.config
echo "### ABI" >>${S}/merged.config
echo "### DISTRO FEATURES" >>${S}/merged.config
cp ${S}/merged.config ${S}/.config
# Mangle the resulting .config depending on OE variables
sed -i -e '${configmangle}' ${S}/.config
oe_runmake oldconfig
}
do_install() {
oe_runmake PREFIX=${D} install
oe_runmake PREFIX=${D} "SSP_ALL_CFLAGS=${TARGET_LINK_HASH_STYLE}" install_utils
}

View File

@ -0,0 +1,44 @@
# UCLIBC_BASE should be the latest released version of uclibc (that way
# the config files will typically be correct!) uclibc-svn takes precedence
# over uclibc-${UCLIBC_BASE}, if a config file in uclibc-snv is out of date
# try removing it
#
# UCLIBC_BASE can be set in a distro file, but whether this works depends
# on whether the base patches apply to the selected (SRCDATE) svn release.
#
UCLIBC_BASE ?= "0.9.32"
SRCREV="251f2266bf24b1b396f59eef60d0acf41fdd02e4"
PR_append = "+gitr${SRCPV}"
require uclibc.inc
PR = "${INC_PR}.0"
PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
#recent versions uclibc require real kernel headers
PACKAGE_ARCH = "${MACHINE_ARCH}"
FILESPATHPKG =. "uclibc-git:uclibc-${UCLIBC_BASE}:"
#as stated above, uclibc needs real kernel-headers
#however: we can't depend on virtual/kernel when nptl hits due to depends deadlocking ....
KERNEL_SOURCE = "${STAGING_DIR_HOST}/${exec_prefix}"
SRC_URI = "git://uclibc.org/uClibc.git;branch=master;protocol=git \
file://uClibc.config \
file://uClibc.machine \
file://uClibc.distro \
file://uclibc-arm-ftruncate64.patch \
file://uclibc_enable_log2_test.patch \
file://ldso_use_arm_dl_linux_resolve_in_thumb_mode.patch \
file://reorder-use-BX.patch \
file://select-force-thumb.patch \
file://remove-sub-arch-variants.patch \
file://transform-eabi-oabi-choice.patch \
file://include-arm-asm.h.patch \
file://detect-bx-availibility.patch \
file://remove-eabi-oabi-selection.patch \
file://powerpc_copysignl.patch \
file://fts-support.patch \
file://argp-support.patch \
file://argp-headers.patch \
file://remove_attribute_optimize_Os.patch \
"
S = "${WORKDIR}/git"