From dd7edf2e66c25b0af951a0685e8a7f0f161dc564 Mon Sep 17 00:00:00 2001 From: David McCullough Date: Tue, 29 Apr 2003 14:46:31 +0000 Subject: Some small fixups for the h8 support and add the h8s platform support. --- Rules.mak | 8 +++-- extra/Configs/Config.h8300 | 16 +++++++++- extra/Configs/Config.h8300.default | 64 ++++++++++++++++++++++++++++++++++++++ libc/sysdeps/linux/h8300/crt0.S | 4 +++ libc/sysdeps/linux/h8300/setjmp.S | 14 ++++++--- libc/sysdeps/linux/h8300/vfork.S | 4 +++ 6 files changed, 102 insertions(+), 8 deletions(-) create mode 100644 extra/Configs/Config.h8300.default diff --git a/Rules.mak b/Rules.mak index 8513fd51a..25602ff13 100644 --- a/Rules.mak +++ b/Rules.mak @@ -149,8 +149,10 @@ ifeq ($(strip $(TARGET_ARCH)),sh) endif ifeq ($(strip $(TARGET_ARCH)),h8300) - CPU_LDFLAGS-y:=-mh8300h - CPU_CFLAGS-y+=-mh -mint32 -fsigned-char + CPU_LDFLAGS-$(CONFIG_H8300H):= -ms8300h + CPU_LDFLAGS-$(CONFIG_H8S) := -ms8300s + CPU_CFLAGS-$(CONFIG_H8300H) += -mh -mint32 -fsigned-char + CPU_CFLAGS-$(CONFIG_H8S) += -ms -mint32 -fsigned-char endif ifeq ($(strip $(TARGET_ARCH)),cris) @@ -231,7 +233,7 @@ TARGET_PREFIX = / # uClinux shared lib support # -ifdef CONFIG_BINFMT_SHARED_FLAT +ifeq ($(CONFIG_BINFMT_SHARED_FLAT),y) # For the shared version of this, we specify no stack and its library ID FLTFLAGS += -s 0 LIBID=1 diff --git a/extra/Configs/Config.h8300 b/extra/Configs/Config.h8300 index 657128d17..9bce0f063 100644 --- a/extra/Configs/Config.h8300 +++ b/extra/Configs/Config.h8300 @@ -7,9 +7,23 @@ mainmenu "uClibc C Library Configuration" menu "Target Architecture Features and Options" +choice + prompt "Target Processor" + default CONFIG_H8300H + help + This is the processor type of your CPU. + +config CONFIG_H8300H + bool "H8300H" + +config CONFIG_H8S + bool "H8S (edosk2674)" + +endchoice + config HAVE_ELF bool - default n + default y config ARCH_CFLAGS string diff --git a/extra/Configs/Config.h8300.default b/extra/Configs/Config.h8300.default new file mode 100644 index 000000000..bb1787809 --- /dev/null +++ b/extra/Configs/Config.h8300.default @@ -0,0 +1,64 @@ +# +# Automatically generated make config: don't edit +# + +# +# Target Architecture Features and Options +# +# CONFIG_H8300H is not set +CONFIG_H8S=y +HAVE_ELF=y +ARCH_HAS_NO_MMU=y +ARCH_HAS_C_SYMBOL_PREFIX=y +UCLIBC_HAS_FLOATS=y +# HAS_FPU is not set +UCLIBC_HAS_SOFT_FLOAT=y +DO_C99_MATH=y +WARNINGS="-Wall" +KERNEL_SOURCE="$(ROOTDIR)/$(LINUXDIR)/." +UCLIBC_UCLINUX_BROKEN_MUNMAP=y +EXCLUDE_BRK=y +C_SYMBOL_PREFIX="_" +HAVE_DOT_CONFIG=y + +# +# General Library Settings +# +# DOPIC is not set +UCLIBC_CTOR_DTOR=y +# UCLIBC_HAS_THREADS is not set +UCLIBC_HAS_LFS=y +MALLOC=y +# MALLOC_930716 is not set +UCLIBC_DYNAMIC_ATEXIT=y +# HAS_SHADOW is not set +UCLIBC_HAS_REGEX=y +UNIX98PTY_ONLY=y +ASSUME_DEVPTS=y + +# +# Networking Support +# +# UCLIBC_HAS_IPV6 is not set +UCLIBC_HAS_RPC=y +UCLIBC_HAS_FULL_RPC=y + +# +# String and Stdio Support +# +# UCLIBC_HAS_WCHAR is not set +# USE_OLD_VFPRINTF is not set + +# +# Library Installation Options +# +DEVEL_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc" +SYSTEM_DEVEL_PREFIX="$(DEVEL_PREFIX)" +DEVEL_TOOL_PREFIX="$(DEVEL_PREFIX)/usr" + +# +# uClibc hacking options +# +# DODEBUG is not set +# DOASSERTS is not set +# UCLIBC_MALLOC_DEBUGGING is not set diff --git a/libc/sysdeps/linux/h8300/crt0.S b/libc/sysdeps/linux/h8300/crt0.S index a4f862797..b94551b9d 100644 --- a/libc/sysdeps/linux/h8300/crt0.S +++ b/libc/sysdeps/linux/h8300/crt0.S @@ -24,7 +24,11 @@ Cambridge, MA 02139, USA. */ .global atexit .global main +#ifdef __H8300S__ + .h8300s +#else .h8300h +#endif .text _start: /* put here so that references to _start work with elf-PIC */ diff --git a/libc/sysdeps/linux/h8300/setjmp.S b/libc/sysdeps/linux/h8300/setjmp.S index 97b91e204..53ecf3dbe 100644 --- a/libc/sysdeps/linux/h8300/setjmp.S +++ b/libc/sysdeps/linux/h8300/setjmp.S @@ -1,10 +1,16 @@ -.h8300h -.text +#ifdef __H8300S__ + .h8300s +#else + .h8300h +#endif + .text .global __setjmp -.global _longjmp +.global ___sigsetjmp +.global ___longjmp __setjmp: +___sigsetjmp: add.l #20,er0 mov.l er6,@er0 mov.l er5,@-er0 @@ -18,7 +24,7 @@ __setjmp: sub.l er0,er0 rts -_longjmp: +___longjmp: mov.l er1,er1 bne 1f sub.l er1,er1 diff --git a/libc/sysdeps/linux/h8300/vfork.S b/libc/sysdeps/linux/h8300/vfork.S index aa8520d89..e84a78d6a 100644 --- a/libc/sysdeps/linux/h8300/vfork.S +++ b/libc/sysdeps/linux/h8300/vfork.S @@ -5,7 +5,11 @@ #define __NR_vfork __NR_fork /* uClinux-2.0 only has fork which is vfork */ #endif +#ifdef __H8300S__ + .h8300s +#else .h8300h +#endif .text .align 2 .globl _errno -- cgit v1.2.3