-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix broken compilation under ARM. tested with my Raspberry PIV and Ra…
…spbian 64bits.
- Loading branch information
Showing
1 changed file
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1ea63cc
There 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.
This really isn't the best fix: other architectures also may not support -fcf-protection
1ea63cc
There 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.
I agree. This is not correct. It would be much better to use
check_c_compiler_flag
(or similar) to test flags. We shouldn't use GCC/Clang version numbers in the CMake code.This was discussed in #1243 and I submitted a PR: #1245 Regrettfully, I am very dyslexic and find it almost impossible to do such a change without introducing new errors. Another concern is that I don't have a test machine for either ARM or PPC.
I would very much appreciate some help to get #1245 sorted out and into the 0.27-maintenance branch. And after that, the changes should be ported and tested on PPC and ARM - and any other new architectures which are being discussed.
@ryandesign @piponazo @tpetazzoni Can you help to get this sorted out please.
1ea63cc
There 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.
I hadn't seen PR #1245, so I have submitted yet another PR doing more of less the same thing.
Please note that you don't need an ARM or PPC machine to reproduce the issue: you can simply use a cross-compiler on your x86/x86-64 machine, and you would get the -fcf-protection build failure. You can find plenty of ready-to-use cross compilers in most Linux distributions, or otherwise at https://toolchains.bootlin.com. It would probably make sense to have a few of these cross-compilers used in your CI to detect such regressions early on.
1ea63cc
There 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.
Thanks @tpetazzoni Can you look at the review of #1243 and see if you've fallen into the traps into which I fell.
I'd like to retire because I'll be 70 in January. I don't want to get sucked into ARM,PPC, cross-compiling and testing cross-compiled code. All unfamiliar territory. I'd like to see this on 0.27-maintenance as well as 'master'. I maintain Exiv2 v0.27 which shipped in December 2018. Since then I've maintained the 0.27-maintenance branch and shipped 3 "dots". The most recent release was 0.27.3 on 2020-06-30.
I am working on writing a book entitled Image Metadata and Exiv2 Architecture. My aim is the write down everything I know about Exiv2 to make it possible to maintain it in future, or even better to write a new metadata library. Here's today's version: https://clanmills.com/exiv2/book/