diff options
author | Kinsey Moore <kinsey.moore@oarcorp.com> | 2022-08-04 14:46:58 -0500 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2022-08-25 13:37:09 -0500 |
commit | e05f7703b16132160c22db1c50baad0f6a3cf9ad (patch) | |
tree | 247378628f493fe3c101e8317dd6139bfe6820fc | |
parent | README: Add build instruction (diff) | |
download | rtems-lwip-e05f7703b16132160c22db1c50baad0f6a3cf9ad.tar.bz2 |
lwip.py: Add compile flags
This alters rtems-lwip to follow the RTEMS convention of compiling with
function sections for linking optimization and dead code removal.
-rw-r--r-- | lwip.py | 10 | ||||
-rw-r--r-- | wscript | 2 |
2 files changed, 11 insertions, 1 deletions
@@ -173,3 +173,13 @@ def build(bld): use='telnetd lwip rtemstest ftpd', cflags='-g -Wall -O0', includes=drv_incl + common_includes + './rtemslwip/test/ ' + os.path.relpath(os.path.join(arch_lib_path,'include'))) + +def add_flags(flags, new_flags): + for flag in new_flags: + if flag not in flags: + flags.append(flag) + +def bsp_configure(conf, arch_bsp): + section_flags = ["-fdata-sections", "-ffunction-sections"] + add_flags(conf.env.CFLAGS, section_flags) + add_flags(conf.env.CXXFLAGS, section_flags) @@ -49,7 +49,7 @@ def options(opt): def configure(conf): - rtems.configure(conf) + rtems.configure(conf, lwip.bsp_configure) def build(bld): |