From c606048e57ccccf0eeaf5bdcb3d560118bf3dda4 Mon Sep 17 00:00:00 2001 From: Brendan Chandler Date: Thu, 4 Mar 2021 14:06:55 -0600 Subject: [PATCH] rtems_config: Change config options based on BSP name This replaces an implementation that used a header guard being defined to indicate BSP specific options. Hopefully this method is more explicit when config options should be set for specific BSPs. --- modules/libcom/RTEMS/Makefile | 2 ++ modules/libcom/RTEMS/posix/rtems_config.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/libcom/RTEMS/Makefile b/modules/libcom/RTEMS/Makefile index a670133ed..c939563fc 100644 --- a/modules/libcom/RTEMS/Makefile +++ b/modules/libcom/RTEMS/Makefile @@ -37,6 +37,8 @@ ifeq ($(RTEMS_TARGET_CPU),i386) rtemsCom_SRCS += ne2kpci.c endif +rtems_config_CPPFLAGS += -DBSP_$(RTEMS_BSP) + LIBRARY_RTEMS = rtemsCom # shared library ABI version. diff --git a/modules/libcom/RTEMS/posix/rtems_config.c b/modules/libcom/RTEMS/posix/rtems_config.c index c984b20be..4319013a1 100644 --- a/modules/libcom/RTEMS/posix/rtems_config.c +++ b/modules/libcom/RTEMS/posix/rtems_config.c @@ -153,9 +153,9 @@ extern void *POSIX_Init(void *argument); #define CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER #endif -#if defined(LIBBSP_I386_PC386_BSP_H) +#if defined(BSP_pc386) || defined(BSP_pc686) #define RTEMS_BSD_CONFIG_DOMAIN_PAGE_MBUFS_SIZE (64 * 1024 * 1024) -#elif defined(LIBBSP_POWERPC_QORIQ_BSP_H) +#elif defined(BSP_qoriq_e500) #define RTEMS_BSD_CONFIG_DOMAIN_PAGE_MBUFS_SIZE (32 * 1024 * 1024) #endif