only define GIT_VERSION where it's used

-when the git revision is passed to every file as a define it causes
unnecessary ccache cache misses
This commit is contained in:
Daniel Agar
2015-04-18 01:25:54 -04:00
parent b53a33bc51
commit 207b57869d
8 changed files with 9 additions and 18 deletions
+1
View File
@@ -48,3 +48,4 @@ MAXOPTIMIZATION = -Os
EXTRACFLAGS = -Wframe-larger-than=1400
EXTRADEFINES = -DGIT_VERSION='"$(GIT_DESC)"'
+1 -1
View File
@@ -764,7 +764,7 @@ int write_version(int fd)
};
/* fill version message and write it */
strncpy(log_msg_VER.body.fw_git, FW_GIT, sizeof(log_msg_VER.body.fw_git));
strncpy(log_msg_VER.body.fw_git, GIT_VERSION, sizeof(log_msg_VER.body.fw_git));
strncpy(log_msg_VER.body.arch, HW_ARCH, sizeof(log_msg_VER.body.arch));
return write(fd, &log_msg_VER, sizeof(log_msg_VER));
}