[uClibc]SH port
M. R. Brown
mrbrown at 0xd6.org
Wed Jan 2 16:52:47 UTC 2002
* Erik Andersen <andersen at codepoet.org> on Wed, Jan 02, 2002:
>
> The sh port include/bits header files were of sync. I just fixed
> things up for you (resynced with glibc 2.2.4 include/bits header
> files, with a few little bits adjusted). I don't have access to
> any SH systems (donations willingly accepted), so its a bit hard
> for me to do much with the sh arch. But it at least now should
> have a chance of working. :)
>
Thanks! After a couple of more edits (patch attached) I was able to build
a static uClibc. Under LinuxDC on the Dreamcast (Hitachi SH4), busybox and a
few other apps work fine. I'll try playing with shared library support a
bit later.
I've also attached a quick hack to add SH4 to the TARGET_ARCH selection in
extra/Configs/Config.sh.
M. R.
-------------- next part --------------
diff -urN -x CVS uClibc.orig/libc/sysdeps/linux/sh/Makefile uClibc/libc/sysdeps/linux/sh/Makefile
--- uClibc.orig/libc/sysdeps/linux/sh/Makefile Mon Aug 6 07:46:12 2001
+++ uClibc/libc/sysdeps/linux/sh/Makefile Wed Jan 2 10:10:04 2002
@@ -23,9 +23,9 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-ASFLAGS=$(CFLAGS)
-CFLAGS+= -I../ -D__ASSEMBLER__ -DASM_GLOBAL_DIRECTIVE=.globl
+CFLAGS+= -I../
+SFLAGS= $(CFLAGS) -D__ASSEMBLER__ -DASM_GLOBAL_DIRECTIVE=.globl
TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
@@ -50,11 +50,11 @@
cp $(CRT0_OBJ) $(TOPDIR)libc/$(CRT0_OBJ)
$(CRT0_OBJ): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(SFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(SFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
diff -urN -x CVS uClibc.orig/libc/sysdeps/linux/sh/_mmap.c uClibc/libc/sysdeps/linux/sh/_mmap.c
--- uClibc.orig/libc/sysdeps/linux/sh/_mmap.c Wed Jun 27 21:12:09 2001
+++ uClibc/libc/sysdeps/linux/sh/_mmap.c Wed Jan 2 10:10:35 2002
@@ -20,6 +20,7 @@
*/
#include <unistd.h>
+#include <errno.h>
#include <sys/mman.h>
#include <sys/syscall.h>
diff -urN -x CVS uClibc.orig/libc/sysdeps/linux/sh/pipe.c uClibc/libc/sysdeps/linux/sh/pipe.c
--- uClibc.orig/libc/sysdeps/linux/sh/pipe.c Mon Aug 6 07:46:12 2001
+++ uClibc/libc/sysdeps/linux/sh/pipe.c Wed Jan 2 10:11:10 2002
@@ -1,6 +1,7 @@
/* Copyright (C) 2001 Lineo, <davidm at lineo.com> */
+#include <errno.h>
#include <unistd.h>
#include <syscall.h>
-------------- next part --------------
diff -urN -x CVS uClibc.orig/extra/Configs/Config.sh uClibc/extra/Configs/Config.sh
--- uClibc.orig/extra/Configs/Config.sh Tue Jan 1 16:16:45 2002
+++ uClibc/extra/Configs/Config.sh Wed Jan 2 10:46:40 2002
@@ -75,6 +75,10 @@
ARCH_CFLAGS += -ml
HAS_MMU = true
endif
+ifeq ($(strip $(TARGET_PROC)),SH4)
+ARCH_CFLAGS += -ml -m4
+HAS_MMU = true
+endif
endif
# Set this to `false' if you don't have/need basic floating point support
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20020102/10e9febf/attachment.pgp
More information about the uClibc
mailing list