bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make-4.0 allows empty ARFLAGS to be passed to ar


From: Paul Smith
Subject: Re: make-4.0 allows empty ARFLAGS to be passed to ar
Date: Mon, 21 Oct 2013 11:27:56 -0400

On Mon, 2013-10-21 at 16:02 +0100, Ken Moffat wrote:
> 
> # command line
> ARFLAGS = 

So this tells us that the empty value is being set from the command
line.

>  I then ran it in the directory where the build fails (dtc/) -
> 
> # makefile (from 'Makefile', line 51)
> ARFLAGS = rc

This is not interesting; don't bother trying to run make from within
this subdirectory.  It's the top-level directory makefile that's causing
the problem.  The error is happening there, not in the subdirectory.

> subdir-dtc:dtc/libfdt dtc/tests
>         $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) 
> CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" 
> ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) 
> libfdt/libfdt.a,)

This is why the value of ARFLAGS is marked as coming from the command
line; this rule re-runs make with ARFLAGS="$(ARFLAGS)" and somehow this
is empty.  Unfortunately due to this recursion it's masking the initial
location where ARFLAGS was set to empty in the makefile.

If you look for ARFLAGS in the top-level makefile, is it being set to
the empty value?  That seems the most likely cause of the problem to me.
If that's the case then we'll need to look at the Makefile.in file and
the configure script and the config.log file to figure out why it's
being set to the empty value.

Also, you can run "make V=1" to turn on verbose mode and see the actual
commands that make is running; that can be helpful in some cases.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]