[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) \
-D_GNU_SOURCE -D_IO_MTSAFE_IO -D_FILE_OFFSET_BITS=64 \
$($*-CPPFLAGS)
CFLAGS += -std=gnu99 $(gnu89-inline-CFLAGS) -Wall -g -O3 \
+ -fno-strict-aliasing \
$($*-CFLAGS)
# Include the configure-generated file of parameters.
--
1.7.10.4
- [PATCH 1/5] Makeconf: add -fno-strict-aliasing to CFLAGS,
Justus Winter <=