cc.scons 1007 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. Import("ENV")
  2. ENV.AppendUnique(
  3. CFLAGS=[
  4. "-std=gnu17",
  5. ],
  6. CXXFLAGS=[
  7. "-std=c++17",
  8. "-fno-rtti",
  9. "-fno-use-cxa-atexit",
  10. "-fno-exceptions",
  11. "-fno-threadsafe-statics",
  12. "-ftemplate-depth=4096",
  13. ],
  14. CCFLAGS=[
  15. "-mcpu=cortex-m4",
  16. "-mfloat-abi=hard",
  17. "-mfpu=fpv4-sp-d16",
  18. "-mthumb",
  19. # "-MMD",
  20. # "-MP",
  21. "-Wall",
  22. "-Wextra",
  23. "-Werror",
  24. "-Wno-address-of-packed-member",
  25. "-Wredundant-decls",
  26. "-Wdouble-promotion",
  27. "-fdata-sections",
  28. "-ffunction-sections",
  29. "-fsingle-precision-constant",
  30. "-fno-math-errno",
  31. # Generates .su files with stack usage information
  32. # "-fstack-usage",
  33. "-g",
  34. ],
  35. CPPDEFINES=[
  36. "_GNU_SOURCE",
  37. ],
  38. LINKFLAGS=[
  39. "-mcpu=cortex-m4",
  40. "-mfloat-abi=hard",
  41. "-mfpu=fpv4-sp-d16",
  42. "-mlittle-endian",
  43. "-mthumb",
  44. ],
  45. )