summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2023-04-22 15:18:08 +1000
committerChris Johns <chrisj@rtems.org>2023-04-22 15:18:08 +1000
commit565cd9d9bbc1302a080010b8c219167c6c04b5c5 (patch)
treede1fe45b898c0d0ddd0ec7731102f580d1d4f58b
parent26b100232cbe8aa23a8e22bf1f13f5213ca9c11d (diff)
rtems: Add BSP network stack detectionntp-update
-rw-r--r--rtems/config/rtems-bsp-net.cfg46
1 files changed, 46 insertions, 0 deletions
diff --git a/rtems/config/rtems-bsp-net.cfg b/rtems/config/rtems-bsp-net.cfg
new file mode 100644
index 0000000..dde6d36
--- /dev/null
+++ b/rtems/config/rtems-bsp-net.cfg
@@ -0,0 +1,46 @@
+#
+# RTEMS BSP Network Support
+#
+
+#
+# Check if the BSP libpath has been defined?
+#
+%if !%{defined rtems_bsp_libpath}
+ %error No BSP library path found
+%endif
+
+#
+# BSP library check
+#
+%define rtems_bsp_check_lib %{_sbdir}/sb/rtems-build-dep -c %{rtems_bsp_cc} -L %{rtems_bsp_libpath}
+
+#
+# Check for the various networking libraries?
+#
+%define rtems_bsp_net_libbsd %(%{rtems_bsp_check_lib} -l bsd)
+%define rtems_bsp_net_legacy %(%{rtems_bsp_check_lib} -l networking)
+%define rtems_bsp_net_lwip %(%{rtems_bsp_check_lib} -l lwip)
+
+%if %{rtems_bsp_net_libbsd} == not-found && \
+ %{rtems_bsp_net_legacy} == not-found && \
+ %{rtems_bsp_net_lwip} == not-found
+ %error No networking libraries found
+%endif
+
+%if %{rtems_bsp_net_libbsd} == found
+ %define rtems_bsp_net_libs -lbsd
+%else
+ %if %{rtems_bsp_net_legacy} == found
+ %define rtems_bsp_net_libs -lnetworking
+ %else
+ %if %{rtems_bsp_net_lwip} == found
+ %define rtems_bsp_net_libs -llwip
+ %endif
+ %endif
+%endif
+
+#
+# Update the libraries
+#
+%define rtems_bsp_libs %{rtems_bsp_libs} %{rtems_bsp_net_libs}
+%define host_libs %{rtems_bsp_libs}