lkml.org 
[lkml]   [2000]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectPATCH 2.4.0.10.6: always no-strict-aliasing
Linus Torvalds wrote:
> (a) the new compiler requirements (sorry, but it turned out that 2.7.2.3
> really is too subtly broken with named structure initializers that
> are very heavily used these days inside the kernel)
>
> Suggested stable compiler: gcc-2.91.66, aka egcs-1.1.2, which is the
> one most vendors have been shipping for a long time, and while sure
> to be buggy too has not been found to be seriously so at least yet.
>
> Other modern gcc versions may well work too.

Since egcs-1.1.2 supports -fno-strict-aliasing, would the attached patch
against linux/Makefile be appropriate?

--
Jeff Garzik | Raft naked...
Building 1024 | It adds color to your cheeks.
MandrakeSoft |Index: Makefile
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/Makefile,v
retrieving revision 1.1.1.11
diff -u -r1.1.1.11 Makefile
--- Makefile 2000/10/22 23:14:50 1.1.1.11
+++ Makefile 2000/10/27 08:32:28
@@ -16,7 +16,7 @@
FINDHPATH = $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net

HOSTCC = gcc
-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing

CROSS_COMPILE =

@@ -87,7 +87,7 @@

CPPFLAGS := -D__KERNEL__ -I$(HPATH)

-CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing
AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)

#
@@ -181,9 +181,6 @@
DRIVERS += $(DRIVERS-y)

include arch/$(ARCH)/Makefile
-
-# use '-fno-strict-aliasing', but only if the compiler can take it
-CFLAGS += $(shell if $(CC) -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-fno-strict-aliasing"; fi)

export CPPFLAGS CFLAGS AFLAGS
\
 
 \ /
  Last update: 2005-03-22 12:43    [W:0.030 / U:15.396 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site