Module: sip-router
Branch: master
Commit: 4ef2fe37b80d26f34a656daeb890825e4e21f5fc
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4ef2fe37b80d26f34a656daeb890825e4e21f5fc

Author: Andrei Pelinescu-Onciul <[email protected]>
Committer: Andrei Pelinescu-Onciul <[email protected]>
Date:   Thu Oct  1 11:28:02 2009 +0200

makefile: use -fsigned-char on some archs

Use -fsigned-char for gcc on ppc, ppc64, arm and armv6 to avoid
possible bugs (most people assume char is signed).

---

 Makefile.defs |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile.defs b/Makefile.defs
index aa38af0..88abb70 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -72,6 +72,8 @@
 #  2009-09-29  for gcc 4.2+ use -fno-strict-overflow (andrei)
 #  2009-09-30  find the target architecture from the compiler and not
 #              from the host (andrei)
+#  2009-10-01  use -fsigned-char for gcc on ppc, ppc64, arm and arm6
+#              (on those archs char is unsigned by default) (andrei)
 
 
 # check if already included/exported
@@ -1057,7 +1059,7 @@ ifeq      ($(ARCH), arm)
 ifeq           ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
-                               CFLAGS=-O9 -funroll-loops $(PROFILE)
+                               CFLAGS=-O9 -funroll-loops -fsigned-char 
$(PROFILE)
                        #if gcc 4.2+
 ifeq                   ($(CC_SHORTVER), 4.2+)
                                        CFLAGS+= -ftree-vectorize 
-fno-strict-overflow
@@ -1105,7 +1107,7 @@ ifeq      ($(ARCH), arm6)
 ifeq           ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
-                               CFLAGS=-march=armv6 -O9 -funroll-loops \
+                               CFLAGS=-march=armv6 -O9 -funroll-loops 
-fsigned-char \
                                                $(PROFILE)
                        #if gcc 4.2+
 ifeq                   ($(CC_SHORTVER), 4.2+)
@@ -1335,7 +1337,7 @@ ifeq      ($(ARCH), ppc)
 ifeq           ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
-                               CFLAGS= -O9 -funroll-loops $(PROFILE)
+                               CFLAGS= -O9 -funroll-loops -fsigned-char 
$(PROFILE)
                        #if gcc 4.2+
 ifeq                   ($(CC_SHORTVER), 4.2+)
                                        CPU ?= powerpc
@@ -1384,7 +1386,7 @@ ifeq      ($(ARCH), ppc64)
 ifeq           ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
-                               CFLAGS= -O9 -funroll-loops $(PROFILE)
+                               CFLAGS= -O9 -funroll-loops -fsigned-char 
$(PROFILE)
                        #if gcc 4.2+
 ifeq                   ($(CC_SHORTVER), 4.2+)
                                        CPU ?= powerpc64


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to