Tools: workaround for make 3.80 bug
|Reported by:||criezy||Owned by:||sev-|
The tools fail to build with make 3.80 because it triggers a "virtual memory exhausted" error. This is a known bug triggered by $(eval $foo) when $foo is too long.
In that case the bug is triggered by the code on line 240 of Makefile.common: $(foreach prog,$(PROGRAMS),$(eval $(call PROGRAM_template,$(prog))))
It creates the build and clean rules for each executable using the PROGRAM_template template.
The attached patch work around the make 3.80 bug by explicitly defining the rules for several executable instead of using the template. These executables have a lot of object files and this triggers the bug.
I am not sure this patch should be committed as it seems a bad hack that makes the Makefile.common file heavier and less easy to maintain. But in case somebody wants to compile the tools with make 3.80, the patch is at least in the tracker now.
Ticket imported from: #2929000. Ticket imported from: patches/1238.