Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use correct libdir for multiarch Debian (#651)
* Use correct libdir for multiarch Debian Debian multiarch is a little bit complicated, one particularly important thing is the installation directory for libraries. For multiarch-enabled packages it should include the "target triple". However, for Debian this is not your usual target triple, but *normalized* target triple [1]. [1]: https://wiki.debian.org/Multiarch/Tuples This is not really noticeable on x86_64 but on 32-bit x86 systems compilers tend to report {i386,i486,i586,i686}-linux-gnu when the "correct" one is only i386-linux-gnu. We should use the correct, normalized triplet since that's what dynamic loader uses. If the library is installed into an incorrect multiarch subdirectory then it will fail to load. Instead of asking the compiler, ask dpkg for the multiarch-correct triplet for the system on which we are building the package. We always build packages targeting the host system so this is correct approach. * Avoid Debian/Ubuntu duplication Optimize distro detection a bit to avoid duplicating code for Debian and Ubuntu which are currently the same. Co-authored-by: Dmytro Shapovalov <[email protected]>
- Loading branch information