Re: [RFC] klibc for 2.5.59 bk

Jeff Garzik (jgarzik@pobox.com)
Mon, 17 Feb 2003 13:36:59 -0500


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-24484-1045507139-0001-2
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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

--=_courier-24484-1045507139-0001-2
Content-Type: text/plain; name=patch; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="patch"

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

--=_courier-24484-1045507139-0001-2--