[SLOF] FLAG is not passed correctly to the compiler

Alexey Kardashevskiy aik at ozlabs.ru
Fri Jun 23 15:56:51 AEST 2017


On 23/06/17 07:21, Segher Boessenkool wrote:
> On Thu, Jun 22, 2017 at 05:51:13PM -0300, Murilo Opsfelder Araújo wrote:
>>> What is the actual command that causes the problem?  It isn't clear
>>> to me from your mail.
>>
>> Here are some extracts from a slof build (make qemu V=2):
> 
> Ah, board-qemu/config is written as if it is a shell script; it is
> not, it is a makefile fragment.  Simply remove the quotes there?

Then it fails in a different place:

[vpl2 slof]$ make qemu V=2
******** Building qemu system ********
make[1]: Entering directory '/home/aik/p/slof/board-qemu'
make -C ../tools
make[2]: Entering directory '/home/aik/p/slof/tools'
gcc -W -g -Wall -W -O2 -I. -I../include -I../romfs/tools -c gen_reloc_table.c
gcc -g -Wall -W -O2 -I. -I../include -I../romfs/tools -o gen_reloc_table
gen_reloc_table.o
gcc -W -g -Wall -W -O2 -I. -I../include -I../romfs/tools -c sloffs.c
gcc -W -g -Wall -W -O2 -I. -I../include -I../romfs/tools -c
../romfs/tools/crclib.c -o crclib.o
gcc -g -Wall -W -O2 -I. -I../include -I../romfs/tools -o sloffs sloffs.o
crclib.o
make[2]: Leaving directory '/home/aik/p/slof/tools'
make -C ../romfs/tools BOARD=qemu PLATFORM= FLAG=-DRTAS_NVRAM -DBROKEN_SC1
-DDHCPARCH=0x0C TARG=ppc64
make: invalid option -- 'D'
make: invalid option -- 'D'
make: invalid option -- 'D'
make: invalid option -- 'H'
Usage: make [options] [target] ...
Options:



afaict this fixes the original issue:


diff --git a/lib/Makefile b/lib/Makefile
index a4d4bb2..1e8bb62 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -21,7 +21,7 @@ all:  subdirs
 subdirs: $(SUBDIRS)

 $(SUBDIRS):
-       $(MAKE) -C $@ $(MAKEARG)
+       $(MAKE) -C $@ FLAG=$(FLAG) $(MAKEARG)

 # Rules for making clean:
 clean:


Murilo, please give it a try.

In general, lib/**/Makefile could use some cleanup - they all define
ASFLAGS/CPPFLAGS/LDFLAGS, mostly identical, when it is not identical, it
feels like just by oversight than anything else.


> 
> 
> Segher
> _______________________________________________
> SLOF mailing list
> SLOF at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/slof
> 


-- 
Alexey


More information about the SLOF mailing list