]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Fix for null platform for Snow Leopard (10.6).
authorrazvanm <razvanm>
Sat, 14 Nov 2009 06:51:21 +0000 (06:51 +0000)
committerrazvanm <razvanm>
Sat, 14 Nov 2009 06:51:21 +0000 (06:51 +0000)
support/make/null/null.rules
tos/platforms/null/.platform

index 58632258ea1efb344dcd616778fc1f48fa131586..6514cec517a410a14bff1d9f179648a4c5cc5606 100644 (file)
@@ -10,6 +10,7 @@ define NULL_HELP
 endef
 HELP += $(NULL_HELP)
 
+export GCC=gcc
 OBJCOPY = objcopy
 OBJDUMP = objdump
 NCC = ncc
@@ -23,7 +24,7 @@ INSTALL_SREC = $(MAIN_SREC).out$(if $(NODEID),-$(NODEID),)
 VOLUMEFILE = volumes-at45db.xml
 VOLUME_ALLOCATOR ?= tos-storage-at45db
 
-PFLAGS += -Wall -Wshadow $(NESC_FLAGS)
+PFLAGS += -Wall -Wshadow -fnesc-gcc=$(GCC) $(NESC_FLAGS)
 PFLAGS += -target=$(PLATFORM) -fnesc-cfile=$(BUILDDIR)/app.c
 ifdef MSG_SIZE
 PFLAGS += -DTOSH_DATA_LENGTH=$(MSG_SIZE)
@@ -31,6 +32,11 @@ endif
 ifdef DEFAULT_LOCAL_GROUP
 PFLAGS += -DDEFINED_TOS_AM_GROUP=$(DEFAULT_LOCAL_GROUP)
 endif
+ifeq ($(findstring Darwin, $(shell uname)), Darwin)
+  CFLAGS += -D_FORTIFY_SOURCE=0
+  OBJCOPY = /usr/bin/true
+  OBJDUMP = /usr/bin/true
+endif
 
 BUILDLESS_DEPS += bytes
 
@@ -69,5 +75,5 @@ builddir: FORCE
        mkdir -p $(BUILDDIR)
 
 bytes: FORCE
-       @objdump -h $(MAIN_EXE) | perl -ne '$$b{$$1}=hex $$2 if /^\s*\d+\s*\.(text|data|bss)\s+(\S+)/; END { printf("%16d bytes in ROM\n%16d bytes in RAM\n",$$b{text}+$$b{data},$$b{data}+$$b{bss}); }'
+       @$(OBJDUMP) -h $(MAIN_EXE) | perl -ne '$$b{$$1}=hex $$2 if /^\s*\d+\s*\.(text|data|bss)\s+(\S+)/; END { printf("%16d bytes in ROM\n%16d bytes in RAM\n",$$b{text}+$$b{data},$$b{data}+$$b{bss}); }'
 
index 9ae17389d97cfaeb8dc706ba8b3ab9e29d0b8418..c9e8dc3b77c06db380778c7b1aa062844b99e4e7 100644 (file)
@@ -14,10 +14,14 @@ push( @includes, qw(
 
 @opts = qw(
 
-  -gcc=gcc
   -fnesc-target=pc
   -fnesc-no-debug
 
 );
 
+if (defined($ENV{"GCC"})) {
+  push @opts, "-gcc=$ENV{'GCC'}";
+} else {
+  push @opts, "-gcc=gcc";
+}
 push @opts, "-fnesc-scheduler=TinySchedulerC,TinySchedulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask" if !$with_scheduler_flag;