diff options
| author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-11-17 15:10:13 +0000 |
|---|---|---|
| committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-11-17 15:10:13 +0000 |
| commit | 02169fea4dd790c46c100e210fe21faf112e27d7 (patch) | |
| tree | 7f6a257548c81cead6f61b56eba74b18a1dcaf18 /extra/scripts | |
| parent | 9584b4e582b293ead79d8bb0ff85c1ef12a888d9 (diff) | |
| download | uClibc-alpine-02169fea4dd790c46c100e210fe21faf112e27d7.tar.bz2 uClibc-alpine-02169fea4dd790c46c100e210fe21faf112e27d7.tar.xz | |
Synch with trunk @ 24071.
Step 2
locale stuff - configuration and top Makefiles
Diffstat (limited to 'extra/scripts')
| -rwxr-xr-x | extra/scripts/gen_bits_syscall_h.sh | 17 | ||||
| -rwxr-xr-x | extra/scripts/install_headers.sh | 6 | ||||
| -rwxr-xr-x | extra/scripts/randconfig.sh | 34 |
3 files changed, 43 insertions, 14 deletions
diff --git a/extra/scripts/gen_bits_syscall_h.sh b/extra/scripts/gen_bits_syscall_h.sh index d4adb0fad..f6353baa2 100755 --- a/extra/scripts/gen_bits_syscall_h.sh +++ b/extra/scripts/gen_bits_syscall_h.sh @@ -22,16 +22,11 @@ case $CC in *) CC_SYSNUM_ARGS="-dN" ;; esac -# Most syscall numbers have names like '__NR_open', which become names -# like 'SYS_open'. Some of the ARM syscalls have names like -# '__ARM_NR_set_tls', which we transform into names like -# 'SYS_ARM_set_tls'. - ( echo "#include <asm/unistd.h>"; echo "#include <asm/unistd.h>" | $CC -E $CC_SYSNUM_ARGS $INCLUDE_OPTS - | - sed -ne 's/^[ ]*#define[ ]*__\([A-Za-z0-9_]*\)NR_\([A-Za-z0-9_]*\).*/UCLIBC_\1NR_\2 __\1NR_\2/gp' \ - -e 's/^[ ]*#undef[ ]*__\([A-Za-z0-9_]*\)NR_\([A-Za-z0-9_]*\).*/UNDEFUCLIBC_\1NR_\2 __\1NR_\2/gp' # needed to strip out any kernel-internal defines + sed -ne 's/^[ ]*#define[ ]*\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\).*/UCLIBC\1\2 \1\2/gp' \ + -e 's/^[ ]*#undef[ ]*\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\).*/UNDEFUCLIBC\1\2 \1\2/gp' # needed to strip out any kernel-internal defines ) | $CC -E $INCLUDE_OPTS - | ( echo "/* WARNING!!! AUTO-GENERATED FILE!!! DO NOT EDIT!!! */" ; @@ -42,10 +37,10 @@ $CC -E $INCLUDE_OPTS - | echo "#ifndef _SYSCALL_H" ; echo "# error \"Never use <bits/sysnum.h> directly; include <sys/syscall.h> instead.\"" ; echo "#endif" ; echo ; - sed -ne 's/^UCLIBC_\([A-Za-z0-9_]*\)NR_\([A-Za-z0-9_]*\) *\(.*\)/#undef __\1NR_\2\ -#define __\1NR_\2 \3\ -#define SYS_\1\2 __\1NR_\2/gp' \ - -e 's/^UNDEFUCLIBC_\([A-Za-z0-9_]*\)NR_\([A-Za-z0-9_]*\).*/#undef __\1NR_\2/gp' + sed -ne 's/^UCLIBC\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\) *\(.*\)/#undef \1\2\ +#define \1\2 \3\ +#define SYS_\2 \1\2/gp' \ + -e 's/^UNDEFUCLIBC\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\).*/#undef \1\2/gp' echo ; echo "#endif" ; ) diff --git a/extra/scripts/install_headers.sh b/extra/scripts/install_headers.sh index 6d73ad2c6..d38d85327 100755 --- a/extra/scripts/install_headers.sh +++ b/extra/scripts/install_headers.sh @@ -33,12 +33,12 @@ fi ( # We must cd, or else we'll prepend "$1" to filenames! cd "$1" || exit 1 -find ! -name '.' -a ! -path '*/.*' +find ! -name '.' -a ! -path '*/.*' | sed -e 's/^\.\///' -e '/^config\//d' \ + -e '/^config$/d' ) | \ ( IFS='' while read -r filename; do - filename="${filename#./}" if test -d "$1/$filename"; then mkdir -p "$2/$filename" 2>/dev/null else @@ -46,7 +46,7 @@ while read -r filename; do # exactly the same as input. That's ok. # Do not abort the script if unifdef "fails"! "$top_builddir/extra/scripts/unifdef" -UUCLIBC_INTERNAL "$1/$filename" \ - | grep -v '^libc_hidden_proto[ ]*([a-zA-Z0-9_]*)$' >"$2/$filename" + | sed -e '/^\(rtld\|lib\(c\|m\|resolv\|dl\|intl\|rt\|nsl\|util\|crypt\|pthread\)\)_hidden_proto[ ]*([a-zA-Z0-9_]*)$/d' >"$2/$filename" fi done ) diff --git a/extra/scripts/randconfig.sh b/extra/scripts/randconfig.sh new file mode 100755 index 000000000..5986a9b12 --- /dev/null +++ b/extra/scripts/randconfig.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +# build random configurations +# Usage: +# ARCH=i386 nohup ./extra/scripts/randconfig.sh & sleep 1800 && touch STOP +# +# The above builds random i386 configs and automatically stops after 30 minutes + +test "x$ARCH" = "x" && ARCH=`uname -m` +KCONFIG_ALLCONFIG=.config.allconfig +(echo TARGET_$ARCH=y + echo '# UCLIBC_PREGENERATED_LOCALE_DATA is not set' + echo '# DOMULTI is not set' + echo '# UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA is not set' +) > $KCONFIG_ALLCONFIG +export KCONFIG_ALLCONFIG + +i=0 +while test ! -f STOP +do + make $* randconfig > /dev/null + make $* silentoldconfig > /dev/null + if (make $*) 2>&1 >& mk.log + then + : + else + i=`expr $i + 1` + num=`printf "%.5d" $i` + mv .config FAILED.$num.config + mv mk.log FAILED.$num.log + fi + make distclean > /dev/null || true +done +rm -f STOP |
