Browse Source

Some small fixups for the h8 support and add the h8s platform support.

David McCullough 21 years ago
parent
commit
dd7edf2e66

+ 5 - 3
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

+ 15 - 1
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

+ 64 - 0
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

+ 4 - 0
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 */

+ 10 - 4
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

+ 4 - 0
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