Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Explicitly force building in C++98 mode
GCC 6 defaults to C++14 (or more precisely, gnu++14) instead of C++98 (or gnu++98). The fdk-aac source doesn't support being built in this mode at the moment, since it relies on narrowing conversion from unsigned 32 bit integers to FIXP_DBL (which is a signed data type of the same size). The same approach is used upstream in Android as well, since d52f374. This fixes buliding with GCC 6.
- Loading branch information
15b128dThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try changing this to
-std=c++11(or remove this and build with GCC 6) - you'll get errors like these:The fix in itself should be pretty straightforward I think, just add casts or rewrite the constants from unsigned form to a proper negative value instead.
I'm not too keen on merging fixes for this right now though.
Fraunhofer are aware of the issue and have told me they'll try to fix it at some point (but it's unsure in which code drop it appears). I'm trying to keep the diff to upstream as small as possible, to ease adoption of new versions from upstream, so unless there's some big drawback to just building it in C++98 mode as right now that I'm unaware of (the C++ness of the lib should only be an internal detail AFAIK), I'd just keep doing what we do now and hope for an update from upstream at some point.