Re: [RFC] klibc for 2.5.59 bk

From: Jeff Garzik (jgarzik@pobox.com)
Date: Mon Feb 17 2003 - 13:36:59 EST


H. Peter Anvin wrote:
>>On Sun, Feb 16, 2003 at 09:06:09PM -0600, Kai Germaschewski wrote:
>>
>>
>>>I did some work on integrating klibc into kbuild now. I used your
>>>patch as guide line, though I started from scratch with klibc-0.77.
>>>The build should work fine (reminder: "make KBUILD_VERBOSE=0 ..."
>>>will give you much more readable output), but I probably broke some
>>>non-x86 architectures in the process.
>>
>>Got this output when compiling user programs:
>> USERCC usr/lib/snprintf.o
>>cc1: warning: -malign-loops is obsolete, use -falign-loops
>>cc1: warning: -malign-jumps is obsolete, use -falign-jumps
>>cc1: warning: -malign-functions is obsolete, use -falign-functions
>>
>
>
> I get the same error compiling the kernel proper for Crusoe. This is what
> I like to call an "annoyance warning" where maintaining compatibility
> between gcc versions emit a neverending stream of annoying messages.

Maintaining gcc compatibility need not imply this annoyance. This has
been fixed in 2.5.x for ages, for the main kernel build, and I recently
fixed it in 2.4.x by the attached patch. We just need to move that fix
over to klibc build...

        Jeff

diff -Nru a/arch/i386/Makefile b/arch/i386/Makefile
--- a/arch/i386/Makefile Mon Feb 17 13:35:18 2003
+++ b/arch/i386/Makefile Mon Feb 17 13:35:18 2003
@@ -23,8 +23,10 @@
 
 CFLAGS += -pipe
 
+check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
+
 # prevent gcc from keeping the stack 16 byte aligned
-CFLAGS += $(shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2"; fi)
+CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,)
 
 ifdef CONFIG_M386
 CFLAGS += -march=i386
@@ -83,7 +85,8 @@
 endif
 
 ifdef CONFIG_MCYRIXIII
-CFLAGS += -march=i486 -malign-functions=0 -malign-jumps=0 -malign-loops=0
+CFLAGS += $(call check_gcc,-march=c3,-march=i486)
+CFLAGS += $(call check_gcc,-falign-functions=0 -falign-jumps=0 -falign-loops=0,-malign-functions=0 -malign-jumps=0 -malign-loops=0)
 endif
 
 HEAD := arch/i386/kernel/head.o arch/i386/kernel/init_task.o

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Feb 23 2003 - 22:00:19 EST