rtems/bsps: Add machine flags to the linker flags.

- Some packages link executables and this needs valid
  machine flags or you can get errors mixing libraries.
This commit is contained in:
Chris Johns 2019-08-29 13:30:54 +10:00
parent 3d2f6ea272
commit 1c5e45cbc4

View File

@ -204,6 +204,12 @@
%define rtems_bsp_libs %{rtems_bsp_libs} -lrtemsdefaultconfig
%endif
#
# 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})
#
# Map to names used for cross compiling.
#