From: razvanm Date: Sat, 14 Nov 2009 02:12:39 +0000 (+0000) Subject: Pass the GCC variable to ncc. This make it easy to switch from one compiler to another. X-Git-Tag: rc_6_tinyos_2_1_1~139 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=d84232923e1e66f734094acdb94896dee1e70231 Pass the GCC variable to ncc. This make it easy to switch from one compiler to another. --- diff --git a/support/make/sim.extra b/support/make/sim.extra index 13ab0516..2bf5abdd 100644 --- a/support/make/sim.extra +++ b/support/make/sim.extra @@ -1,11 +1,11 @@ #-*-Makefile-*- vim:syntax=make #$Id$ -GCC=gcc +export GCC=gcc GPP=g++ OPTFLAGS = -g -O0 LIBS = -lm -lstdc++ -PFLAGS += -tossim -fnesc-nido-tosnodes=1000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\(\) +PFLAGS += -tossim -fnesc-nido-tosnodes=1000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\(\) -fnesc-gcc=$(GCC) WFLAGS = -Wno-nesc-data-race PYTHON_VERSION=2.5 diff --git a/tos/platforms/micaz/sim/.platform b/tos/platforms/micaz/sim/.platform index fe798618..e9de9723 100644 --- a/tos/platforms/micaz/sim/.platform +++ b/tos/platforms/micaz/sim/.platform @@ -28,11 +28,15 @@ push( @includes, qw( @opts = qw( - -gcc=gcc -fnesc-no-debug -fnesc-scheduler=TinySchedulerC,TinySchedulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask ); +if (defined($ENV{"GCC"})) { + push @opts, "-gcc=$ENV{'GCC'}"; +} else { + push @opts, "-gcc=gcc"; +} push @opts, "-mingw-gcc" if $cygwin;