1. 29 Jun, 2015 2 commits
    • Merge pull request #3268 from libgit2/vmg/pkg-config-sort · b977d017
      pkg-config: Sort the different sections
      Vicent Marti committed
    • pkg-config: Sort the different sections · 6a5fb1f4
      Because of the fact that pkg-config is pants-on-head retarded and that
      the Linux linker *requires* a static library to come before all its
      dynamic dependencies in the link path, calling `pkg-config --libs
      --static` was generating the wrong flags for linking.
      
      Before this patch:
      
      	-Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/local/lib -lcurl -lssh2
      	-lrt -lgit2 -lssl -lcrypto -ldl -lz
      
      After this patch:
      
      	-Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/local/lib -lgit2 -lcurl
      	-lssh2 -lrt -lssl -lcrypto -ldl -lz
      
      By setting the "Libs" line before all other rules, we make sure that
      `-lgit2` is the first library in the link path and that it gets its
      symbols resolved with the libraries coming after it.
      
      This fix (ab)uses an implementation detail in `pkg-config` (namely, that
      flags are output as they are found on the file), but this detail seems
      to be stable between releases and always gives a stable output.
      Vicent Marti committed
  2. 28 Jun, 2015 3 commits
  3. 27 Jun, 2015 5 commits
  4. 26 Jun, 2015 19 commits
  5. 25 Jun, 2015 11 commits