[coreboot] New patch to review for coreboot: 505e9a5 nvramtool: Allow build under Cygwin

Raymond Danks (ray.danks@se-eng.com) gerrit at coreboot.org
Fri Apr 27 16:59:13 CEST 2012

Raymond Danks (ray.danks at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/940


commit 505e9a5a945b811c0cda86d49b43947a0c14947c
Author: Raymond Danks <ray.danks at se-eng.com>
Date:   Fri Apr 27 08:46:55 2012 -0600

    nvramtool: Allow build under Cygwin
    To build under Cygwin, nvramtool depends upon the package ioperm:
    for sys/io.h and sys/perm.h.  This change causes the nvramtool make to correctly include and link against these headers and libraries.
    Change-Id: If6cd9d324de7bc19830e0018844f42761b28ddd3
    Signed-off-by: Raymond Danks <ray.danks at se-eng.com>
 util/nvramtool/Makefile     |    4 ++++
 util/nvramtool/Makefile.inc |    9 +++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/util/nvramtool/Makefile b/util/nvramtool/Makefile
index 2a143b7..063bb1a 100644
--- a/util/nvramtool/Makefile
+++ b/util/nvramtool/Makefile
@@ -42,6 +42,10 @@ endif
 ifeq ($(OS_ARCH), NetBSD)
 LDFLAGS = -l$(shell uname -p)
+ifeq ($(shell uname -o), Cygwin)
+LDFLAGS = -lioperm
 all: dep $(PROGRAM)
diff --git a/util/nvramtool/Makefile.inc b/util/nvramtool/Makefile.inc
index a70896c..b356720 100644
--- a/util/nvramtool/Makefile.inc
+++ b/util/nvramtool/Makefile.inc
@@ -25,7 +25,12 @@ ifeq ($(OS_ARCH), Darwin)
 NVRAMTOOLFLAGS += -framework DirectHW
 ifeq ($(OS_ARCH), NetBSD)
-NVRAMTOOLFLAGS += -l$(shell uname -p)
+NVRAMTOOLLDLFLAGS = -l$(shell uname -p)
+ifeq ($(shell uname -o), Cygwin)
+NVRAMTOOLFLAGS += -O2 -g -Wall -W -D__GLIBC__
 nvramtoolobj :=
@@ -43,6 +48,6 @@ $(objutil)/nvramtool/%.o: $(top)/util/nvramtool/%.c
 $(objutil)/nvramtool/nvramtool: $(objutil)/nvramtool $(objutil)/nvramtool/accessors $(objutil)/nvramtool/cli $(addprefix $(objutil)/nvramtool/,$(nvramtoolobj))
 	printf "    HOSTCC     $(subst $(objutil)/,,$(@)) (link)\n"
-	$(HOSTCC) $(NVRAMTOOLFLAGS) -o $@ $(addprefix $(objutil)/nvramtool/,$(nvramtoolobj))
+	$(HOSTCC) $(NVRAMTOOLFLAGS) -o $@ $(addprefix $(objutil)/nvramtool/,$(nvramtoolobj)) $(NVRAMTOOLLDFLAGS)

More information about the coreboot mailing list