HomePhabricator

c++11: detect and correct for boost builds with an incompatible abi
76ac35f36d87Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

c++11: detect and correct for boost builds with an incompatible abi

This is ugly, but temporary. boost::filesystem will likely be dropped soon
after c++11 is enabled. Otherwise, we could simply roll our own copy_file. I've
fixed this at the buildsystem level for now in order to avoid mixing in
functional changes.

Explanation:
If boost (prior to 1.57) was built without c++11, it emulated scoped enums
using c++98 constructs. Unfortunately, this implementation detail leaked into
the abi. This was fixed in 1.57.

When building against that installed version using c++11, the headers pick up
on the native c++11 scoped enum support and enable it, however it will fail to
link. This can be worked around by disabling c++11 scoped enums if linking will
fail.

Add an autoconf test to determine incompatibility. At build-time, if native
enums are being used (a c++11 build), and force-disabling them causes a
successful link, we can be sure that there's an incompatibility and enable the
work-around.

Details

Provenance
Cory Fields <cory-nospam-@coryfields.com>Authored on Jan 5 2016, 20:58
deadalnixPushed on May 14 2017, 22:04
Parents
rABC605c17844ea3: Merge pull request #7205
Branches
Unknown
Tags
Unknown

Event Timeline

Cory Fields <cory-nospam-@coryfields.com> committed rABC76ac35f36d87: c++11: detect and correct for boost builds with an incompatible abi (authored by Cory Fields <cory-nospam-@coryfields.com>).Jan 5 2016, 22:17