Skip to content

Commit

Permalink
remove section version_information for client
Browse files Browse the repository at this point in the history
  • Loading branch information
doegox committed May 20, 2020
1 parent 577380a commit e2a2063
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
1 change: 0 additions & 1 deletion armsrc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion common/default_version.c
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion common_arm/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion tools/mkversion.pl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@
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,
Expand Down
8 changes: 7 additions & 1 deletion tools/mkversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e2a2063

Please sign in to comment.