1
0

022-build-restrict-compiler-options-to-supported-archite.patch 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From 39b0c436c77555849da1e68cc8733c67183c291f Mon Sep 17 00:00:00 2001
  2. From: Hauke Mehrtens <hauke@hauke-m.de>
  3. Date: Sat, 10 Dec 2016 18:35:04 +0100
  4. Subject: [PATCH 22/23] build: restrict compiler options to supported
  5. architectures
  6. For Linux we currently only support the following architectures:
  7. 'x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64'
  8. explicitly check for those architectures and also remove ARM hard float.
  9. Change-Id: I7078530bc2a89b88c7049cc53e8bb3fbe5d75ca8
  10. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  11. ---
  12. build_common/linux/SConscript | 11 +++--------
  13. resource/csdk/connectivity/build/linux/SConscript | 11 +++--------
  14. 2 files changed, 6 insertions(+), 16 deletions(-)
  15. --- a/build_common/linux/SConscript
  16. +++ b/build_common/linux/SConscript
  17. @@ -30,14 +30,9 @@ if target_arch in ['x86']:
  18. elif target_arch in ['x86_64']:
  19. env.AppendUnique(CCFLAGS = ['-m64'])
  20. env.AppendUnique(LINKFLAGS = ['-m64'])
  21. -elif target_arch in ['arm'] or target_arch.find('v5') > 0:
  22. +elif target_arch in ['arm']:
  23. env.AppendUnique(CPPFLAGS = ['-march=armv5te'])
  24. -elif target_arch.find('v7a-hard') > 0:
  25. +elif target_arch in ['arm-v7a', 'armeabi-v7a']:
  26. env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
  27. - env.AppendUnique(CPPFLAGS = ['-mfloat-abi=hard'])
  28. - env.AppendUnique(CCFLAGS = ['-mfloat-abi=hard'])
  29. - env.AppendUnique(LINKFLAGS = ['-mfloat-abi=hard'])
  30. -elif target_arch.find('v7a') > 0:
  31. - env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
  32. -elif target_arch.find('arm64') >= 0:
  33. +elif target_arch.find('arm64') > 0:
  34. env.AppendUnique(CPPFLAGS = ['-march=armv8-a'])
  35. --- a/resource/csdk/connectivity/build/linux/SConscript
  36. +++ b/resource/csdk/connectivity/build/linux/SConscript
  37. @@ -29,14 +29,9 @@ if target_arch in ['x86']:
  38. elif target_arch in ['x86_64']:
  39. env.AppendUnique(CCFLAGS = ['-m64'])
  40. env.AppendUnique(LINKFLAGS = ['-m64'])
  41. -elif target_arch.find('v7a-hard') > 0:
  42. - env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
  43. - env.AppendUnique(CPPFLAGS = ['-mfloat-abi=hard'])
  44. - env.AppendUnique(CCFLAGS = ['-mfloat-abi=hard'])
  45. - env.AppendUnique(LINKFLAGS = ['-mfloat-abi=hard'])
  46. -elif target_arch.find('v7a') > 0:
  47. +elif target_arch in ['arm']:
  48. + env.AppendUnique(CPPFLAGS = ['-march=armv5te'])
  49. +elif target_arch in ['arm-v7a', 'armeabi-v7a']:
  50. env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
  51. elif target_arch.find('arm64') > 0:
  52. env.AppendUnique(CPPFLAGS = ['-march=armv8-a'])
  53. -else:
  54. - env.AppendUnique(CPPFLAGS = ['-march=armv5te'])