[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/5] Makeconf: add -fno-strict-aliasing to CFLAGS

From: Justus Winter
Subject: [PATCH 1/5] Makeconf: add -fno-strict-aliasing to CFLAGS
Date: Fri, 25 Oct 2013 10:30:20 +0200

If gcc is used with optimizations -O2, -O3, or -Os, it will enable
optimizations that assume that pointers of different type do not
alias, i.e. point to the same address. However, we use this a lot,
e.g. in code using libports.

Add -fno-strict-aliasing to CFLAGS to disable optimizations based on
the strict aliasing rule.

* Makeconf: Add -fno-strict-aliasing to CFLAGS.
 Makeconf |    1 +
 1 file changed, 1 insertion(+)

diff --git a/Makeconf b/Makeconf
index 5cf995d..cb13335 100644
--- a/Makeconf
+++ b/Makeconf
@@ -80,6 +80,7 @@ CPPFLAGS += $(INCLUDES) \
 CFLAGS += -std=gnu99 $(gnu89-inline-CFLAGS) -Wall -g -O3 \
+           -fno-strict-aliasing \
 # Include the configure-generated file of parameters.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]