diff -Naur dtc-1.3.0.orig/Makefile dtc-1.3.0/Makefile
--- dtc-1.3.0.orig/Makefile	2012-07-16 11:35:38.000000000 -0400
+++ dtc-1.3.0/Makefile	2012-07-16 11:36:45.000000000 -0400
@@ -15,9 +15,19 @@
 LOCAL_VERSION =
 CONFIG_LOCALVERSION =
 
+# inspired by similarly named macro in the linux kernel
+cc-option = $(shell set -e; \
+	TMP="tmp.$$$$"; \
+	if $(CC) $(1) -c -xc /dev/null -o $$TMP >/dev/null 2>&1; \
+		then echo $(1); \
+		else echo $(2); \
+	fi; rm -f $$TMP $${TMP}.o; \
+	)
+
 CPPFLAGS = -I libfdt
 WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
 	-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls
+WARNINGS += $(call cc-option,-Wno-unused-but-set-variable)
 CFLAGS = -g -Os -fPIC -Werror $(WARNINGS)
 
 BISON = bison
