[klibc] [PATCH/RFC] klibc/kbuild: arm, ia64, m32r, m68k, mips, parisc, ppc, sh, sparc64 fixes

Sam Ravnborg sam at ravnborg.org
Mon Jul 10 01:11:39 PDT 2006


Fix several architectures to support new list based klibc build

Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
---

diff --git a/usr/klibc/arch/arm/Kbuild b/usr/klibc/arch/arm/Kbuild
new file mode 100644
index 0000000..f803994
--- /dev/null
+++ b/usr/klibc/arch/arm/Kbuild
@@ -0,0 +1,15 @@
+#
+# klibc files for arm
+#
+
+klib-y := setjmp.o syscall.o vfork.o aeabi_nonsense.o
+
+klib-y += ../../libgcc/__udivmodsi4.o ../../libgcc/__divdi3.o
+klib-y += ../../libgcc/__moddi3.o     ../../libgcc/__udivdi3.o
+klib-y += ../../libgcc/__umoddi3.o    ../../libgcc/__udivmoddi4.o
+klib-y += ../../libgcc/__clzsi2.o
+
+always  := crt0.o
+targets := crt0.o
+
+
diff --git a/usr/klibc/arch/arm/Makefile.inc b/usr/klibc/arch/arm/Makefile.inc
index 62065df..06329b2 100644
--- a/usr/klibc/arch/arm/Makefile.inc
+++ b/usr/klibc/arch/arm/Makefile.inc
@@ -6,18 +6,3 @@ # Special rules for this architecture.  
 # included from the main Makefile, and that pathnames should be
 # accordingly.
 #
-
-KLIBCARCHOBJS = \
-	arch/arm/setjmp.o \
-	arch/arm/syscall.o \
-	arch/arm/vfork.o \
-	arch/arm/aeabi_nonsense.o \
-	libgcc/__udivmodsi4.o \
-	libgcc/__divdi3.o \
-	libgcc/__moddi3.o \
-	libgcc/__udivdi3.o \
-	libgcc/__umoddi3.o \
-	libgcc/__udivmoddi4.o \
-	libgcc/__clzsi2.o \
-
-
diff --git a/usr/klibc/arch/ia64/Kbuild b/usr/klibc/arch/ia64/Kbuild
new file mode 100644
index 0000000..49070ff
--- /dev/null
+++ b/usr/klibc/arch/ia64/Kbuild
@@ -0,0 +1,13 @@
+#
+# klibc files for ia64
+#
+
+klib-y := vfork.o setjmp.o pipe.o syscall.o
+
+klib-y += ../../libgcc/__divdi3.o     ../../libgcc/__divsi3.o
+klib-y += ../../libgcc/__udivdi3.o    ../../libgcc/__udivsi3.o
+klib-y += ../../libgcc/__umodsi3.o    ../../libgcc/__umoddi3.o
+klib-y += ../../libgcc/__udivmodsi4.o ../../libgcc/__udivmoddi4.o
+
+always  := crt0.o
+targets := crt0.o
diff --git a/usr/klibc/arch/ia64/Makefile.inc b/usr/klibc/arch/ia64/Makefile.inc
index 8bd2910..9d3748c 100644
--- a/usr/klibc/arch/ia64/Makefile.inc
+++ b/usr/klibc/arch/ia64/Makefile.inc
@@ -6,21 +6,3 @@ # Special rules for this architecture.  
 # included from the main Makefile, and that pathnames should be
 # accordingly.
 #
-
-KLIBCARCHOBJS = \
-	arch/$(KLIBCARCH)/vfork.o \
-	arch/$(KLIBCARCH)/setjmp.o \
-	arch/$(KLIBCARCH)/pipe.o \
-	arch/$(KLIBCARCH)/syscall.o \
-	libgcc/__divdi3.o \
-	libgcc/__divsi3.o \
-	libgcc/__udivdi3.o \
-	libgcc/__udivsi3.o \
-	libgcc/__umodsi3.o \
-	libgcc/__umoddi3.o \
-	libgcc/__udivmodsi4.o \
-	libgcc/__udivmoddi4.o
-
-KLIBCARCHSOOBJS = $(patsubst %o,%.lo,%(KLIBCARCHOBJS))
-
-archclean:
diff --git a/usr/klibc/arch/m32r/Kbuild b/usr/klibc/arch/m32r/Kbuild
new file mode 100644
index 0000000..ceb2ba0
--- /dev/null
+++ b/usr/klibc/arch/m32r/Kbuild
@@ -0,0 +1,13 @@
+#
+# klibc files for m32r
+#
+
+
+klib-y := setjmp.o syscall.o
+
+klib-y += ../../libgcc/__divdi3.o     ../../libgcc/__moddi3.o
+klib-y += ../../libgcc/__udivdi3.o    ../../libgcc/__umoddi3.o
+klib-y += ../../libgcc/__udivmoddi4.o
+
+always  := crt0.o
+targets := crt0.o
diff --git a/usr/klibc/arch/m32r/Makefile.inc b/usr/klibc/arch/m32r/Makefile.inc
index 794aec6..5664cd0 100644
--- a/usr/klibc/arch/m32r/Makefile.inc
+++ b/usr/klibc/arch/m32r/Makefile.inc
@@ -6,14 +6,3 @@ # Special rules for this architecture.  
 # included from the main Makefile, and that pathnames should be
 # accordingly.
 #
-
-KLIBCARCHOBJS = \
-	arch/$(KLIBCARCH)/setjmp.o \
-	arch/$(KLIBCARCH)/syscall.o \
-	libgcc/__divdi3.o \
-	libgcc/__moddi3.o \
-	libgcc/__udivdi3.o \
-	libgcc/__umoddi3.o \
-	libgcc/__udivmoddi4.o
-
-archclean:
diff --git a/usr/klibc/arch/m68k/Kbuild b/usr/klibc/arch/m68k/Kbuild
new file mode 100644
index 0000000..8d6137c
--- /dev/null
+++ b/usr/klibc/arch/m68k/Kbuild
@@ -0,0 +1,8 @@
+#
+# klibc files for m68k
+#
+
+klib-y := setjmp.o syscall.o vfork.o
+
+always  := crt0.o
+targets := crt0.o
diff --git a/usr/klibc/arch/m68k/Makefile.inc b/usr/klibc/arch/m68k/Makefile.inc
index a6f9827..1e77ed5 100644
--- a/usr/klibc/arch/m68k/Makefile.inc
+++ b/usr/klibc/arch/m68k/Makefile.inc
@@ -7,11 +7,6 @@ # included from the main Makefile, and t
 # accordingly.
 #
 
-KLIBCARCHOBJS = \
-	arch/$(KLIBCARCH)/setjmp.o \
-	arch/$(KLIBCARCH)/syscall.o \
-	arch/$(KLIBCARCH)/vfork.o
-
 KLIBCBITSIZE  = 32
 
 # Extra linkflags when building the shared version of the library
@@ -21,5 +16,3 @@ # 2816 MB - normal binaries start at 204
 # script right.  Not sure if there is a fundamental reason
 # to not duck below the halfway point...
 KLIBCSHAREDFLAGS        = -Ttext 0xb0000000
-
-archclean:
diff --git a/usr/klibc/arch/mips/Kbuild b/usr/klibc/arch/mips/Kbuild
new file mode 100644
index 0000000..90783c9
--- /dev/null
+++ b/usr/klibc/arch/mips/Kbuild
@@ -0,0 +1,14 @@
+#
+# klibc files for mips
+#
+
+klib-y := pipe.o vfork.o setjmp.o syscall.o
+
+klib-y += ../../libgcc/__clzsi2.o     ../../libgcc/__ashldi3.o
+klib-y += ../../libgcc/__ashrdi3.o    ../../libgcc/__lshrdi3.o
+klib-y += ../../libgcc/__divdi3.o     ../../libgcc/__moddi3.o
+klib-y += ../../libgcc/__udivdi3.o    ../../libgcc/__umoddi3.o
+klib-y += ../../libgcc/__udivmoddi4.o
+
+always  := crt0.o
+targets := crt0.o
diff --git a/usr/klibc/arch/mips/Makefile.inc b/usr/klibc/arch/mips/Makefile.inc
index adbfc38..9c1b1f8 100644
--- a/usr/klibc/arch/mips/Makefile.inc
+++ b/usr/klibc/arch/mips/Makefile.inc
@@ -6,24 +6,3 @@ # Special rules for this architecture.  
 # included from the main Makefile, and that pathnames should be
 # accordingly.
 #
-
-KLIBCARCHOBJS = \
-	arch/$(KLIBCARCH)/pipe.o \
-	arch/$(KLIBCARCH)/vfork.o \
-	arch/$(KLIBCARCH)/setjmp.o \
-	arch/$(KLIBCARCH)/syscall.o \
-	libgcc/__clzsi2.o \
-	libgcc/__ashldi3.o \
-	libgcc/__ashrdi3.o \
-	libgcc/__lshrdi3.o \
-	libgcc/__divdi3.o \
-        libgcc/__moddi3.o \
-        libgcc/__udivdi3.o \
-	libgcc/__umoddi3.o \
-        libgcc/__udivmoddi4.o
-
-
-KLIBCARCHSOOBJS = $(patsubst %.o,%.lo,$(KLIBCARCHOBJS))
-
-
-archclean:
diff --git a/usr/klibc/arch/parisc/Kbuild b/usr/klibc/arch/parisc/Kbuild
new file mode 100644
index 0000000..d57a873
--- /dev/null
+++ b/usr/klibc/arch/parisc/Kbuild
@@ -0,0 +1,8 @@
+#
+# klibc files for parisc
+#
+
+klib-y := setjmp.o syscall.o
+
+always  := crt0.o
+targets := crt0.o
diff --git a/usr/klibc/arch/parisc/Makefile.inc b/usr/klibc/arch/parisc/Makefile.inc
index f479a6c..0df4e2a 100644
--- a/usr/klibc/arch/parisc/Makefile.inc
+++ b/usr/klibc/arch/parisc/Makefile.inc
@@ -6,11 +6,3 @@ # Special rules for this architecture.  
 # included from the main Makefile, and that pathnames should be
 # accordingly.
 #
-
-KLIBCARCHOBJS = \
-	arch/$(KLIBCARCH)/setjmp.o \
-	arch/$(KLIBCARCH)/syscall.o
-
-KLIBCARCHOOBJS = $(patsubst %o,%.lo,%(KLIBCARCHOBJS))
-
-archclean:
diff --git a/usr/klibc/arch/ppc/Kbuild b/usr/klibc/arch/ppc/Kbuild
new file mode 100644
index 0000000..13612ce
--- /dev/null
+++ b/usr/klibc/arch/ppc/Kbuild
@@ -0,0 +1,12 @@
+#
+# klibc files for ppc
+#
+
+klib-y := arch/$(KLIBCARCH)/setjmp.o arch/$(KLIBCARCH)/syscall.o
+
+klib-y += ../../libgcc/__divdi3.o     ../../libgcc/__moddi3.o
+klib-y += ../../libgcc/__udivdi3.o    ../../libgcc/__umoddi3.o
+klib-y += ../../libgcc/__udivmoddi4.o
+
+always  := crt0.o
+targets := crt0.o
diff --git a/usr/klibc/arch/ppc/Makefile.inc b/usr/klibc/arch/ppc/Makefile.inc
index 53d99c4..e04316f 100644
--- a/usr/klibc/arch/ppc/Makefile.inc
+++ b/usr/klibc/arch/ppc/Makefile.inc
@@ -6,17 +6,3 @@ # Special rules for this architecture.  
 # included from the main Makefile, and that pathnames should be
 # accordingly.
 #
-
-KLIBCARCHOBJS = \
-	arch/$(KLIBCARCH)/setjmp.o \
-	arch/$(KLIBCARCH)/syscall.o \
-	libgcc/__divdi3.o \
-	libgcc/__moddi3.o \
-	libgcc/__udivdi3.o \
-	libgcc/__umoddi3.o \
-	libgcc/__udivmoddi4.o
-
-
-KLIBCARCHSOOBJS = $(patsubst %.o,%.lo,$(KLIBCARCHOBJS))
-
-archclean:
diff --git a/usr/klibc/arch/sh/Kbuild b/usr/klibc/arch/sh/Kbuild
new file mode 100644
index 0000000..ab7ad5a
--- /dev/null
+++ b/usr/klibc/arch/sh/Kbuild
@@ -0,0 +1,8 @@
+#
+# klibc files for sh
+#
+
+klib-y := setjmp.o syscall.o
+
+always  := crt0.o
+targets := crt0.o
diff --git a/usr/klibc/arch/sh/Makefile.inc b/usr/klibc/arch/sh/Makefile.inc
index ccabfa4..c58f605 100644
--- a/usr/klibc/arch/sh/Makefile.inc
+++ b/usr/klibc/arch/sh/Makefile.inc
@@ -6,10 +6,3 @@ # Special rules for this architecture.  
 # included from the main Makefile, and that pathnames should be
 # accordingly.
 #
-
-ARCHOBJS = arch/sh/setjmp.o \
-	   arch/sh/syscall.o
-
-ARCHSOOBJS = $(patsubst %.o,%.lo,$(ARCHOBJS))
-
-archclean:
diff --git a/usr/klibc/arch/sparc64/Kbuild b/usr/klibc/arch/sparc64/Kbuild
new file mode 100644
index 0000000..2854f69
--- /dev/null
+++ b/usr/klibc/arch/sparc64/Kbuild
@@ -0,0 +1,8 @@
+#
+# klibc files for sparc64
+#
+
+klib-y := pipe.o setjmp.o syscall.o sysfork.o
+
+always  := crt0.o
+targets := crt0.o
diff --git a/usr/klibc/arch/sparc64/Makefile.inc b/usr/klibc/arch/sparc64/Makefile.inc
index 1641f51..e6fb346 100644
--- a/usr/klibc/arch/sparc64/Makefile.inc
+++ b/usr/klibc/arch/sparc64/Makefile.inc
@@ -6,11 +6,3 @@ # Special rules for this architecture.  
 # included from the main Makefile, and that pathnames should be
 # accordingly.
 #
-
-KLIBCARCHOBJS = \
-	arch/$(KLIBCARCH)/pipe.o \
-	arch/$(KLIBCARCH)/setjmp.o \
-	arch/$(KLIBCARCH)/syscall.o \
-	arch/$(KLIBCARCH)/sysfork.o
-
-archclean:



More information about the klibc mailing list