From: John Crispin Date: Mon, 6 Oct 2014 04:53:14 +0000 (+0000) Subject: Fix build when TAR_OPTIONS env variable is set X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c22bebf6abb7af2e8ccdb65b3b367768c5f051da;p=openwrt%2Fstaging%2Fdedeckeh.git Fix build when TAR_OPTIONS env variable is set The build system sets a make variable TAR_OPTIONS to the unpacking command, i.e. "-xf -". Now if an environment variable with the same name is set, the make variable is automatically exported to the environment. The make variable is added to the tar command in the makefile, and tar adds the environment variable. This results in a command like "tar -c /some/dir -xf - -xf -" which of course doesn't work. It is also difficult to spot as the second "-xf -" is not visible on the command line. I suggest this is fixed by unexporting TAR_OPTIONS as I see no use of the evironment variable, and it is changed from the original value anyway. Signed-off-by: Jan Kardell SVN-Revision: 42794 --- diff --git a/include/toplevel.mk b/include/toplevel.mk index dcde7e2596..8a21f7eef4 100644 --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -43,6 +43,8 @@ unexport LPATH # make sure that a predefined CFLAGS variable does not disturb packages export CFLAGS= +unexport TAR_OPTIONS + ifneq ($(shell $(HOSTCC) 2>&1 | grep clang),) export HOSTCC_REAL?=$(HOSTCC) export HOSTCC_WRAPPER:=$(TOPDIR)/scripts/clang-gcc-wrapper