uClibc cleanup: - use full version string (0.9.30.1), instead of base (0.9.30) + extra (.1) - remove support for 0.9.28 and snapshots (building from SVN to be added later)

SVN-Revision: 15368
This commit is contained in:
Nicolas Thill 2009-04-24 02:07:24 +00:00
parent 2783110a97
commit 222f37cbde
73 changed files with 30 additions and 4808 deletions

View File

@ -29,10 +29,6 @@ else
LIBGCC_VERSION:=<LIBGCC_VERSION>
endif
ifneq ($(LIBC_VERSION),0.9.28)
LIBC_VERSION:=$(LIBC_VERSION)$(LIBC_PATCHVER)
endif
CONFIG_PACKAGE_base-files$(TARGET):=$(CONFIG_PACKAGE_base-files)
define Package/base-files$(TARGET)
@ -216,10 +212,10 @@ use_nsswitch=$(if $(CONFIG_USE_GLIBC)$(CONFIG_EGLIBC_OPTION_EGLIBC_NSSWITCH),lib
define Package/glibc/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(TOOLCHAIN_DIR)/lib/ld*.so.* $(1)/lib/
$(CP) $(TOOLCHAIN_DIR)/lib/ld-$(LIBC_VERSION).so $(1)/lib/
$(CP) $(TOOLCHAIN_DIR)/lib/ld-$(LIBC_SO_VERSION).so $(1)/lib/
for file in libanl libc libcidn libcrypt libdl libm $(use_libnsl) $(use_nsswitch) libresolv $(use_libutil); do \
$(CP) $(TOOLCHAIN_DIR)/lib/$$$$file.so.* $(1)/lib/; \
$(CP) $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_VERSION).so $(1)/lib/; \
$(CP) $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so $(1)/lib/; \
done
endef
@ -231,7 +227,7 @@ define Package/uClibc/install
$(INSTALL_DIR) $(1)/lib
for file in ld$(LIB_SUFFIX)-uClibc libc libcrypt libdl libm libnsl libresolv libuClibc libutil; do \
$(CP) $(TOOLCHAIN_DIR)/lib/$$$$file.so.* $(1)/lib/; \
$(CP) $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_VERSION).so $(1)/lib/; \
$(CP) $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so $(1)/lib/; \
done
endef
@ -242,13 +238,13 @@ endef
define Package/libpthread/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(TOOLCHAIN_DIR)/lib/libpthread.so.* $(1)/lib/
$(CP) $(TOOLCHAIN_DIR)/lib/libpthread-$(LIBC_VERSION).so $(1)/lib/
$(CP) $(TOOLCHAIN_DIR)/lib/libpthread-$(LIBC_SO_VERSION).so $(1)/lib/
endef
define Package/librt/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(TOOLCHAIN_DIR)/lib/librt.so.* $(1)/lib/
$(CP) $(TOOLCHAIN_DIR)/lib/librt-$(LIBC_VERSION).so $(1)/lib/
$(CP) $(TOOLCHAIN_DIR)/lib/librt-$(LIBC_SO_VERSION).so $(1)/lib/
endef
define Package/ldd/install

View File

@ -77,7 +77,7 @@ define Host/SetToolchainInfo
$(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.eglibc.org/,' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_PATCHVER\)=.*,\1=$(PKG_EXTRAVERSION),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
endef
define Stage1/Configure

View File

@ -88,7 +88,7 @@ define Host/SetToolchainInfo
$(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.gnu.org/software/libc/,' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_PATCHVER\)=.*,\1=,' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
endef
define Stage1/Configure

View File

@ -3,4 +3,4 @@ GCC_VERSION=unknown
LIBC_TYPE=unknown
LIBC_URL=unknown
LIBC_VERSION=unknown
LIBC_PATCHVER=
LIBC_SO_VERSION=unknown

View File

@ -7,37 +7,15 @@ choice
help
Select the version of uClibc you wish to use.
config UCLIBC_VERSION_SNAPSHOT
depends BROKEN
bool "uClibc snapshot"
config UCLIBC_VERSION_0_9_28
bool "uClibc 0.9.28"
depends !(mips64 || mips64el)
config UCLIBC_VERSION_0_9_29
bool "uClibc 0.9.29"
config UCLIBC_VERSION_0_9_30
bool "uClibc 0.9.30"
config UCLIBC_VERSION_0_9_30_1
bool "uClibc 0.9.30.1"
config UCLIBC_VERSION_NPTL
bool "uClibc NPTL branch"
depends BROKEN
endchoice
config UCLIBC_VERSION_NPTL
bool "Use NPTL branch"
depends on TOOLCHAINOPTS && USE_UCLIBC
depends on UCLIBC_VERSION_0_9_30
depends BROKEN
config UCLIBC_EXTRA_VERSION
string
prompt "Extra uClibc version"
depends on TOOLCHAINOPTS && USE_UCLIBC
default "snapshot" if UCLIBC_VERSION_SNAPSHOT
default ".2" if UCLIBC_VERSION_0_9_28
default ".1" if UCLIBC_VERSION_0_9_30 && !UCLIBC_VERSION_NPTL
default ""
help
Default for version 0.9.28 is ".02", for daily snapshot it's just "snapshot"
For all other versions the default string is empty.

View File

@ -1,9 +1,8 @@
config UCLIBC_VERSION
string
depends on USE_UCLIBC
default "" if UCLIBC_VERSION_snapshot
default "0.9.28" if UCLIBC_VERSION_0_9_28
default "0.9.29" if UCLIBC_VERSION_0_9_29
default "0.9.30" if UCLIBC_VERSION_0_9_30
default "0.9.30.1" if UCLIBC_VERSION_0_9_30_1
default "0.9.30+nptl" if UCLIBC_VERSION_NPTL
default "0.9.29"

View File

@ -9,44 +9,26 @@ include $(INCLUDE_DIR)/target.mk
PKG_NAME:=uClibc
PKG_VERSION:=$(call qstrip,$(CONFIG_UCLIBC_VERSION))
PKG_EXTRAVERSION:=$(call qstrip,$(CONFIG_UCLIBC_EXTRA_VERSION))
PKG_VERSION_SNAPSHOT:=$(call qstrip,$(CONFIG_UCLIBC_VERSION_SNAPSHOT))
ifeq ($(CONFIG_UCLIBC_VERSION_NPTL),y)
PKG_SOURCE_URL:=http://www.uclibc.org/svn/branches/uClibc-nptl
PKG_SOURCE_PROTO:=svn
PKG_SOURCE_VERSION:=25804
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)+nptl
PKG_SOURCE:=$(PKG_NAME)-nptl-r$(PKG_SOURCE_VERSION).tar.gz
PKG_EXTRAVERSION:=-svn
else
ifeq ($(PKG_VERSION_SNAPSHOT),y)
PKG_SOURCE_URL:=http://www.uclibc.org/downloads/snapshots
PKG_SOURCE:=uClibc-snapshot.tar.bz2
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-r$(PKG_SOURCE_VERSION).tar.gz
LIBC_SO_VERSION:=0.9.30-svn
else
PKG_SOURCE_URL:=http://www.uclibc.org/downloads
PKG_SOURCE:=uClibc-$(PKG_VERSION)$(PKG_EXTRAVERSION).tar.bz2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
LIBC_SO_VERSION:=$(PKG_VERSION)
endif
endif
PATCH_DIR:=$(firstword $(wildcard ./patches-$(PKG_VERSION)$(PKG_EXTRAVERSION) ./patches-$(PKG_VERSION)))
CONFIG_DIR:=$(firstword $(wildcard ./config-$(PKG_VERSION)$(PKG_EXTRAVERSION) ./config-$(PKG_VERSION)))
PATCH_DIR:=$(if $(CONFIG_UCLIBC_VERSION_NPTL),./patches-nptl,$(PATCH_DIR))
CONFIG_DIR:=$(if $(CONFIG_UCLIBC_VERSION_NPTL),./config-nptl,$(CONFIG_DIR))
PATCH_DIR:=$(if $(PKG_VERSION_SNAPSHOT),,$(PATCH_DIR))
CONFIG_DIR:=$(if $(PKG_VERSION_SNAPSHOT),./config-0.9.30,$(CONFIG_DIR))
PATCH_DIR:=./patches-$(PKG_VERSION)
CONFIG_DIR:=./config-$(PKG_VERSION)
PKG_MD5SUM_0.9.28.2 = 959f25286e317f0d9e2103445c5a14c2
PKG_MD5SUM_0.9.28.3 = 428405a36b4662980d9343b32089b5a6
PKG_MD5SUM_0.9.29 = 61dc55f43b17a38a074f347e74095b20
PKG_MD5SUM_0.9.30 = e5766e2566e0297adebebbcc0aba1f2d
PKG_MD5SUM=$(PKG_MD5SUM_$(PKG_VERSION)$(PKG_EXTRAVERSION))
PKG_MD5SUM_0.9.30.1 = 1a4b84e5536ad8170563ffa88c34679c
PKG_MD5SUM=$(PKG_MD5SUM_$(PKG_VERSION))
ifeq ($(PKG_VERSION_SNAPSHOT),y)
UCLIBC_SUBDIR:=uClibc-$(PKG_EXTRAVERSION)
else
UCLIBC_SUBDIR:=uClibc-$(PKG_VERSION)$(if $(CONFIG_UCLIBC_VERSION_NPTL),+nptl,$(PKG_EXTRAVERSION))
endif
HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(UCLIBC_SUBDIR)
HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/toolchain-build.mk
@ -73,42 +55,16 @@ define Host/SetToolchainInfo
$(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.uclibc.org/,' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_PATCHVER\)=.*,\1=$(PKG_EXTRAVERSION),' $(TOOLCHAIN_DIR)/info.mk
endef
define Host/Prepare/Snapshot
$(PKG_UNPACK)
rm -Rf $(HOST_BUILD_DIR)
$(Host/Patch)
$(if $(QUILT),touch $(HOST_BUILD_DIR)/.quilt_used)
endef
define Host/Prepare/V_0_9_28
$(SED) 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(BUILD_DIR_TOOLCHAIN)/linux\",g' \
$(HOST_BUILD_DIR)/.config
ifeq ($(CONFIG_SOFT_FLOAT),y)
$(SED) 's,.*HAS_FPU.*,HAS_FPU=n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,g' $(HOST_BUILD_DIR)/.config
endif
ifeq ($(CONFIG_C99_MATH),y)
$(SED) 's,.*DO_C99_MATH.*,DO_C99_MATH=y,g' $(HOST_BUILD_DIR)/.config
endif
$(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(LIBC_SO_VERSION),' $(TOOLCHAIN_DIR)/info.mk
endef
GEN_CONFIG=$(SCRIPT_DIR)/kconfig.pl -n $(if $(wildcard $(CONFIG_DIR)/common),'+' $(CONFIG_DIR)/common) ./$(CONFIG_DIR)/$(ARCH)$(if $(wildcard $(CONFIG_DIR)/$(ARCH).$(BOARD)),.$(BOARD))
define Host/Prepare
$(call Host/SetToolchainInfo)
@echo prepare uClibc version $(PKG_VERSION)$(PKG_EXTRAVERSION)
ifeq ($(PKG_VERSION_SNAPSHOT),y)
$(call Host/Prepare/Snapshot)
else
$(call Host/Prepare/Default)
endif
ln -snf $(UCLIBC_SUBDIR) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
$(GEN_CONFIG) > $(HOST_BUILD_DIR)/.config
ifeq ($(PKG_VERSION),0.9.28)
$(call Host/Prepare/V_0_9_28)
endif
$(SED) 's,^KERNEL_HEADERS=.*,KERNEL_HEADERS=\"$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include\",g' \
-e 's,^.*UCLIBC_HAS_FPU.*,UCLIBC_HAS_FPU=$(if $(CONFIG_SOFT_FLOAT),n,y),g' \
-e 's,^.*UCLIBC_HAS_SOFT_FLOAT.*,UCLIBC_HAS_SOFT_FLOAT=$(if $(CONFIG_SOFT_FLOAT),y,n),g' \
@ -126,7 +82,7 @@ define Host/Prepare
CC="$(TARGET_CC)" \
CPU_CFLAGS="$(TARGET_CFLAGS)" \
pregen \
$(if $(CONFIG_UCLIBC_VERSION_0_9_28),install_dev,install_headers)
install_headers
endef
define Host/Configure

View File

@ -1,16 +0,0 @@
ARCH_LITTLE_ENDIAN=y
ARCH_SUPPORTS_LITTLE_ENDIAN=y
# CONFIG_ARM1136JF_S is not set
# 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_ARM_SA110 is not set
# CONFIG_ARM_SA1100 is not set
CONFIG_ARM_XSCALE=y
# CONFIG_GENERIC_ARM is not set
KERNEL_SOURCE="./toolchain_build_arm/linux"
TARGET_ARCH="arm"
TARGET_arm=y

View File

@ -1,17 +0,0 @@
ARCH_BIG_ENDIAN=y
ARCH_SUPPORTS_BIG_ENDIAN=y
ARCH_SUPPORTS_LITTLE_ENDIAN=y
# CONFIG_ARM1136JF_S is not set
# 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_ARM_SA110 is not set
# CONFIG_ARM_SA1100 is not set
CONFIG_ARM_XSCALE=y
# CONFIG_GENERIC_ARM is not set
KERNEL_SOURCE="./toolchain_build_armeb/linux"
TARGET_ARCH="arm"
TARGET_arm=y

View File

@ -1,12 +0,0 @@
ARCH_BIG_ENDIAN=y
ARCH_SUPPORTS_BIG_ENDIAN=y
CONFIG_AP7000=y
FORCE_SHAREABLE_TEXT_SEGMENTS=y
KERNEL_SOURCE="./toolchain_build_avr32/linux"
LINKRELAX=y
TARGET_ARCH="avr32"
TARGET_avr32=y
UCLIBC_COMPLETELY_PIC=y
# UCLIBC_HAS_SCANF_GLIBC_A_FLAG is not set
# UCLIBC_HAS_STRING_ARCH_OPT is not set
UNIX98PTY_ONLY=y

View File

@ -1,122 +0,0 @@
# ARCH_BIG_ENDIAN is not set
ARCH_HAS_MMU=y
# ARCH_HAS_NO_LDSO is not set
# ARCH_HAS_NO_MMU is not set
# ARCH_LITTLE_ENDIAN is not set
# ARCH_SUPPORTS_BIG_ENDIAN is not set
# ARCH_SUPPORTS_LITTLE_ENDIAN is not set
ASSUME_DEVPTS=y
BUILD_UCLIBC_LDSO=y
CROSS_COMPILER_PREFIX=""
C_SYMBOL_PREFIX=""
DEVEL_PREFIX="/usr/"
# DL_FINI_CRT_COMPAT is not set
# DOASSERTS is not set
# DODEBUG is not set
# DODEBUG_PT is not set
DOPIC=y
DO_C99_MATH=y
# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
# HAS_FPU is not set
# HAS_NO_THREADS is not set
HAS_SHADOW=y
HAVE_DOT_CONFIG=y
HAVE_ELF=y
# HAVE_NO_PIC is not set
# HAVE_NO_SHARED is not set
HAVE_SHARED=y
KERNEL_SOURCE=""
LDSO_BASE_FILENAME="ld.so"
LDSO_CACHE_SUPPORT=y
LDSO_LDD_SUPPORT=y
# LDSO_PRELOAD_FILE_SUPPORT is not set
LDSO_RUNPATH=y
# MALLOC is not set
MALLOC_GLIBC_COMPAT=y
# MALLOC_SIMPLE is not set
MALLOC_STANDARD=y
# PTHREADS_DEBUG_SUPPORT is not set
RUNTIME_PREFIX="/"
SHARED_LIB_LOADER_PREFIX="/lib"
# SUPPORT_LD_DEBUG is not set
# SUPPORT_LD_DEBUG_EARLY is not set
# 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_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
UCLIBC_CTOR_DTOR=y
UCLIBC_DYNAMIC_ATEXIT=y
UCLIBC_HAS_CTYPE_CHECKED=y
# UCLIBC_HAS_CTYPE_ENFORCED is not set
UCLIBC_HAS_CTYPE_SIGNED=y
UCLIBC_HAS_CTYPE_TABLES=y
# UCLIBC_HAS_CTYPE_UNSAFE is not set
UCLIBC_HAS_ERRNO_MESSAGES=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
UCLIBC_HAS_FTW=y
UCLIBC_HAS_FULL_RPC=y
UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
UCLIBC_HAS_GLOB=y
UCLIBC_HAS_GNU_GETOPT=y
UCLIBC_HAS_HEXADECIMAL_FLOATS=y
UCLIBC_HAS_IPV6=y
UCLIBC_HAS_LFS=y
# UCLIBC_HAS_LOCALE is not set
UCLIBC_HAS_PRINTF_M_SPEC=y
UCLIBC_HAS_REGEX=y
UCLIBC_HAS_RPC=y
UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y
UCLIBC_HAS_SIGNUM_MESSAGES=y
UCLIBC_HAS_SOFT_FLOAT=y
UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
UCLIBC_HAS_STDIO_BUFSIZ_4096=y
# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
UCLIBC_HAS_STDIO_GETC_MACRO=y
UCLIBC_HAS_STDIO_PUTC_MACRO=y
# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
UCLIBC_HAS_STRING_ARCH_OPT=y
UCLIBC_HAS_STRING_GENERIC_OPT=y
# UCLIBC_HAS_SYS_ERRLIST is not set
# UCLIBC_HAS_SYS_SIGLIST is not set
UCLIBC_HAS_THREADS=y
UCLIBC_HAS_TM_EXTENSIONS=y
UCLIBC_HAS_TZ_CACHING=y
UCLIBC_HAS_TZ_FILE=y
UCLIBC_HAS_TZ_FILE_READ_MANY=y
UCLIBC_HAS_WCHAR=y
UCLIBC_HAS_WORDEXP=y
# UCLIBC_MJN3_ONLY is not set
UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
# UCLIBC_SECURITY is not set
# UCLIBC_STATIC_LDCONFIG is not set
UCLIBC_TZ_FILE_PATH="/etc/TZ"
# UNIX98PTY_ONLY is not set
WARNINGS="-Wall"

View File

@ -1,7 +0,0 @@
ARCH_LITTLE_ENDIAN=y
ARCH_SUPPORTS_LITTLE_ENDIAN=y
CONFIG_CRIS=y
KERNEL_SOURCE="../linux"
TARGET_ARCH="cris"
TARGET_cris=y
# UCLIBC_CTOR_DTOR is not set

View File

@ -1,29 +0,0 @@
ARCH_LITTLE_ENDIAN=y
ARCH_SUPPORTS_LITTLE_ENDIAN=y
# CONFIG_386 is not set
CONFIG_486=y
# CONFIG_586 is not set
# CONFIG_586MMX is not set
# CONFIG_686 is not set
# CONFIG_CRUSOE is not set
# CONFIG_CYRIXIII is not set
# CONFIG_ELAN is not set
# CONFIG_GENERIC_386 is not set
# CONFIG_K6 is not set
# CONFIG_K7 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 is not set
# CONFIG_MIPS_ISA_MIPS64 is not set
# CONFIG_NEHEMIAH is not set
# CONFIG_PENTIUM4 is not set
# CONFIG_PENTIUMII is not set
# CONFIG_PENTIUMIII is not set
# CONFIG_WINCHIP2 is not set
# CONFIG_WINCHIPC6 is not set
HAS_FPU=y
KERNEL_SOURCE="./toolchain_build_i386/linux"
TARGET_ARCH="i386"
TARGET_i386=y

View File

@ -1,15 +0,0 @@
ARCH_BIG_ENDIAN=y
ARCH_CFLAGS="-mno-split-addresses"
ARCH_SUPPORTS_BIG_ENDIAN=y
ARCH_SUPPORTS_LITTLE_ENDIAN=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=y
# CONFIG_MIPS_ISA_MIPS64 is not set
DL_FINI_CRT_COMPAT=y
HAS_FPU=y
KERNEL_SOURCE="./toolchain_build_mips/linux"
TARGET_ARCH="mips"
TARGET_mips=y

View File

@ -1,15 +0,0 @@
ARCH_CFLAGS="-mno-split-addresses"
ARCH_LITTLE_ENDIAN=y
ARCH_SUPPORTS_BIG_ENDIAN=y
ARCH_SUPPORTS_LITTLE_ENDIAN=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=y
# CONFIG_MIPS_ISA_MIPS64 is not set
DL_FINI_CRT_COMPAT=y
HAS_FPU=y
KERNEL_SOURCE="./toolchain_build_mipsel/linux"
TARGET_ARCH="mips"
TARGET_mips=y

View File

@ -1,13 +0,0 @@
ARCH_BIG_ENDIAN=y
ARCH_SUPPORTS_BIG_ENDIAN=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 is not set
DL_FINI_CRT_COMPAT=y
HAS_FPU=y
KERNEL_SOURCE="./toolchain_build_powerpc/linux"
TARGET_ARCH="powerpc"
TARGET_powerpc=y

View File

@ -1,7 +0,0 @@
ARCH_LITTLE_ENDIAN=y
ARCH_SUPPORTS_LITTLE_ENDIAN=y
HAS_FPU=y
HAS_NO_THREADS=y
KERNEL_SOURCE="./toolchain_build_x86_64/linux"
TARGET_ARCH="x86_64"
TARGET_x86_64=y

View File

@ -1,51 +0,0 @@
diff -ur uClibc-0.9.28.2/libc/sysdeps/linux/common/bits/uClibc_pthread.h uClibc-0.9.28.1/libc/sysdeps/linux/common/bits/uClibc_pthread.h
--- uClibc-0.9.28.2/libc/sysdeps/linux/common/bits/uClibc_pthread.h 2007-02-22 00:28:41.000000000 +0100
+++ uClibc-0.9.28.1/libc/sysdeps/linux/common/bits/uClibc_pthread.h 2007-01-26 00:54:19.000000000 +0100
@@ -24,27 +23,27 @@
#define _UCLIBC_PTHREAD_H
#ifndef _PTHREAD_H
-# error "Always include <pthread.h> rather than <bits/uClibc_pthread.h>"
+#error Always include <pthread.h> rather than <bits/uClibc_pthread.h>
#endif
-#if defined _LIBC
-/* Threading functions internal to uClibc. Make these thread functions
- * weak so that we can elide them from single-threaded processes. */
-extern int weak_function __pthread_mutex_init (pthread_mutex_t *__mutex,
- __const pthread_mutexattr_t *__mutex_attr);
-extern int weak_function __pthread_mutex_destroy (pthread_mutex_t *__mutex);
-extern int weak_function __pthread_mutex_lock (pthread_mutex_t *__mutex);
-extern int weak_function __pthread_mutex_unlock (pthread_mutex_t *__mutex);
-extern void __uclibc_mutex_unlock (void *) attribute_hidden;
-extern int weak_function __pthread_mutex_trylock (pthread_mutex_t *__mutex);
-
-struct _pthread_cleanup_buffer;
-extern void weak_function _pthread_cleanup_push_defer (
- struct _pthread_cleanup_buffer *__buffer,
- void (*__routine) (void *), void *__arg);
-extern void weak_function _pthread_cleanup_pop_restore (
- struct _pthread_cleanup_buffer *__buffer,
- int __execute);
-#endif
+#if defined _LIBC
+/* Threading functions internal to uClibc. Make these thread functions
+ * weak so that we can elide them from single-threaded processes. */
+extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
+ __const pthread_mutexattr_t *__mutex_attr);
+extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
+extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
+extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
+extern void __uclibc_mutex_unlock (void *) attribute_hidden;
+extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex);
+
+struct _pthread_cleanup_buffer;
+extern void _pthread_cleanup_push_defer (
+ struct _pthread_cleanup_buffer *__buffer,
+ void (*__routine) (void *), void *__arg);
+extern void _pthread_cleanup_pop_restore (
+ struct _pthread_cleanup_buffer *__buffer,
+ int __execute);
+#endif
#endif

View File

@ -1,12 +0,0 @@
diff -urN uClibc.old/libm/Makefile uClibc.dev/libm/Makefile
--- uClibc.old/libm/Makefile 2005-08-18 00:49:41.000000000 +0200
+++ uClibc.dev/libm/Makefile 2005-10-22 00:56:03.106683500 +0200
@@ -81,6 +81,8 @@
w_cosh.c w_exp.c s_fabs.c s_floor.c w_fmod.c s_frexp.c \
s_ldexp.c w_log.c w_log10.c s_modf.c w_pow.c s_sin.c \
w_sinh.c w_sqrt.c s_tan.c s_tanh.c
+# extra stuff required for some apps
+CSRC+= fpmacros.c nan.c s_rint.c e_hypot.c w_hypot.c s_floorf.c
CSRC+= s_expm1.c s_scalbn.c s_copysign.c e_acos.c e_asin.c e_atan2.c \
k_cos.c e_cosh.c e_exp.c e_fmod.c e_log.c e_log10.c e_pow.c \
k_sin.c e_sinh.c e_sqrt.c k_tan.c e_rem_pio2.c k_rem_pio2.c \

View File

@ -1,29 +0,0 @@
Fix portability of build infrastructure
* cp -d -> cp -P
* tar --exclude is a GNU tar feature
--- uClibc-0.9.28/Makefile.orig Sun Jun 11 19:08:56 2006
+++ uClibc-0.9.28/Makefile Sun Jun 11 19:12:05 2006
@@ -158,12 +158,7 @@ install_dev:
$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
-$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
- if [ "$(KERNEL_SOURCE)" = "$(DEVEL_PREFIX)" ] ; then \
- extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
- else \
- extra_exclude="" ; \
- fi ; \
- tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \
+ tar -chf - include \
| tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
# Remove floating point related headers since float support is disabled.
@@ -253,7 +248,7 @@ ifeq ($(strip $(HAVE_SHARED)),y)
$(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)lib
$(INSTALL) -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
$(PREFIX)$(RUNTIME_PREFIX)lib
- cp -dRf lib/*.so.* $(PREFIX)$(RUNTIME_PREFIX)lib
+ cp -pRf lib/*.so.* $(PREFIX)$(RUNTIME_PREFIX)lib
@if [ -x lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so ] ; then \
set -e; \
$(SHELL_SET_X); \

View File

@ -1,52 +0,0 @@
diff -urN uClibc.old/libc/Makefile uClibc.dev/libc/Makefile
--- uClibc.old/libc/Makefile 2005-08-18 00:49:48.000000000 +0200
+++ uClibc.dev/libc/Makefile 2007-01-22 01:21:40.000000000 +0100
@@ -70,7 +70,6 @@
$(AR) $(ARFLAGS) $(LIBNAME) $$objs || exit 1 ; \
done
cp $(LIBNAME) shared_$(LIBNAME)
- $(AR) $(ARFLAGS) $(LIBNAME) misc/internals/static.o
$(RANLIB) $(LIBNAME)
$(LIBNAME_TARGET): $(LIBNAME)
diff -urN uClibc.old/libc/misc/internals/Makefile uClibc.dev/libc/misc/internals/Makefile
--- uClibc.old/libc/misc/internals/Makefile 2005-08-18 00:49:48.000000000 +0200
+++ uClibc.dev/libc/misc/internals/Makefile 2007-01-22 01:11:46.000000000 +0100
@@ -31,7 +31,7 @@
OBJ_LIST=../../obj.misc.internals
-all: $(OBJ_LIST) interp.o static.o
+all: $(OBJ_LIST) interp.o
$(OBJ_LIST): $(OBJS)
echo $(patsubst %, misc/internals/%, $(OBJS)) > $(OBJ_LIST)
@@ -44,7 +44,7 @@
"(\".interp\"))) =\""$(SHARED_LIB_LOADER_PREFIX)/$(UCLIBC_LDSO)"\";" >> interp.c
echo "#endif" >> interp.c
-$(COBJS) interp.o static.o: %.o : %.c
+$(COBJS) interp.o: %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
diff -urN uClibc.old/libc/misc/internals/static.c uClibc.dev/libc/misc/internals/static.c
--- uClibc.old/libc/misc/internals/static.c 2005-08-18 00:49:48.000000000 +0200
+++ uClibc.dev/libc/misc/internals/static.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-#include <stddef.h>
-
-/* Force static libraries to know about ... */
-void *__libc_stack_end=NULL;
diff -urN uClibc.old/libc/misc/internals/__uClibc_main.c uClibc.dev/libc/misc/internals/__uClibc_main.c
--- uClibc.old/libc/misc/internals/__uClibc_main.c 2005-08-18 00:49:48.000000000 +0200
+++ uClibc.dev/libc/misc/internals/__uClibc_main.c 2007-01-22 01:20:23.000000000 +0100
@@ -32,7 +32,7 @@
/*
* Prototypes.
*/
-extern void *__libc_stack_end;
+void *__libc_stack_end;
extern void weak_function _stdio_init(void);
extern int *weak_const_function __errno_location(void);
extern int *weak_const_function __h_errno_location(void);

View File

@ -1,18 +0,0 @@
--- uClibc-0.9.28.2-old/libc/sysdeps/linux/i386/bits/kernel_types.h 2004-02-06 08:07:16.000000000 +0100
+++ uClibc-0.9.28.2-new/libc/sysdeps/linux/i386/bits/kernel_types.h 2009-01-18 07:24:34.994293859 +0100
@@ -4,7 +4,14 @@
* our private content, and not the kernel header, will win.
* -Erik
*/
-#ifndef __ARCH_I386_POSIX_TYPES_H
+#if !defined(__ARCH_I386_POSIX_TYPES_H) && \
+ !defined(_ASM_X86_64_POSIX_TYPES_H) && \
+ !defined(_ASM_X86_POSIX_TYPES_32_H) && \
+ !defined(_ASM_X86_POSIX_TYPES_64_H)
+
+#define _ASM_X86_POSIX_TYPES_32_H
+#define _ASM_X86_POSIX_TYPES_64_H
+#define _ASM_X86_64_POSIX_TYPES_H
#define __ARCH_I386_POSIX_TYPES_H
typedef unsigned short __kernel_dev_t;

View File

@ -1,34 +0,0 @@
diff -urN uClibc-0.9.28.2.orig/libc/sysdeps/linux/cris/bits/syscalls.h uClibc-0.9.28.2/libc/sysdeps/linux/cris/bits/syscalls.h
--- uClibc-0.9.28.2.orig/libc/sysdeps/linux/cris/bits/syscalls.h 2007-05-15 19:45:43.000000000 +0200
+++ uClibc-0.9.28.2/libc/sysdeps/linux/cris/bits/syscalls.h 2007-05-15 19:47:20.000000000 +0200
@@ -62,6 +62,30 @@
return (type) (INLINE_SYSCALL(name, 5, arg1, arg2, arg3, arg4, arg5)); \
}
+#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
+ type5,arg5,type6,arg6) \
+type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
+{ \
+ register long __a __asm__ ("r10") = (long) arg1; \
+ register long __b __asm__ ("r11") = (long) arg2; \
+ register long __c __asm__ ("r12") = (long) arg3; \
+ register long __d __asm__ ("r13") = (long) arg4; \
+ register long __n_ __asm__ ("r9") = (__NR_##name); \
+ __asm__ __volatile__ (".ifnc %0%1%3%4%5,$r10$r9$r11$r12$r13\n\t" \
+ ".err\n\t" \
+ ".endif\n\t" \
+ "move %6,$mof\n\tmove %7,$srp\n\t" \
+ "break 13" \
+ : "=r" (__a) \
+ : "r" (__n_), "0" (__a), "r" (__b), \
+ "r" (__c), "r" (__d), "g" (arg5), "g" (arg6)\
+ : "srp"); \
+ if (__a >= 0) \
+ return (type) __a; \
+ __set_errno ( -__a); \
+ return (type) -1; \
+}
+
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
({ \

View File

@ -1,24 +0,0 @@
diff -urN uClibc-0.9.28.2.orig/ldso/include/dl-syscall.h uClibc-0.9.28.2/ldso/include/dl-syscall.h
--- uClibc-0.9.28.2.orig/ldso/include/dl-syscall.h 2007-05-22 20:39:28.000000000 +0200
+++ uClibc-0.9.28.2/ldso/include/dl-syscall.h 2007-05-22 20:41:30.000000000 +0200
@@ -155,8 +155,9 @@
static inline void * _dl_mmap(void * addr, unsigned long size, int prot,
int flags, int fd, unsigned long offset)
{
- if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1))
+ if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1)){
return MAP_FAILED;
+ }
return __syscall_mmap2(addr, size, prot, flags,
fd, (off_t) (offset >> MMAP2_PAGE_SHIFT));
}
diff -urN uClibc-0.9.28.2.orig/libc/sysdeps/linux/cris/bits/uClibc_page.h uClibc-0.9.28.2/libc/sysdeps/linux/cris/bits/uClibc_page.h
--- uClibc-0.9.28.2.orig/libc/sysdeps/linux/cris/bits/uClibc_page.h 2007-05-22 20:39:28.000000000 +0200
+++ uClibc-0.9.28.2/libc/sysdeps/linux/cris/bits/uClibc_page.h 2007-05-22 20:42:25.000000000 +0200
@@ -24,5 +24,5 @@
#define PAGE_SHIFT 13
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
-
+#define MMAP2_PAGE_SHIFT PAGE_SHIFT
#endif /* _UCLIBC_PAGE_H */

View File

@ -1,31 +0,0 @@
diff -urN uClibc-0.9.28.2.orig/libc/sysdeps/linux/cris/crt0.c uClibc-0.9.28.2/libc/sysdeps/linux/cris/crt0.c
--- uClibc-0.9.28.2.orig/libc/sysdeps/linux/cris/crt0.c 2007-05-18 00:27:56.000000000 +0200
+++ uClibc-0.9.28.2/libc/sysdeps/linux/cris/crt0.c 2007-05-18 00:32:08.000000000 +0200
@@ -31,11 +31,10 @@
#include <features.h>
-extern void __uClibc_main(int argc, char **argv, char **envp)
- __attribute__ ((__noreturn__));
-extern void __uClibc_start_main(int argc, char **argv, char **envp,
- void (*app_init)(void), void (*app_fini)(void))
- __attribute__ ((__noreturn__));
+extern void __uClibc_main(int (*main)(int, char **, char **), int argc,
+ char **argv, void (*app_init)(void), void (*app_fini)(void),
+ void (*rtld_fini)(void), void *stack_end) __attribute__ ((__noreturn__));
+
extern void weak_function _init(void);
extern void weak_function _fini(void);
@@ -64,10 +63,5 @@
*/
--environ;
-#if defined L_crt0 || ! defined __UCLIBC_CTOR_DTOR__
- /* Leave control to the libc */
- __uClibc_main(argc, argv, environ);
-#else
- __uClibc_start_main(argc, argv, environ, _init, _fini);
-#endif
+ __uClibc_main(__mainp, argc, argv, 0, 0, 0, 0);
}

View File

@ -1,11 +0,0 @@
--- uClibc-0.9.28.2.orig/libc/sysdeps/linux/cris/sysdep.S 2007-06-10 23:00:19.000000000 +0200
+++ uClibc-0.9.28.2/libc/sysdeps/linux/cris/sysdep.S 2007-06-10 23:01:23.000000000 +0200
@@ -25,7 +25,7 @@
.type C_SYMBOL_NAME(errno),@object
.lcomm C_SYMBOL_NAME(errno),4
- errno = _errno
+ //errno = _errno
/* weak_alias (errno, _errno) */

View File

@ -1,28 +0,0 @@
From 7b2f125425cf777e7937b533217588e27952b87d Mon Sep 17 00:00:00 2001
From: Haavard Skinnemoen <hskinnemoen@atmel.com>
Date: Mon, 7 Aug 2006 11:12:50 +0200
Subject: [PATCH] Let optimized stringops override default ones
The default, slow stringops must be archived _before_ the optimized
stringops if there is to be any point doing the optimizations in the
first place.
---
libc/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libc/Makefile b/libc/Makefile
index 31e4bab..687eac5 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -59,7 +59,7 @@ # will evaluate to no files :(.
$(AR) dN 2 $(LIBNAME) $$objs && \
$(AR) dN 2 $(LIBNAME) $$objs
@for objfile in obj.signal \
- obj.string.generic obj.string.$(TARGET_ARCH) obj.string \
+ obj.string obj.string.generic obj.string.$(TARGET_ARCH) \
obj.sysdeps.common obj.sysdeps.$(TARGET_ARCH) ; do \
if [ -e $$objfile ] ; then \
if [ "$(MAKE_IS_SILENT)" = "n" ] ; then \
--
1.4.1.1

View File

@ -1,19 +0,0 @@
Subject: [PATCH] Fix getrusage argument type
The first argument to getrusage is of type __rusage_who_t, not int.
This patch fixes that.
---
libc/sysdeps/linux/common/getrusage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: uClibc-0.9.28/libc/sysdeps/linux/common/getrusage.c
===================================================================
--- uClibc-0.9.28.orig/libc/sysdeps/linux/common/getrusage.c 2006-02-07 17:18:22.000000000 +0100
+++ uClibc-0.9.28/libc/sysdeps/linux/common/getrusage.c 2006-02-07 17:18:31.000000000 +0100
@@ -10,4 +10,4 @@
#include "syscalls.h"
#include <unistd.h>
#include <wait.h>
-_syscall2(int, getrusage, int, who, struct rusage *, usage);
+_syscall2(int, getrusage, __rusage_who_t, who, struct rusage *, usage);

View File

@ -1,24 +0,0 @@
Subject: [PATCH] Fix __libc_fcntl64 prototype in __syscall_fcntl.c
__libc_fcntl64 is a varargs function and should be declared as such.
Otherwise, the gcc compiler for AVR32, and perhaps other architectures,
will use the wrong calling convention.
---
libc/sysdeps/linux/common/__syscall_fcntl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: uClibc-0.9.28/libc/sysdeps/linux/common/__syscall_fcntl.c
===================================================================
--- uClibc-0.9.28.orig/libc/sysdeps/linux/common/__syscall_fcntl.c 2006-02-07 16:48:32.000000000 +0100
+++ uClibc-0.9.28/libc/sysdeps/linux/common/__syscall_fcntl.c 2006-02-07 17:19:09.000000000 +0100
@@ -12,7 +12,7 @@
#include <fcntl.h>
#if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
-extern int __libc_fcntl64(int fd, int cmd, long arg);
+extern int __libc_fcntl64(int fd, int cmd, ...);
#endif
#define __NR___syscall_fcntl __NR_fcntl

View File

@ -1,30 +0,0 @@
From nobody Mon Sep 17 00:00:00 2001
From: Håvard Skinnemoen <hskinnemoen@atmel.com>
Date: Fri Apr 7 17:10:32 2006 +0200
Subject: [PATCH] Fix broken __libc_open declaration in open64.c
__libc_open is a vararg function and should therefore be declared as
such. Fixes bug #4190.
---
libc/sysdeps/linux/common/open64.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
70f2c81903327a8a346e370830932b80045ab04e
diff --git a/libc/sysdeps/linux/common/open64.c b/libc/sysdeps/linux/common/open64.c
index 543aa13..d9a27a7 100644
--- a/libc/sysdeps/linux/common/open64.c
+++ b/libc/sysdeps/linux/common/open64.c
@@ -26,7 +26,7 @@
#endif
#ifdef __UCLIBC_HAS_LFS__
-extern int __libc_open (__const char *file, int oflag, mode_t mode);
+extern int __libc_open (__const char *file, int oflag, ...);
/* Open FILE with access OFLAG. If OFLAG includes O_CREAT,
a third argument is the file protection. */
--
1.2.4

File diff suppressed because it is too large Load Diff

View File

@ -1,40 +0,0 @@
From nobody Mon Sep 17 00:00:00 2001
Subject: [PATCH] Make linkrelax configurable
From: Håvard Skinnemoen <hskinnemoen@atmel.com>
Date: 1133951618 +0100
Add a linkrelax option to the configure system which will give
appropriate options to the compiler, assembler and linker to enable
link-time optimizations.
---
Rules.mak | 2 ++
extra/Configs/Config.avr32 | 4 ++++
2 files changed, 6 insertions(+)
Index: uClibc-0.9.28/Rules.mak
===================================================================
--- uClibc-0.9.28.orig/Rules.mak 2006-02-08 17:58:53.000000000 +0100
+++ uClibc-0.9.28/Rules.mak 2006-02-08 17:59:07.000000000 +0100
@@ -233,6 +233,8 @@ endif
ifeq ($(strip $(TARGET_ARCH)),avr32)
CPU_CFLAGS-$(CONFIG_AP7000) += -mcpu=ap7000
+ CPU_CFLAGS-$(LINKRELAX) += -masm-addr-pseudos -Wa,--pic,--linkrelax
+ CPU_LDFLAGS-$(LINKRELAX) += --relax
endif
# Keep the check_gcc from being needlessly executed
Index: uClibc-0.9.28/extra/Configs/Config.avr32
===================================================================
--- uClibc-0.9.28.orig/extra/Configs/Config.avr32 2006-02-08 17:58:53.000000000 +0100
+++ uClibc-0.9.28/extra/Configs/Config.avr32 2006-02-08 17:59:07.000000000 +0100
@@ -36,3 +36,7 @@ config CONFIG_AP7000
bool "AP7000"
endchoice
+
+config LINKRELAX
+ bool "Enable linker optimizations"
+ default n

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +0,0 @@
Subject: [PATCH] Don't include create_module() for AVR32
The create_module() system call is obsolete in Linux 2.6, so the
AVR32 kernel doesn't even have it.
Come to think about it, this should be completely unnecessary as the
create_module function is only a stub when __NR_create_module is
undefined.
---
libc/sysdeps/linux/common/create_module.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: uClibc-0.9.28/libc/sysdeps/linux/common/create_module.c
===================================================================
--- uClibc-0.9.28.orig/libc/sysdeps/linux/common/create_module.c 2006-02-07 16:48:38.000000000 +0100
+++ uClibc-0.9.28/libc/sysdeps/linux/common/create_module.c 2006-02-07 17:17:14.000000000 +0100
@@ -61,7 +61,8 @@ unsigned long create_module(const char *
{
return __create_module(name, size, 0, 0);
}
-#else
+/* create_module is obsolete in Linux 2.6, so AVR32 doesn't have it */
+#elif !defined(__avr32__)
/* Sparc, MIPS, etc don't mistake return values for errors. */
_syscall2(unsigned long, create_module, const char *, name, size_t, size);
#endif

View File

@ -1,526 +0,0 @@
Subject: [PATCH] ldso: AVR32 support
This implements the AVR32-specific parts of the dynamic linker.
---
ldso/ldso/avr32/dl-debug.h | 45 +++++++++
ldso/ldso/avr32/dl-startup.h | 110 ++++++++++++++++++++++++
ldso/ldso/avr32/dl-syscalls.h | 5 +
ldso/ldso/avr32/dl-sysdep.h | 103 ++++++++++++++++++++++
ldso/ldso/avr32/elfinterp.c | 191 ++++++++++++++++++++++++++++++++++++++++++
ldso/ldso/avr32/resolve.S | 28 ++++++
6 files changed, 482 insertions(+)
Index: uClibc-0.9.28/ldso/ldso/avr32/dl-debug.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ uClibc-0.9.28/ldso/ldso/avr32/dl-debug.h 2006-05-05 09:30:43.000000000 +0200
@@ -0,0 +1,45 @@
+/*
+ * AVR32 ELF shared libary loader support
+ *
+ * Copyright (C) 2005 Atmel Norway
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. The name of the above contributors may not be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+static const char *_dl_reltypes_tab[] = {
+ "R_AVR32_NONE",
+ "R_AVR32_32", "R_AVR32_16", "R_AVR32_8",
+ "R_AVR32_32_PCREL", "R_AVR32_16_PCREL", "R_AVR32_8_PCREL",
+ "R_AVR32_DIFF32", "R_AVR32_DIFF16", "R_AVR32_DIFF8",
+ "R_AVR32_GOT32", "R_AVR32_GOT16", "R_AVR32_GOT8",
+ "R_AVR32_21S", "R_AVR32_16U", "R_AVR32_16S", "R_AVR32_8S", "R_AVR32_8S_EXT",
+ "R_AVR32_22H_PCREL", "R_AVR32_18W_PCREL", "R_AVR32_16B_PCREL",
+ "R_AVR32_16N_PCREL", "R_AVR32_14UW_PCREL", "R_AVR32_11H_PCREL",
+ "R_AVR32_10UW_PCREL", "R_AVR32_9H_PCREL", "R_AVR32_9UW_PCREL",
+ "R_AVR32_HI16", "R_AVR32_LO16",
+ "R_AVR32_GOTPC", "R_AVR32_GOTCALL", "R_AVR32_LDA_GOT",
+ "R_AVR32_GOT21S", "R_AVR32_GOT18SW", "R_AVR32_GOT16S", "R_AVR32_GOT7UW",
+ "R_AVR32_32_CPENT", "R_AVR32_CPCALL", "R_AVR32_16_CP", "R_AVR32_9W_CP",
+ "R_AVR32_RELATIVE", "R_AVR32_GLOB_DAT", "R_AVR32_JMP_SLOT",
+ "R_AVR32_ALIGN",
+};
Index: uClibc-0.9.28/ldso/ldso/avr32/dl-startup.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ uClibc-0.9.28/ldso/ldso/avr32/dl-startup.h 2006-05-05 09:29:45.000000000 +0200
@@ -0,0 +1,110 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Architecture specific code used by dl-startup.c
+ * Copyright (C) 2005 Atmel Norway
+ */
+
+/* This is the library loader's main entry point. Let _dl_boot2 do its
+ * initializations and jump to the application's entry point
+ * afterwards. */
+asm( " .text\n"
+ " .global _start\n"
+ " .type _start,@function\n"
+ "_start:\n"
+ /* All arguments are on the stack initially */
+ " mov r12, sp\n"
+ " rcall _dl_start\n"
+ /* Returns user entry point in r12. Save it. */
+ " mov r0, r12\n"
+ /* We're PIC, so get the Global Offset Table */
+ " lddpc r6, .L_GOT\n"
+ ".L_RGOT:\n"
+ " rsub r6, pc\n"
+ /* Adjust argc and argv according to _dl_skip_args */
+ " ld.w r1, r6[_dl_skip_args@got]\n"
+ " ld.w r1, r1[0]\n"
+ " ld.w r2, sp++\n"
+ " sub r2, r1\n"
+ " add sp, sp, r1 << 2\n"
+ " st.w --sp, r2\n"
+ /* Load the finalizer function */
+ " ld.w r12, r6[_dl_fini@got]\n"
+ /* Jump to the user's entry point */
+ " mov pc, r0\n\n"
+
+ " .align 2\n"
+ ".L_GOT:"
+ " .long .L_RGOT - _GLOBAL_OFFSET_TABLE_\n"
+ " .size _start, . - _start\n"
+ " .previous\n");
+
+/* Get a pointer to the argv array. On many platforms this can be just
+ * the address if the first argument, on other platforms we need to
+ * do something a little more subtle here. */
+#define GET_ARGV(ARGVP, ARGS) ARGVP = ((unsigned long *)ARGS + 1)
+
+
+/* We can't call functions before the GOT has been initialized */
+#define NO_FUNCS_BEFORE_BOOTSTRAP
+
+/*
+ * Relocate the GOT during dynamic loader bootstrap. This will add
+ * the load address to all entries in the GOT, which is necessary
+ * because the linker doesn't generate R_AVR32_RELATIVE relocs for the
+ * GOT.
+ */
+static __always_inline
+void PERFORM_BOOTSTRAP_GOT(struct elf_resolve *tpnt)
+{
+ Elf32_Addr i, nr_got;
+ register Elf32_Addr *__r6 __asm__("r6");
+ Elf32_Addr *got = __r6;
+
+ nr_got = tpnt->dynamic_info[DT_AVR32_GOTSZ_IDX] / sizeof(*got);
+ for (i = 2; i < nr_got; i++)
+ got[i] += tpnt->loadaddr;
+}
+
+#define PERFORM_BOOTSTRAP_GOT(tpnt) PERFORM_BOOTSTRAP_GOT(tpnt)
+
+/* Handle relocation of the symbols in the dynamic loader. */
+static __always_inline
+void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr,
+ unsigned long symbol_addr,
+ unsigned long load_addr, Elf32_Sym *symtab)
+{
+ switch(ELF32_R_TYPE(rpnt->r_info)) {
+ case R_AVR32_NONE:
+ break;
+ case R_AVR32_GLOB_DAT:
+ case R_AVR32_JMP_SLOT:
+ *reloc_addr = symbol_addr;
+ break;
+ case R_AVR32_RELATIVE:
+ SEND_STDERR_DEBUG("Applying RELATIVE relocation: ");
+ SEND_ADDRESS_STDERR_DEBUG(load_addr, 0);
+ SEND_STDERR_DEBUG(" + ");
+ SEND_ADDRESS_STDERR_DEBUG(rpnt->r_addend, 1);
+ *reloc_addr = load_addr + rpnt->r_addend;
+ break;
+ default:
+ SEND_STDERR("BOOTSTRAP_RELOC: unhandled reloc_type ");
+ SEND_NUMBER_STDERR(ELF32_R_TYPE(rpnt->r_info), 1);
+ SEND_STDERR("REL, SYMBOL, LOAD: ");
+ SEND_ADDRESS_STDERR(reloc_addr, 0);
+ SEND_STDERR(", ");
+ SEND_ADDRESS_STDERR(symbol_addr, 0);
+ SEND_STDERR(", ");
+ SEND_ADDRESS_STDERR(load_addr, 1);
+ _dl_exit(1);
+ }
+}
+
+/* Transfer control to the user's application, once the dynamic loader
+ * is done. This routine has to exit the current function, then call
+ * the _dl_elf_main function.
+ *
+ * Since our _dl_boot will simply call whatever is returned by
+ * _dl_boot2, we can just return the address we're supposed to
+ * call. */
+#define START() return _dl_elf_main;
Index: uClibc-0.9.28/ldso/ldso/avr32/dl-syscalls.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ uClibc-0.9.28/ldso/ldso/avr32/dl-syscalls.h 2006-05-05 09:29:25.000000000 +0200
@@ -0,0 +1,5 @@
+/* We can't use the real errno in ldso, since it has not yet
+ * been dynamicly linked in yet. */
+extern int _dl_errno;
+#define __set_errno(X) {(_dl_errno) = (X);}
+#include "sys/syscall.h"
Index: uClibc-0.9.28/ldso/ldso/avr32/dl-sysdep.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ uClibc-0.9.28/ldso/ldso/avr32/dl-sysdep.h 2006-05-05 09:30:43.000000000 +0200
@@ -0,0 +1,103 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Various assembly language/system dependent hacks that are required
+ * so that we can minimize the amount of platform specific code.
+ * Copyright (C) 2004-2005 Atmel Norway
+ */
+
+/* Define this if the system uses RELOCA. */
+#define ELF_USES_RELOCA
+
+#include <elf.h>
+
+#define ARCH_NUM 1
+#define DT_AVR32_GOTSZ_IDX (DT_NUM + OS_NUM)
+
+#define ARCH_DYNAMIC_INFO(dpnt, dynamic, debug_addr) \
+ do { \
+ if (dpnt->d_tag == DT_AVR32_GOTSZ) \
+ dynamic[DT_AVR32_GOTSZ_IDX] = dpnt->d_un.d_val; \
+ } while (0)
+
+/* Initialization sequence for the application/library GOT. */
+#define INIT_GOT(GOT_BASE,MODULE) \
+ do { \
+ unsigned long i, nr_got; \
+ \
+ GOT_BASE[0] = (unsigned long) _dl_linux_resolve; \
+ GOT_BASE[1] = (unsigned long) MODULE; \
+ \
+ /* Add load address displacement to all GOT entries */ \
+ nr_got = MODULE->dynamic_info[DT_AVR32_GOTSZ_IDX] / 4; \
+ for (i = 2; i < nr_got; i++) \
+ GOT_BASE[i] += (unsigned long)MODULE->loadaddr; \
+ } while (0)
+
+#define do_rem(result, n, base) ((result) = (n) % (base))
+
+/* Here we define the magic numbers that this dynamic loader should accept */
+#define MAGIC1 EM_AVR32
+#undef MAGIC2
+
+/* Used for error messages */
+#define ELF_TARGET "AVR32"
+
+unsigned long _dl_linux_resolver(unsigned long got_offset, unsigned long *got);
+
+/* 4096 bytes alignment */
+#define PAGE_ALIGN 0xfffff000
+#define ADDR_ALIGN 0xfff
+#define OFFS_ALIGN 0x7ffff000
+
+#define elf_machine_type_class(type) \
+ ((type == R_AVR32_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)
+
+/* AVR32 doesn't need any COPY relocs */
+#define DL_NO_COPY_RELOCS
+
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
+ first element of the GOT. This must be inlined in a function which
+ uses global data. */
+static inline Elf32_Addr
+elf_machine_dynamic (void)
+{
+ register Elf32_Addr *got asm ("r6");
+ return *got;
+}
+
+/* Return the run-time load address of the shared object. */
+static inline Elf32_Addr
+elf_machine_load_address (void)
+{
+ extern void __dl_start asm("_dl_start");
+ Elf32_Addr got_addr = (Elf32_Addr) &__dl_start;
+ Elf32_Addr pcrel_addr;
+
+ asm (" lddpc %0, 2f\n"
+ "1: add %0, pc\n"
+ " rjmp 3f\n"
+ " .align 2\n"
+ "2: .long _dl_start - 1b\n"
+ "3:\n"
+ : "=r"(pcrel_addr) : : "cc");
+
+ return pcrel_addr - got_addr;
+}
+
+/*
+ * Perform any RELATIVE relocations specified by DT_RELCOUNT.
+ * Currently, we don't use that tag, but we might in the future as
+ * this would reduce the startup time somewhat (although probably not by much).
+ */
+static inline void
+elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
+ Elf32_Word relative_count)
+{
+ Elf32_Rela *rpnt = (void *)rel_addr;
+
+ do {
+ Elf32_Addr *reloc_addr;
+ reloc_addr = (void *)(load_off + (rpnt++)->r_offset);
+ *reloc_addr = load_off + rpnt->r_addend;
+ } while (--relative_count);
+}
Index: uClibc-0.9.28/ldso/ldso/avr32/elfinterp.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ uClibc-0.9.28/ldso/ldso/avr32/elfinterp.c 2006-05-05 09:30:43.000000000 +0200
@@ -0,0 +1,191 @@
+/*
+ * AVR32 ELF shared library loader suppport
+ *
+ * Copyright (C) 2004-2006 Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. The name of the above contributors may not be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+unsigned long _dl_linux_resolver(unsigned long got_offset, unsigned long *got)
+{
+ struct elf_resolve *tpnt = (struct elf_resolve *)got[1];
+ Elf32_Sym *sym;
+ unsigned long local_gotno;
+ unsigned long gotsym;
+ unsigned long new_addr;
+ char *strtab, *symname;
+ unsigned long *entry;
+ unsigned long sym_index = got_offset / 4;
+
+#if 0
+ local_gotno = tpnt->dynamic_info[DT_AVR32_LOCAL_GOTNO];
+ gotsym = tpnt->dynamic_info[DT_AVR32_GOTSYM];
+
+ sym = ((Elf32_Sym *)(tpnt->dynamic_info[DT_SYMTAB] + tpnt->loadaddr))
+ + sym_index;
+ strtab = (char *)(tpnt->dynamic_info[DT_STRTAB] + tpnt->loadaddr);
+ symname = strtab + sym->st_name;
+
+#if 0
+ new_addr = (unsigned long) _dl_find_hash(strtab + sym->st_name,
+ tpnt->symbol_scope, tpnt,
+ resolver);
+#endif
+
+ entry = (unsigned long *)(got + local_gotno + sym_index - gotsym);
+ *entry = new_addr;
+#endif
+
+ return new_addr;
+}
+
+static int
+_dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope,
+ unsigned long rel_addr, unsigned long rel_size,
+ int (*reloc_func)(struct elf_resolve *tpnt, struct dyn_elf *scope,
+ Elf32_Rela *rpnt, Elf32_Sym *symtab, char *strtab))
+{
+ Elf32_Sym *symtab;
+ Elf32_Rela *rpnt;
+ char *strtab;
+ int i;
+
+ rpnt = (Elf32_Rela *)rel_addr;
+ rel_size /= sizeof(Elf32_Rela);
+ symtab = (Elf32_Sym *)tpnt->dynamic_info[DT_SYMTAB];
+ strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
+
+ for (i = 0; i < rel_size; i++, rpnt++) {
+ int symtab_index, res;
+
+ symtab_index = ELF32_R_SYM(rpnt->r_info);
+
+ debug_sym(symtab, strtab, symtab_index);
+ debug_reloc(symtab, strtab, rpnt);
+
+ res = reloc_func(tpnt, scope, rpnt, symtab, strtab);
+
+ if (res == 0)
+ continue;
+
+ _dl_dprintf(2, "\n%s: ", _dl_progname);
+
+ if (symtab_index)
+ _dl_dprintf(2, "symbol '%s': ",
+ strtab + symtab[symtab_index].st_name);
+
+ if (res < 0) {
+ int reloc_type = ELF32_R_TYPE(rpnt->r_info);
+#if defined(__SUPPORT_LD_DEBUG__)
+ _dl_dprintf(2, "can't handle reloc type %s\n",
+ _dl_reltypes(reloc_type));
+#else
+ _dl_dprintf(2, "can't handle reloc type %x\n",
+ reloc_type);
+#endif
+ _dl_exit(-res);
+ } else {
+ _dl_dprintf(2, "can't resolve symbol\n");
+ return res;
+ }
+ }
+
+ return 0;
+}
+
+static int _dl_do_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope,
+ Elf32_Rela *rpnt, Elf32_Sym *symtab, char *strtab)
+{
+ int reloc_type;
+ int symtab_index;
+ char *symname;
+ unsigned long *reloc_addr;
+ unsigned long symbol_addr;
+#if defined(__SUPPORT_LD_DEBUG__)
+ unsigned long old_val;
+#endif
+
+ reloc_addr = (unsigned long *)(tpnt->loadaddr + rpnt->r_offset);
+ reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ symtab_index = ELF32_R_SYM(rpnt->r_info);
+ symbol_addr = 0;
+ symname = strtab + symtab[symtab_index].st_name;
+
+ if (symtab_index) {
+ symbol_addr = (unsigned long)
+ _dl_find_hash(strtab + symtab[symtab_index].st_name,
+ tpnt->symbol_scope, tpnt,
+ elf_machine_type_class(reloc_type));
+
+ /* Allow undefined references to weak symbols */
+ if (!symbol_addr &&
+ ELF32_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK) {
+ _dl_dprintf(2, "%s: can't resolve symbol '%s'\n",
+ _dl_progname, symname);
+ return 0;
+ }
+ }
+
+#if defined(__SUPPORT_LD_DEBUG__)
+ old_val = *reloc_addr;
+#endif
+ switch (reloc_type) {
+ case R_AVR32_NONE:
+ break;
+ case R_AVR32_GLOB_DAT:
+ case R_AVR32_JMP_SLOT:
+ *reloc_addr = symbol_addr + rpnt->r_addend;
+ break;
+ case R_AVR32_RELATIVE:
+ *reloc_addr = (unsigned long)tpnt->loadaddr
+ + rpnt->r_addend;
+ break;
+ default:
+ return -1;
+ }
+
+#if defined(__SUPPORT_LD_DEBUG__)
+ if (_dl_debug_reloc && _dl_debug_detail)
+ _dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x\n",
+ old_val, *reloc_addr);
+#endif
+
+ return 0;
+}
+
+void _dl_parse_lazy_relocation_information(struct dyn_elf *rpnt,
+ unsigned long rel_addr,
+ unsigned long rel_size)
+{
+ /* TODO: Might want to support this in order to get faster
+ * startup times... */
+}
+
+int _dl_parse_relocation_information(struct dyn_elf *rpnt,
+ unsigned long rel_addr,
+ unsigned long rel_size)
+{
+ return _dl_parse(rpnt->dyn, rpnt->dyn->symbol_scope, rel_addr, rel_size,
+ _dl_do_reloc);
+}
Index: uClibc-0.9.28/ldso/ldso/avr32/resolve.S
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ uClibc-0.9.28/ldso/ldso/avr32/resolve.S 2006-05-05 09:29:25.000000000 +0200
@@ -0,0 +1,28 @@
+/*
+ * Linux dynamic resolving code for AVR32. Fixes up the GOT entry as
+ * indicated in register r12 and jumps to the resolved address.
+ *
+ * This file is subject to the terms and conditions of the GNU Lesser General
+ * Public License. See the file "COPYING.LIB" in the main directory of this
+ * archive for more details.
+ *
+ * Copyright (C) 2004 Atmel Norway
+ */
+
+#define ip r5
+
+ .text
+ .global _dl_linux_resolve
+ .type _dl_linux_resolve,@function
+_dl_linux_resolve:
+ /* The PLT code pushed r8 for us. It contains the address of this
+ function's GOT entry, that is entry 0. ip contains the address
+ of the GOT entry of the function we wanted to call. */
+ stm --sp, r9-r12, lr
+ mov r11, r8
+ sub r12, ip, r8
+ rcall _dl_linux_resolver
+ mov ip, r12
+ popm r8-r12,lr
+ mov pc, ip
+ .size _dl_linux_resolve, . - _dl_linux_resolve

View File

@ -1,40 +0,0 @@
Subject: [PATCH] ldso: AVR32 startup hack
AVR32 needs to do both PERFORM_BOOTSTRAP_GOT and a full relocation of
the GOT. I don't quite remember why, but I think it's because some GOT
entries just need the load address added to them, while the rest need
the full relocation code.
This patch should be revisited to figure out whether we're processing
relocations against undefined symbols and whether that's something we
should be doing...
---
ldso/ldso/dl-startup.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: uClibc-0.9.28/ldso/ldso/dl-startup.c
===================================================================
--- uClibc-0.9.28.orig/ldso/ldso/dl-startup.c 2006-02-07 16:49:27.000000000 +0100
+++ uClibc-0.9.28/ldso/ldso/dl-startup.c 2006-02-07 17:12:09.000000000 +0100
@@ -217,7 +217,9 @@ static void * __attribute_used__ _dl_sta
/* some arches (like MIPS) we have to tweak the GOT before relocations */
PERFORM_BOOTSTRAP_GOT(tpnt);
-#else
+#endif
+
+#if !defined(PERFORM_BOOTSTRAP_GOT) || defined(__avr32__)
/* OK, now do the relocations. We do not do a lazy binding here, so
that once we are done, we have considerably more flexibility. */
@@ -259,7 +261,7 @@ static void * __attribute_used__ _dl_sta
rel_addr += relative_count * sizeof(ELF_RELOC);;
}
- rpnt = (ELF_RELOC *) (rel_addr + load_addr);
+ rpnt = (ELF_RELOC *) (rel_addr /* + load_addr */);
for (i = 0; i < rel_size; i += sizeof(ELF_RELOC), rpnt++) {
reloc_addr = (unsigned long *) (load_addr + (unsigned long) rpnt->r_offset);
symtab_index = ELF_R_SYM(rpnt->r_info);

View File

@ -1,25 +0,0 @@
Subject: [PATCH] ldd: AVR32 support
Add AVR32-specific definitions to ldd.
---
utils/ldd.c | 5 +++++
1 file changed, 5 insertions(+)
Index: uClibc-0.9.28/utils/ldd.c
===================================================================
--- uClibc-0.9.28.orig/utils/ldd.c 2006-02-07 16:48:02.000000000 +0100
+++ uClibc-0.9.28/utils/ldd.c 2006-02-07 17:13:00.000000000 +0100
@@ -56,6 +56,11 @@
#define ELFCLASSM ELFCLASS32
#endif
+#if defined(__avr32__)
+#define MATCH_MACHINE(x) (x == EM_AVR32)
+#define ELFCLASSM ELFCLASS32
+#endif
+
#if defined(__s390__)
#define MATCH_MACHINE(x) (x == EM_S390)
#define ELFCLASSM ELFCLASS32

View File

@ -1,105 +0,0 @@
Subject: [PATCH] libpthread: AVR32 support
Implement pt-machine.h for AVR32.
---
libpthread/linuxthreads/sysdeps/avr32/pt-machine.h | 92 +++++++++++++++++++++
1 file changed, 92 insertions(+)
Index: uClibc-0.9.28/libpthread/linuxthreads/sysdeps/avr32/pt-machine.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ uClibc-0.9.28/libpthread/linuxthreads/sysdeps/avr32/pt-machine.h 2006-02-07 17:14:47.000000000 +0100
@@ -0,0 +1,92 @@
+/* Machine-dependent pthreads configuration and inline functions.
+
+ Copyright (C) 2005 Atmel Norway
+ This file is part of the GNU C Library.
+
+ 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; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _PT_MACHINE_H
+#define _PT_MACHINE_H 1
+
+#include <features.h>
+
+static inline int
+_test_and_set (int *p, int v) __THROW
+{
+ int result;
+
+ __asm__ __volatile__(
+ "/* Inline test and set */\n"
+ "1: ssrf 5\n"
+ " ld.w %0, %2\n"
+ " tst %0, %3\n"
+ " breq 2f\n"
+ " stcond %1, %3\n"
+ " brne 1b\n"
+ "2:"
+ : "=&r"(result), "=m"(*p)
+ : "m"(*p), "r"(v)
+ : "memory", "cc");
+
+ return result;
+}
+
+#ifndef PT_EI
+# define PT_EI extern inline
+#endif
+
+extern long int testandset (int *spinlock);
+extern int __compare_and_swap (long int *p, long int oldval, long int newval);
+
+/* Spinlock implementation; required. */
+PT_EI long int
+testandset (int *spinlock)
+{
+ return _test_and_set(spinlock, 1);
+}
+
+
+/* Get some notion of the current stack. Need not be exactly the top
+ of the stack, just something somewhere in the current frame. */
+#define CURRENT_STACK_FRAME stack_pointer
+register char * stack_pointer __asm__ ("sp");
+
+/* Compare-and-swap for semaphores. */
+
+#define HAS_COMPARE_AND_SWAP
+PT_EI int
+__compare_and_swap(long int *p, long int oldval, long int newval)
+{
+ long int result, tmp;
+
+ __asm__ __volatile__(
+ "/* Inline compare and swap */\n"
+ "1: ssrf 5\n"
+ " ld.w %1, %3\n"
+ " cp.w %1, %5\n"
+ " sreq %0\n"
+ " brne 2f\n"
+ " stcond %2, %4\n"
+ " brne 1b\n"
+ "2:"
+ : "=&r"(result), "=&r"(tmp), "=m"(*p)
+ : "m"(*p), "r"(newval), "r"(oldval)
+ : "cc", "memory");
+
+ return result;
+}
+
+#endif /* pt-machine.h */

View File

@ -1,54 +0,0 @@
---
libc/sysdeps/linux/avr32/bits/fcntl.h | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
Index: uClibc-0.9.28-avr32/libc/sysdeps/linux/avr32/bits/fcntl.h
===================================================================
--- uClibc-0.9.28-avr32.orig/libc/sysdeps/linux/avr32/bits/fcntl.h 2006-11-23 17:38:30.000000000 +0100
+++ uClibc-0.9.28-avr32/libc/sysdeps/linux/avr32/bits/fcntl.h 2006-11-23 17:52:15.000000000 +0100
@@ -11,28 +11,29 @@
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
-#define O_ACCMODE 0003
-#define O_RDONLY 00
-#define O_WRONLY 01
-#define O_RDWR 02
-#define O_CREAT 0100 /* not fcntl */
-#define O_EXCL 0200 /* not fcntl */
-#define O_NOCTTY 0400 /* not fcntl */
-#define O_TRUNC 01000 /* not fcntl */
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
+#define O_ACCMODE 00000003
+#define O_RDONLY 00000000
+#define O_WRONLY 00000001
+#define O_RDWR 00000002
+#define O_CREAT 00000100 /* not fcntl */
+#define O_EXCL 00000200 /* not fcntl */
+#define O_NOCTTY 00000400 /* not fcntl */
+#define O_TRUNC 00001000 /* not fcntl */
+#define O_APPEND 00002000
+#define O_NONBLOCK 00004000
#define O_NDELAY O_NONBLOCK
-#define O_SYNC 010000
-#define O_ASYNC 020000
+#define O_SYNC 00010000
+#define O_ASYNC 00020000
#ifdef __USE_GNU
-# define O_DIRECTORY 040000 /* must be a directory */
-# define O_NOFOLLOW 0100000 /* don't follow links */
-# define O_DIRECT 0200000 /* direct disk access */
+# define O_DIRECT 00040000 /* must be a directory */
+# define O_DIRECTORY 00200000 /* direct disk access */
+# define O_NOFOLLOW 00400000 /* don't follow links */
+# define O_NOATIME 01000000 /* don't set atime */
#endif
#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE 0400000
+# define O_LARGEFILE 00100000
#endif
/* For now Linux has synchronisity options for data and read operations.