packages/net/iotivity/patches/004-use-env.patch
Hauke Mehrtens 2627b0ea50 iotivity: add IoTivity
IoTivity is a Internet of Things framework implementing the Open
Interconnect Consortium Specification.

The current version of IoTivity is still in heavy development and does
not support all its intended features, but I still want to add it to
the packages feed to make it easier for others to extend the OpenWrt
support.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
2015-07-01 22:58:06 +02:00

38 lines
1.5 KiB
Diff

From 884e831ed07607097614276f6bbf192993228100 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Date: Tue, 2 Jun 2015 11:08:17 +0200
Subject: [PATCH 3/4] 004-use-env.patch
---
build_common/SConscript | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
--- a/build_common/SConscript
+++ b/build_common/SConscript
@@ -106,6 +106,26 @@ tc_set_msg = '''
* cause inexplicable errors. *
*******************************************************************************
'''
+env['ENV'] = os.environ
+if 'CC' in os.environ:
+ env['CC'] = Split(os.environ['CC'])
+ print "using CC from enviroment: %s" % env['CC']
+if 'CXX' in os.environ:
+ env['CXX'] = Split(os.environ['CXX'])
+ print "using CXX from enviroment: %s" % env['CXX']
+if 'CFLAGS' in os.environ:
+ env['CFLAGS'] = Split(os.environ['CFLAGS'])
+ print "using CFLAGS from enviroment: %s" % env['CFLAGS']
+if 'CXXFLAGS' in os.environ:
+ env['CXXFLAGS'] = Split(os.environ['CXXFLAGS'])
+ print "using CXXFLAGS from enviroment: %s" % env['CXXFLAGS']
+if 'CPPFLAGS' in os.environ:
+ env['CPPFLAGS'] = Split(os.environ['CPPFLAGS'])
+ print "using CPPFLAGS from enviroment: %s" % env['CPPFLAGS']
+if 'LDFLAGS' in os.environ:
+ env['LINKFLAGS'] = Split(os.environ['LDFLAGS'])
+ print "using LDFLAGS/LINKFLAGS from enviroment: %s" % env['LINKFLAGS']
+
if env.get('VERBOSE') == False:
env['CCCOMSTR'] = "Compiling $TARGET"
env['CXXCOMSTR'] = "Compiling $TARGET"