[klibc] [patch] sparc build fix

maximilian attems maks at sternwelten.at
Tue Apr 18 09:19:47 PDT 2006


add object rules so that the division, remainder and friends get
really build on sparc, patch from Fabio M. Di Nitto <fabbione at ubuntu.com>.
reworked to apply on latest git tree.

Signed-off-by: maximilian attems <maks at sternwelten.at>

---
Has been since long in the Debian and Ubuntu klibc.

diff --git a/klibc/arch/sparc/Makefile.inc b/klibc/arch/sparc/Makefile.inc
index 41c23c5..d77030d 100644
--- a/klibc/arch/sparc/Makefile.inc
+++ b/klibc/arch/sparc/Makefile.inc
@@ -23,25 +23,33 @@ KLIBCARCHOBJS = \
 	libgcc/__umoddi3.o \
 	libgcc/__udivmoddi4.o
 
-arch/$(KLIBCARCH)/sdiv.S: arch/$(KLIBCARCH)/divrem.m4
+arch/$(KLIBCARCH)/sdiv.o: arch/$(KLIBCARCH)/sdiv.S
+
+klibc/arch/$(KLIBCARCH)/sdiv.S: klibc/arch/$(KLIBCARCH)/divrem.m4
 	@echo 'building $@ from $^'
 	@(echo "define(NAME,\`.div')define(OP,\`div')define(S,\`true')"; \
 	 cat $^) | m4 > $@
 	@chmod 444 $@
 
-arch/$(KLIBCARCH)/udiv.S: arch/$(KLIBCARCH)/divrem.m4
+arch/$(KLIBCARCH)/udiv.o: arch/$(KLIBCARCH)/udiv.S
+
+klibc/arch/$(KLIBCARCH)/udiv.S: klibc/arch/$(KLIBCARCH)/divrem.m4
 	@echo 'building $@ from $^'
 	@(echo "define(NAME,\`.udiv')define(OP,\`div')define(S,\`false')"; \
 	 cat $^) | m4 > $@
 	@chmod 444 $@
 
-arch/$(KLIBCARCH)/srem.S: arch/$(KLIBCARCH)/divrem.m4
+arch/$(KLIBCARCH)/srem.o: arch/$(KLIBCARCH)/srem.S
+
+klibc/arch/$(KLIBCARCH)/srem.S: klibc/arch/$(KLIBCARCH)/divrem.m4
 	@echo 'building $@ from $^'
 	@(echo "define(NAME,\`.rem')define(OP,\`rem')define(S,\`true')"; \
 	 cat $^) | m4 > $@
 	@chmod 444 $@
 
-arch/$(KLIBCARCH)/urem.S: arch/$(KLIBCARCH)/divrem.m4
+arch/$(KLIBCARCH)/urem.S: klibc/arch/$(KLIBCARCH)/urem.S
+
+klibc/arch/$(KLIBCARCH)/urem.S: klibc/arch/$(KLIBCARCH)/divrem.m4
 	@echo 'building $@ from $^'
 	@(echo "define(NAME,\`.urem')define(OP,\`rem')define(S,\`false')"; \
 	 cat $^) | m4 > $@



More information about the klibc mailing list