execute=True,
msg='Checking for rpath support',
cflags='-Wl,-rpath=.')
+
+@conf
+def CHECK_CC_ENV(conf):
+ '''trim whitespaces from 'CC'.
+ The build farm sometimes puts a space at the start'''
+ if os.environ.get('CC'):
+ conf.env.CC = TO_LIST(os.environ.get('CC'))
+ if len(conf.env.CC) == 1:
+ # make for nicer logs if just a single command
+ conf.env.CC = conf.env.CC[0]
# load our local waf extensions
conf.check_tool('wafsamba', tooldir=conf.srcdir + "/buildtools/wafsamba")
- # trim whitespaces from 'CC'.
- # The build farm sometimes puts a space at the start
- if os.environ.get('CC'):
- conf.env['CC'] = os.environ.get('CC').strip()
- os.environ['CC'] = conf.env['CC']
+ conf.CHECK_CC_ENV()
conf.check_tool('compiler_cc')