Re: Build on Ubuntu 22.04

Jeffrey Walton <[email protected]> Mon, 25 Sep 2023 08:08:16 -0700 (PDT)
Newsgroups gmane.comp.encryption.cryptopp
Message-ID <[email protected]>

On Monday, September 25, 2023 at 10:13:03 AM UTC-4 Krissscool72 wrote:

until now I was using cryptopp 8.2.0 on Ubuntu 18.04 and builting it with 
CXXFLAGS="-DNDEBUG -O3 -mfunction-return=thunk -mindirect-branch=thunk" 
make static

I tried to build it on Ubuntu 22.04:
- Linux version 5.15.0-82-generic
- gcc 11.4.0

and encountered the followinf error:
/usr/include/c++/11/cstddef:126:48: error: '-mindirect-branch' and 
'fcf-protection' are not compatible

*Do you have any idea where it comes from ?*

I tried to compile with the following options instead:
CXXFLAGS="-DNDEBUG -O3 -fcf-protection=none -mfunction-return=thunk 
-mindirect-branch=thunk" make static 
OR
CXXFLAGS="-DNDEBUG -O3 -mfunction-return=thunk-extern 
-mindirect-branch=thunk-extern" make static 
which succeedeed.

*Do you have any recommandation on the best thing to do ?*


And I think these are the GCC bugs:

* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87412
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654

Jeff

-- 
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/fef2d7f1-3347-4cda-a521-6b4b8b95d832n%40googlegroups.com.