On 08/07/2020 08:10, Niteesh G. S. wrote:
On Tue, Jul 7, 2020 at 10:42 AM Sebastian Huber
<sebastian.hu...@embedded-brains.de
<mailto:sebastian.hu...@embedded-brains.de>> wrote:
Hello,
the problem is that the new build system doesn't export optimization
flags such as -Wl,--gc-sections. The libbsd build should enable this
linker option unconditionally.
Thank you. I got it fixed (temporarily) by modifying rtems.py.
conf.env.CFLAGS = cflags['cflags'] + ['-ffunction-sections'] +
['-fdata-sections']
This instructs the compiler to add data elements and functions into
separate sections. This is necessary so that the linker can carry out
the garbage collection.
As per Christian suggestions, I tried exporting CFLAGS with these GCC
flags and then calling ./waf configure but they didn't work.
You have to add -Wl,--gc-sections to the linker flags.
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel