git » libfiu » commit 527317f

preload/posix: Make function_list generation reproducible

author Alberto Bertogli
2018-04-04 08:25:56 UTC
committer Alberto Bertogli
2018-04-04 08:25:56 UTC
parent 5850be76db75547090b193e207c1131a528a550d

preload/posix: Make function_list generation reproducible

The make rules for function_list generation have races, which may cause
the generator to be run twice, adding some duplication to the final
function list.

This was detected by Debian's reproducible builds automation, see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894776.

This patch fixes the rule by adding the correct dependency (the .c and
.fl files get generated at the same time), which makes the parallel
build reproducible again.

preload/posix/Makefile +2 -4

diff --git a/preload/posix/Makefile b/preload/posix/Makefile
index d63ef5d..0b07f90 100644
--- a/preload/posix/Makefile
+++ b/preload/posix/Makefile
@@ -101,10 +101,8 @@ fiu_posix_preload.so: build-flags build-env.h build-needlibdl $(OBJS)
 		-o fiu_posix_preload.so
 
 
-# this should only be needed when building the function list and not the
-# preload library
-%.mod.fl: %.mod
-	$(NICE_GEN) $< $<.c $@
+# A module's function list gets generated with the .c file.
+%.mod.fl: %.mod.c ;
 
 function_list: $(GEN_FL) function_list.in
 	@echo "  function_list"