svn commit: trunk/busybox

aldot at busybox.net aldot at busybox.net
Tue Dec 13 11:53:00 UTC 2005


Author: aldot
Date: 2005-12-13 03:52:46 -0800 (Tue, 13 Dec 2005)
New Revision: 12871

Log:
- check if CC supports -funsigned-char
- add CC_MAJOR and CC_MINOR variables. (gcc centric for now)


Modified:
   trunk/busybox/Rules.mak


Changeset:
Modified: trunk/busybox/Rules.mak
===================================================================
--- trunk/busybox/Rules.mak	2005-12-13 11:35:31 UTC (rev 12870)
+++ trunk/busybox/Rules.mak	2005-12-13 11:52:46 UTC (rev 12871)
@@ -81,9 +81,15 @@
 #GCCINCDIR:=$(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
 
 WARNINGS=-Wall -Wstrict-prototypes -Wshadow
-CFLAGS=-I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir) -funsigned-char
+CFLAGS=-I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)
 ARFLAGS=cru
 
+
+# gcc centric. Perhaps fiddle with findstring gcc,$(CC) for the rest
+# get the CC MAJOR/MINOR version
+CC_MAJOR:=$(shell printf "%02d" $(shell echo __GNUC__ | $(CC) -E -xc - | tail -n 1))
+CC_MINOR:=$(shell printf "%02d" $(shell echo __GNUC_MINOR__ | $(CC) -E -xc - | tail -n 1))
+
 #--------------------------------------------------------
 export VERSION BUILDTIME HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP
 ifeq ($(strip $(TARGET_ARCH)),)
@@ -117,6 +123,8 @@
 SECHO=- at false
 endif
 
+CFLAGS+=$(call check_gcc,-funsigned-char,)
+
 #--------------------------------------------------------
 # Arch specific compiler optimization stuff should go here.
 # Unless you want to override the defaults, do not set anything




More information about the busybox-cvs mailing list