[01/13] batmand: Disable strict-aliasing rules

Message ID 1379019524-23543-2-git-send-email-sven@narfation.org (mailing list archive)
State Accepted, archived
Commit ba0674a50b7bdfd7b09750d9af5c54389f7f54fa
Headers

Commit Message

Sven Eckelmann Sept. 12, 2013, 8:58 p.m. UTC
  There are different aliasing problems in posix/tunnel.c and maybe other files.
This can lead to wrongly generated code when the compiler assumes strict
aliasing rules.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/Makefile b/Makefile
index ce1e198..3205573 100755
--- a/Makefile
+++ b/Makefile
@@ -37,7 +37,7 @@  MANPAGE = man/batmand.8
 #NO_POLICY_ROUTING = -DNO_POLICY_ROUTING
 
 # batmand flags and options
-CFLAGS +=	-pedantic -Wall -W -std=gnu99 -MD
+CFLAGS +=	-pedantic -Wall -W -std=gnu99 -MD -fno-strict-aliasing
 CPPFLAGS +=	-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA $(NO_POLICY_ROUTING)
 LDLIBS +=	-lpthread