diff --git a/armsrc/Makefile b/armsrc/Makefile index bc0fbc74b..60b23c9f7 100644 --- a/armsrc/Makefile +++ b/armsrc/Makefile @@ -20,7 +20,6 @@ endif #in the next section to remove that particular feature from compilation. # NO space,TABs after the "\" sign. APP_CFLAGS = $(PLATFORM_DEFS) \ - -DON_DEVICE \ -fno-strict-aliasing -ffunction-sections -fdata-sections SRC_LF = lfops.c lfsampling.c pcf7931.c lfdemod.c lfadc.c diff --git a/common/default_version.c b/common/default_version.c index e04c88d2a..0f42590e8 100644 --- a/common/default_version.c +++ b/common/default_version.c @@ -1,6 +1,12 @@ #include "common.h" /* This is the default version.c file that Makefile.common falls back to if neither sh nor perl are available */ -const struct version_information __attribute__((section(".version_information"))) version_information = { +#ifndef ON_DEVICE +#define SECTVERSINFO +#else +#define SECTVERSINFO __attribute__((section(".version_information"))) +#endif + +const struct version_information SECTVERSINFO version_information = { VERSION_INFORMATION_MAGIC, 1, /* version 1 */ 0, /* version information not present */ diff --git a/common_arm/Makefile.common b/common_arm/Makefile.common index 8b5836e73..e2c3ae3bc 100644 --- a/common_arm/Makefile.common +++ b/common_arm/Makefile.common @@ -90,7 +90,7 @@ ifeq ($(NOERROR),1) endif CFLAGS ?= $(DEFCFLAGS) -CFLAGS += $(ARMCFLAGS) -c $(INCLUDE) -std=c99 $(APP_CFLAGS) +CFLAGS += $(ARMCFLAGS) -c $(INCLUDE) -std=c99 -DON_DEVICE $(APP_CFLAGS) LDFLAGS += -nostartfiles -nodefaultlibs -Wl,-gc-sections -Wl,--build-id=none -n LIBS = -lgcc diff --git a/tools/mkversion.pl b/tools/mkversion.pl index eecacbd72..0d8b9de29 100644 --- a/tools/mkversion.pl +++ b/tools/mkversion.pl @@ -66,7 +66,13 @@ $fullgitinfo = substr $fullgitinfo, 0, 49; print <