Skip to content

Commit

Permalink
capstone.pc.in: use CMAKE_INSTALL_LIBDIR for libdir (capstone-engine#…
Browse files Browse the repository at this point in the history
…1659)

On x86_64-linux gentoo system capstone was installing
it's files to 'lib64' libdir, but was referring 'lib' libdir:

```
$ cat /usr/lib64/pkgconfig/capstone.pc
...
libdir=${prefix}/lib
...
```

On radare2 built it means injecting -L/usr/lib into a 64-build
and pulling in 32-bit libraries. 'ld.lld' is not able to resolve
the ambiguity.

It happens because @LIBSUFFIX@ is not present in cmake-3.17.3.

Let's fix the paths by using @CMAKE_INSTALL_LIBDIR@.
This variable is already used in capstone's build system,
thus should be safe to rely on.

Reported-by: Agostino Sarubbo
Bug: https://bugs.gentoo.org/730722
Signed-off-by: Sergei Trofimovich <[email protected]>
  • Loading branch information
Sergei Trofimovich authored Jul 19, 2020
1 parent 0dc0089 commit e5bb118
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion capstone.pc.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${prefix}/lib@LIBSUFFIX@
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/include/capstone

Name: capstone
Expand Down

0 comments on commit e5bb118

Please sign in to comment.