[klibc] kbuild: fix so binaries is now working
Sam Ravnborg
sam at ravnborg.org
Sun Aug 7 00:23:19 PDT 2005
kbuild: fix so binaries is now working
Passsing the wrong options when compiling .S files had the
unfortunate sideeffect that the binaries did not work.
This is presumeably due to -mregparm=3.
Fix it so correct flags is passed.
Also included a fix to obey ARCHREQFLAGS.
Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
---
commit d621115d41d24f209588b9896fcc95729cd9008f
tree 621dd1ba9a734476eec979353eeec66ffcf770a0
parent e6d3b4d5f0457708ba55e85e360c3ca3bfc5be7c
author Sam Ravnborg <sam at mars.(none)> Sun, 07 Aug 2005 08:50:37 +0200
committer Sam Ravnborg <sam at mars.(none)> Sun, 07 Aug 2005 08:50:37 +0200
Makefile | 3 +++
scripts/Kbuild.klibc | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -26,6 +26,9 @@ export libdir = $(prefix)/lib
export mandir = $(prefix)/man
export INSTALLDIR = $(prefix)/lib/klibc
+# Create a fake .config as present in the kernel tree
+# But if it exists leave it alone
+$(if $(wildcard $(objtree)/.config),,$(shell echo CONFIG_KLIBC=y > .config))
# Prefix Make commands with $(Q) to silence them
# Use quiet_cmd_xxx, cmd_xxx to create nice output
diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
--- a/scripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -58,7 +58,7 @@ include $(KLIBCSRC)/arch/$(ARCH)/MCONFIG
# FIXME - backwards compatibility. Remove when all MCONFIGs are corrected
KLIBCREQFLAGS += $(REQFLAGS)
-KLIBCARCHREQFLAGS += $(REQFLAGS)
+KLIBCARCHREQFLAGS += $(ARCHREQFLAGS)
KLIBCOPTFLAGS += $(OPTFLAGS)
KLIBCWARNFLAGS += $(WARNFLAGS) -W -Wall -Wno-sign-compare
KLIBCSHAREDFLAGS += $(SHAREDFLAGS)
@@ -87,7 +87,7 @@ KLIBCCPPFLAGS += -D__KLIBC__=1 -D__KL
-DBITSIZE=$(KLIBCBITSIZE)
KLIBCCFLAGS := $(KLIBCCPPFLAGS) $(KLIBCREQFLAGS) $(KLIBCARCHREQFLAGS) \
$(KLIBCOPTFLAGS) $(KLIBCWARNFLAGS)
-KLIBCAFLAGS := -D__ASSEMBLY__ $(KLIBCCPPFLAGS)
+KLIBCAFLAGS := -D__ASSEMBLY__ $(KLIBCCFLAGS)
KLIBCSTRIPFLAGS := --strip-all -R .comment -R .note
KLIBCLIBGCC := $(shell $(KLIBCCC) --print-libgcc)
More information about the klibc
mailing list