From a4f89a7327e5b5dc2a64e51840aa19c7ac89071d Mon Sep 17 00:00:00 2001 From: comex Date: Fri, 7 Aug 2015 17:03:51 -0400 Subject: fixes --- script/gen-deb.sh | 2 +- script/mconfig.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/script/gen-deb.sh b/script/gen-deb.sh index 999765c..23bfcf0 100755 --- a/script/gen-deb.sh +++ b/script/gen-deb.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e debroot=out/debroot version="$(git describe --always --dirty)" diff --git a/script/mconfig.py b/script/mconfig.py index 1afcd0d..4afccad 100644 --- a/script/mconfig.py +++ b/script/mconfig.py @@ -591,8 +591,11 @@ class UnixToolchain(object): def find_tool(self, tool, failure_notes): # special cases if tool.name == 'cpp': - cc = self.machine.c_tools().cc() - if cc is not None: + try: + cc = self.machine.c_tools().cc.argv() + except DependencyNotFoundException: + pass + else: return cc + ['-E'] return self.find_tool_normal(tool, failure_notes) @@ -612,7 +615,7 @@ def calc_darwin_target_conditionals(ctools, settings): log('* Error: Darwin platform but no TargetConditionals.h?\n') raise DependencyNotFoundException # note: TARGET_CPU are no good because there could be multiple arches - return {env: bool(val) for (env, val) in re.findall('^#define (TARGET_OS_[^ ]*)\s+(0|1)\s*$', so, re.M)} + return {env: bool(int(val)) for (env, val) in re.findall('^#define (TARGET_OS_[^ ]*)\s+(0|1)\s*$', so, re.M)} # Reads a binary or XML plist (on OS X) def read_plist(gunk): -- cgit v1.2.3