Nico Huber has submitted this change. ( https://review.coreboot.org/c/flashrom/+/58468 )
Change subject: Makefile, ich_descriptors_tool/Makefile: unify behavior
......................................................................
Makefile, ich_descriptors_tool/Makefile: unify behavior
ich_descriptors_tool/Makefile: have the same behavior as the main
flashrom Makefile
- only set gcc explicit on MinGW HOST_OS
- don't fallback to gcc if CC was not set
- set CFLAGS and EXEC_SUFFIX for TARGET_OS, not for HOST_OS
Change-Id: I353c3de250167994a4aea1edfef57d839e900d78
Signed-off-by: Thomas Heijligen <thomas.heijligen(a)secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58468
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
---
M Makefile
M util/ich_descriptors_tool/Makefile
2 files changed, 8 insertions(+), 9 deletions(-)
Approvals:
build bot (Jenkins): Verified
Nico Huber: Looks good to me, approved
diff --git a/Makefile b/Makefile
index e8bf8fc..b03ab7c 100644
--- a/Makefile
+++ b/Makefile
@@ -854,7 +854,7 @@
all: hwlibs features $(PROGRAM)$(EXEC_SUFFIX) $(PROGRAM).8
ifeq ($(ARCH), x86)
- @+$(MAKE) -C util/ich_descriptors_tool/ TARGET_OS=$(TARGET_OS) EXEC_SUFFIX=$(EXEC_SUFFIX)
+ @+$(MAKE) -C util/ich_descriptors_tool/ HOST_OS=$(HOST_OS) TARGET_OS=$(TARGET_OS)
endif
$(PROGRAM)$(EXEC_SUFFIX): $(OBJS)
diff --git a/util/ich_descriptors_tool/Makefile b/util/ich_descriptors_tool/Makefile
index 168220c..7f5814f 100644
--- a/util/ich_descriptors_tool/Makefile
+++ b/util/ich_descriptors_tool/Makefile
@@ -18,24 +18,19 @@
SRC = $(wildcard *.c)
-CC ?= gcc
-
# If the user has specified custom CFLAGS, all CFLAGS settings below will be
# completely ignored by gnumake.
CFLAGS ?= -Os -Wall -Wshadow
+# Auto determine HOST_OS and TARGET_OS if they are not set as argument
HOST_OS ?= $(shell uname)
+TARGET_OS := $(call c_macro_test, ../../Makefile.d/os_test.h)
+
ifeq ($(findstring MINGW, $(HOST_OS)), MINGW)
# Explicitly set CC = gcc on MinGW, otherwise: "cc: command not found".
CC = gcc
-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
-override TARGET_OS := $(call c_macro_test, ../../Makefile.d/os_test.h)
-
ifeq ($(TARGET_OS), DOS)
EXEC_SUFFIX := .exe
# DJGPP has odd uint*_t definitions which cause lots of format string warnings.
@@ -43,6 +38,9 @@
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/
CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
endif
@@ -73,6 +71,7 @@
$(PROGRAM)$(EXEC_SUFFIX): $(OBJ) $(SHAREDOBJ)
$(CC) $(LDFLAGS) -o $(PROGRAM)$(EXEC_SUFFIX) $(OBJ) $(SHAREDOBJ)
+# We don't use EXEC_SUFFIX here because we want to clean everything.
clean:
rm -f $(PROGRAM) $(PROGRAM).exe
rm -rf $(DEPPATH) $(OBJATH)
--
To view, visit https://review.coreboot.org/c/flashrom/+/58468
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I353c3de250167994a4aea1edfef57d839e900d78
Gerrit-Change-Number: 58468
Gerrit-PatchSet: 7
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged
Attention is currently required from: Nico Huber, Thomas Heijligen, Angel Pons.
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58618 )
Change subject: Makefile: move utsname and clock_tettime test to the top
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/58618/comment/0e6e6853_75b20fab
PS1, Line 9: Cleanup
Clean up
--
To view, visit https://review.coreboot.org/c/flashrom/+/58618
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie1f43b3d5a8ad79bff3f9bbc21f359ec35abc42a
Gerrit-Change-Number: 58618
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Tue, 26 Oct 2021 11:40:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Thomas Heijligen, Angel Pons.
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58616 )
Change subject: Makefile: move c compiler check to the top
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/58616/comment/b46ea4cc_2d7aa315
PS2, Line 9: Cleanup
Verb is spelled with a space: Clean up.
--
To view, visit https://review.coreboot.org/c/flashrom/+/58616
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I3d6f08ef030744c772b4ec0dc2c9e614fb90461d
Gerrit-Change-Number: 58616
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Tue, 26 Oct 2021 11:40:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons, Nikolai Artemiev.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58474 )
Change subject: [RFC] writeprotect, cli_classic: create writeprotect foundation
......................................................................
Patch Set 5:
(1 comment)
File writeprotect.c:
PS3:
> I don't understand what the point of `struct wp` is. […]
The only reason I was thinking to temporarily keep struct wp, is to keep cli_classic compiling. So that _wp_ functions can be added one at a time, with implementation. At the end of the patch series there would be no struct wp, one way or the other.
I thought this can be another approach on how to add one function at a time.
--
To view, visit https://review.coreboot.org/c/flashrom/+/58474
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I67e9b31f86465e5a8f7d3def637198671ee818a8
Gerrit-Change-Number: 58474
Gerrit-PatchSet: 5
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Tue, 26 Oct 2021 11:25:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Comment-In-Reply-To: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Angel Pons.
Hello Nico Huber, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/58616
to look at the new patch set (#2).
Change subject: Makefile: move c compiler check to the top
......................................................................
Makefile: move c compiler check to the top
Cleanup the compiler target by outsourcing the test to an own variable.
This is in preparation for further changes.
Change-Id: I3d6f08ef030744c772b4ec0dc2c9e614fb90461d
Signed-off-by: Thomas Heijligen <thomas.heijligen(a)secunet.com>
---
M Makefile
A Makefile.d/cc_test.c
M Makefile.include
3 files changed, 14 insertions(+), 15 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/16/58616/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/58616
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I3d6f08ef030744c772b4ec0dc2c9e614fb90461d
Gerrit-Change-Number: 58616
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset