remove section version_information for client

This commit is contained in:
Philippe Teuwen 2020-05-20 20:54:37 +02:00
commit e2a20631c7
5 changed files with 22 additions and 5 deletions

View file

@ -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

View file

@ -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 */

View file

@ -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

View file

@ -66,7 +66,13 @@ $fullgitinfo = substr $fullgitinfo, 0, 49;
print <<EOF
#include "common.h"
/* Generated file, do not edit */
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,
1,

View file

@ -49,7 +49,13 @@ fi
cat <<EOF
#include "common.h"
/* Generated file, do not edit */
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,
1,