cmake: merge_static_libs - correct duplicate assumptions (#1583)

This corrects build failures on ppc64{,le} with the
WITH_EMBEDDED_SERVER option enabled.

MDEV-22641 added an unusual case in which the same object
file in was included twice with a different function
defination. The original cmake/merge_archives_unix.cmake
did not tolerate such eventualities.

So we move to the highest voted answer on Stack Overflow
for the merging of static libraries.
https://stackoverflow.com/questions/3821916/how-to-merge-two-ar-static-libraries-into-one

Thin archives generated compile failures and the libtool
mechanism would of been another dependency and using .la
files that isn't part of a normal cmake output. The straight
Apple mechanism of libtool with static archives also failed
on Linux.

This leaves the MRI script mechansim which was implemented
in this change.
This commit is contained in:
Daniel Black 2020-06-10 18:41:59 +10:00 committed by GitHub
commit 6e4e097bc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 47 deletions

2
.gitignore vendored
View file

@ -8,6 +8,8 @@
.*.swp
*.ninja
.ninja_*
*.mri
*.mri.tpl
.gdb_history
.vs/
errmsg.sys