From d84232923e1e66f734094acdb94896dee1e70231 Mon Sep 17 00:00:00 2001 From: razvanm Date: Sat, 14 Nov 2009 02:12:39 +0000 Subject: [PATCH] Pass the GCC variable to ncc. This make it easy to switch from one compiler to another. --- support/make/sim.extra | 4 ++-- tos/platforms/micaz/sim/.platform | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) 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; -- 2.39.2