| 1 | As part of the effort to support Reproducible Builds Alexis |
| 2 | Bienvenüe submitted two patches in [https://bugs.debian.org/824808 Debian Bug #824808] to sort the |
| 3 | object files in the static library: sort-files-1 & sort-files-2 |
| 4 | |
| 5 | These patches resolve the random_order_in_static_libraries issue which is illustrated by the diffoscope output. |
| 6 | |
| 7 | The attached patch is modified version of the sort-files-2 patch doing do wildcard sorting in the `$(LIBGDAL)` target instead of a separate `$(LIBGDAL).buildit` target. Alexis chose that approach because: |
| 8 | |
| 9 | > In some situations some of the target dependencies do not exist |
| 10 | > before the "make target" call. When this arises, as $(wildcard) is |
| 11 | > expanded before building the dependencies, it can miss some files… |
| 12 | > I was not sure of the situation here, so I added a transitional |
| 13 | > target to be safe. |
| 14 | |
| 15 | I prefer the single line change in the attached patch, but you may want to consider the separate target as done in the sort-files-2 patch too. |