You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.5 KiB

  1. From 884e831ed07607097614276f6bbf192993228100 Mon Sep 17 00:00:00 2001
  2. From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
  3. Date: Tue, 2 Jun 2015 11:08:17 +0200
  4. Subject: [PATCH 3/4] 004-use-env.patch
  5. ---
  6. build_common/SConscript | 22 ++++++++++++++++++++++
  7. 1 file changed, 22 insertions(+)
  8. --- a/build_common/SConscript
  9. +++ b/build_common/SConscript
  10. @@ -137,6 +137,26 @@ tc_set_msg = '''
  11. * cause inexplicable errors. *
  12. *******************************************************************************
  13. '''
  14. +env['ENV'] = os.environ
  15. +if 'CC' in os.environ:
  16. + env['CC'] = Split(os.environ['CC'])
  17. + print "using CC from enviroment: %s" % env['CC']
  18. +if 'CXX' in os.environ:
  19. + env['CXX'] = Split(os.environ['CXX'])
  20. + print "using CXX from enviroment: %s" % env['CXX']
  21. +if 'CFLAGS' in os.environ:
  22. + env['CFLAGS'] = Split(os.environ['CFLAGS'])
  23. + print "using CFLAGS from enviroment: %s" % env['CFLAGS']
  24. +if 'CXXFLAGS' in os.environ:
  25. + env['CXXFLAGS'] = Split(os.environ['CXXFLAGS'])
  26. + print "using CXXFLAGS from enviroment: %s" % env['CXXFLAGS']
  27. +if 'CPPFLAGS' in os.environ:
  28. + env['CPPFLAGS'] = Split(os.environ['CPPFLAGS'])
  29. + print "using CPPFLAGS from enviroment: %s" % env['CPPFLAGS']
  30. +if 'LDFLAGS' in os.environ:
  31. + env['LINKFLAGS'] = Split(os.environ['LDFLAGS'])
  32. + print "using LDFLAGS/LINKFLAGS from enviroment: %s" % env['LINKFLAGS']
  33. +
  34. if env.get('VERBOSE') == False:
  35. env['CCCOMSTR'] = "Compiling $TARGET"
  36. env['SHCCCOMSTR'] = "Compiling $TARGET"