mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
rtems-bsb: Use linker garbage collection for BSP based builds
Close #3944.
This commit is contained in:
parent
f1a3c8c634
commit
13e4dfd3d2
@ -227,11 +227,20 @@
|
||||
%define rtems_bsp_libs %{rtems_bsp_libs} -lrtemsdefaultconfig
|
||||
%endif
|
||||
|
||||
#
|
||||
# Define any extra flags we may need.
|
||||
#
|
||||
%define rtems_bsp_ldflags_extra \
|
||||
%{?rtems_bsp_ldflags_extra: %{rtems_bsp_ldflags_extra}} \
|
||||
-Wl,--gc-sections
|
||||
|
||||
#
|
||||
# The linker flags need to include the machine options for the BSP.
|
||||
#
|
||||
%define mflags_filter awk '{for (i=1;i<NF;++i) if ($i ~ /\-m/) printf("%s ",$i);}'
|
||||
%define rtems_bsp_ldflags %{rtems_bsp_ldflags} $(echo "%{rtems_bsp_cflags}" | %{mflags_filter})
|
||||
%define rtems_bsp_ldflags %{rtems_bsp_ldflags} \
|
||||
$(echo "%{rtems_bsp_cflags}" | %{mflags_filter}) \
|
||||
%{rtems_bsp_ldflags_extra}
|
||||
|
||||
#
|
||||
# Map to names used for cross compiling.
|
||||
|
Loading…
x
Reference in New Issue
Block a user