]> git.ipfire.org Git - thirdparty/ldns.git/commit
Homogenize paths for source files during compilation 188/head
authorSebastien Duthil <duthils@duthils.net>
Fri, 7 Oct 2022 15:47:30 +0000 (11:47 -0400)
committerSebastien Duthil <duthils@duthils.net>
Fri, 12 Jul 2024 22:27:29 +0000 (18:27 -0400)
commit9314f1099e7debb505a7aa2d8b19f3fe9afac343
tree02700e98c27e13dcd9b6c1ac32799ca5f13354e7
parent9a08ad4bca2e8add044c0f320560b40109fb74af
Homogenize paths for source files during compilation

Why:

* Compiling a .o file alone will compile with "-c file.c"
* Compiling a .lo file alone will create the corresponding .o files with "-c ./file.c"
* Building with "make -j1" will only execute the .lo rules; the .o rules will
  be skipped since the .o files are already created from the .lo rules with
  option "-c ./file.c"
* Building with "make -j2" will execute the .lo rules and the .o rules in
  parallel with option "-c file.c"
* assert() captures the path of the source file (taken from the -c option) in
  the compiled binary in order to display the source of the assertion error
* Hence the compiled binaries are not reproducible depending on the number of
  make parallel jobs

Example:

* when compiling examples/ldns-dane with "make -j1", the binary contains the
  string "./examples/ldns-dane.c"
* when compiling examples/ldns-dane with "make -j2", the binary contains the
  string "examples/ldns-dane.c"
Makefile.in