Stefan Tauner has uploaded this change for review. ( https://review.coreboot.org/21838
Change subject: Fix standalone ich_descriptor_tool compilation with MinGW and DJGPP
......................................................................
Fix standalone ich_descriptor_tool compilation with MinGW and DJGPP
TARGET_OS as well as EXEC_SUFFIX were only set when called via the
main makefile and even then __USE_MINGW_ANSI_STDIO was not set
for MinGW.
While at it, also replace the hardcoded gnu_printf printf format
attribute with __MINGW_PRINTF_FORMAT which is set according to
__USE_MINGW_ANSI_STDIO respectively.
Change-Id: Id146f5ba06a0e510397c6f32a2bd7c819a405a25
Signed-off-by: Stefan Tauner <stefan.tauner(a)gmx.at>
---
M flash.h
M util/ich_descriptors_tool/Makefile
2 files changed, 13 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/38/21838/1
diff --git a/flash.h b/flash.h
index 67c7d20..9c3784b 100644
--- a/flash.h
+++ b/flash.h
@@ -324,7 +324,7 @@
/* Let gcc and clang check for correct printf-style format strings. */
int print(enum flashrom_log_level level, const char *fmt, ...)
#ifdef __MINGW32__
-__attribute__((format(gnu_printf, 2, 3)));
+__attribute__((format(__MINGW_PRINTF_FORMAT, 2, 3)));
#else
__attribute__((format(printf, 2, 3)));
#endif
diff --git a/util/ich_descriptors_tool/Makefile b/util/ich_descriptors_tool/Makefile
index e312996..4d2a377 100644
--- a/util/ich_descriptors_tool/Makefile
+++ b/util/ich_descriptors_tool/Makefile
@@ -21,10 +21,22 @@
# If the user has specified custom CFLAGS, all CFLAGS settings below will be
# completely ignored by gnumake.
CFLAGS ?= -Os -Wall -Wshadow
+
+override TARGET_OS := $(shell $(CC) $(CPPFLAGS) -E $(SHAREDSRCDIR)/os.h | grep -v '^\#' | grep '"' | cut -f 2 -d'"')
+
ifeq ($(TARGET_OS), DOS)
+EXEC_SUFFIX := .exe
# DJGPP has odd uint*_t definitions which cause lots of format string warnings.
CFLAGS += -Wno-format
endif
+
+ifeq ($(TARGET_OS), MinGW)
+EXEC_SUFFIX := .exe
+# Some functions provided by Microsoft do not work as described in C99 specifications. This macro fixes that
+# for MinGW. See http://sourceforge.net/p/mingw-w64/wiki2/printf%20and%20scanf%20family/ */
+FLASHROM_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
+endif
+
ifeq ($(WARNERROR), yes)
CFLAGS += -Werror
endif
--
To view, visit https://review.coreboot.org/21838
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id146f5ba06a0e510397c6f32a2bd7c819a405a25
Gerrit-Change-Number: 21838
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Tauner <stefan.tauner(a)gmx.at>
David Hendricks has posted comments on this change. ( https://review.coreboot.org/21830 )
Change subject: fixup! Convert flashrom to git
......................................................................
Patch Set 1: Code-Review+1
commit message doesn't really matter in this case
--
To view, visit https://review.coreboot.org/21830
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: I0c66f2508cc754cf9219211a06d6f305a32c422d
Gerrit-Change-Number: 21830
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 01 Oct 2017 23:22:26 +0000
Gerrit-HasComments: No
David Hendricks has posted comments on this change. ( https://review.coreboot.org/21829 )
Change subject: fixup! Convert flashrom to git
......................................................................
Patch Set 1: Code-Review+1
commit message doesn't really matter in this case
--
To view, visit https://review.coreboot.org/21829
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: I6689ac24077b3981b471ed69de7cc3ef79d435b1
Gerrit-Change-Number: 21829
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 01 Oct 2017 23:21:38 +0000
Gerrit-HasComments: No
David Hendricks has posted comments on this change. ( https://review.coreboot.org/21827 )
Change subject: fixup! Convert flashrom to git
......................................................................
Patch Set 1: Code-Review+1
Commit message will supposedly be squashed out of existence.
--
To view, visit https://review.coreboot.org/21827
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: Iedc9df4c033a70447b8b1b65c83764c769b02c3f
Gerrit-Change-Number: 21827
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 01 Oct 2017 23:20:13 +0000
Gerrit-HasComments: No
David Hendricks has posted comments on this change. ( https://review.coreboot.org/21837 )
Change subject: fixup! Convert flashrom to git
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
https://review.coreboot.org/#/c/21837/1//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/21837/1//COMMIT_MSG@10
PS1, Line 10: There is no reason for it to be a capital letter, is there?
There was a (now obsolete) -u/--upstream function. I don't see a particular reason to change this, but I also don't have a strong opinion here.
--
To view, visit https://review.coreboot.org/21837
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: I2f84d9db2ec3247f313573c5fcd8b9b758ab9d96
Gerrit-Change-Number: 21837
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 01 Oct 2017 23:14:07 +0000
Gerrit-HasComments: Yes
Stefan Tauner has posted comments on this change. ( https://review.coreboot.org/21780 )
Change subject: dediprog: Reimplement target chip option
......................................................................
Patch Set 1:
The commit message needs improvement. It is unclear why this patch is needed: because the target/chipselect was broken since r1896 aka 557eb4f.
--
To view, visit https://review.coreboot.org/21780
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: stable
Gerrit-MessageType: comment
Gerrit-Change-Id: I94576967e2892e08295daa829caabace5a367fa0
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 01 Oct 2017 22:45:39 +0000
Gerrit-HasComments: No
David Hendricks has posted comments on this change. ( https://review.coreboot.org/21830 )
Change subject: fixup! Convert flashrom to git
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
Mostly looks good, aside from a couple small issues with the commit message.
As I mentioned in a previous patch, I don't like the long comments. But that's an issue we can resolve another time.
https://review.coreboot.org/#/c/21830/1//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/21830/1//COMMIT_MSG@7
PS1, Line 7: fixup! Convert flashrom to git
Not a fixup.
https://review.coreboot.org/#/c/21830/1//COMMIT_MSG@10
PS1, Line 10: expend
expand?
--
To view, visit https://review.coreboot.org/21830
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: I0c66f2508cc754cf9219211a06d6f305a32c422d
Gerrit-Change-Number: 21830
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 01 Oct 2017 22:02:23 +0000
Gerrit-HasComments: Yes