lkml.org 
[lkml]   [1999]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: where to place -fno-strict aliasing
On Fri, Jul 09, 1999 at 11:30:33PM +0000, Philipp Thomas wrote:
> Now I only ever dealt with the intel side for which the place I'd
> choose would be arch/i386/Makefile for up to 2.2.X and CFLAGS in
> linux/Makefile beginning with 2.3.X. Is this correct ? And where would
> it have to be put for other architectures ?

It's not an architecture specific problem. I suggest the following.


r~



diff -rup 2.2.11-pre1/Makefile 2.2.11-axp/Makefile
--- 2.2.11-pre1/Makefile Tue Jun 29 00:11:25 1999
+++ 2.2.11-axp/Makefile Tue Jun 29 00:13:46 1999
@@ -86,7 +86,13 @@ SVGA_MODE= -DSVGA_MODE=NORMAL_VGA
# standard CFLAGS
#

+# Determine if gcc understands the -fno-strict-aliasing flag
+have_NSA := $(shell if $(CC) -fno-strict-aliasing -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi)
+
CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+ifeq ($(have_NSA),y)
+ CFLAGS += -fno-strict-aliasing
+endif

ifdef CONFIG_SMP
CFLAGS += -D__SMP__
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.035 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site