From fed71f0ce32149daadf70e222cc90a226690693f Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Thu, 14 Nov 2013 11:36:36 +0100 Subject: [PATCH] rtc_test: do platform specific compilation The source has machine specific code, so it needs the machine passed in the compiler command line. https://jira.digi.com/browse/DEL-863 Signed-off-by: Javier Viguera --- meta-digi-dey/recipes-digi/dey-examples/dey-examples-rtc.bb | 4 +++- .../recipes-digi/dey-examples/files/rtc_test/rtc_test.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-rtc.bb b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-rtc.bb index 8c28aef22..b21144ca9 100644 --- a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-rtc.bb +++ b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-rtc.bb @@ -9,10 +9,12 @@ PR = "${DISTRO}.r0" SRC_URI = "file://rtc_test" +UPPER_PLAT = "${@'${MACHINE}'.upper()}" + S = "${WORKDIR}/rtc_test" do_compile() { - ${CC} -O2 -Wall rtc_test.c -o rtc_test + ${CC} -O2 -Wall -D${UPPER_PLAT} rtc_test.c -o rtc_test } do_install() { diff --git a/meta-digi-dey/recipes-digi/dey-examples/files/rtc_test/rtc_test.c b/meta-digi-dey/recipes-digi/dey-examples/files/rtc_test/rtc_test.c index 1c6fdb3a6..eaa2eaffe 100644 --- a/meta-digi-dey/recipes-digi/dey-examples/files/rtc_test/rtc_test.c +++ b/meta-digi-dey/recipes-digi/dey-examples/files/rtc_test/rtc_test.c @@ -37,7 +37,7 @@ #define RTC_DEFAULT_TEST_OPS 0 /* None, pass it through the command line */ -#if defined (DEL_CCWMX53JS) || defined (DEL_CCMX53JS) +#if defined(CCIMX53JS) #define RTC_ALARM_SECS 60 #define RTC_ALARM_SECS_STR "60" #else