setenv-*.sh changes

6 views
Skip to first unread message

Jeffrey Walton

unread,
Mar 9, 2021, 9:57:08 AM3/9/21
to Crypto++ Users
Currently our setenv-*.sh files, like setenv-ios.sh, do not set CPPFLAGS, CXXFLAGS and LDFLAGS. Instead they set prefixed flags like IOS_CPPFLAGS, IOS_CXXFLAGS and IOS_LDFLAGS. GNUmakefile-cross then uses the prefixed flags to build the library.

UB encountered a bad interaction where artifacts from the host environment cross-pollinated into the cross-compile environment. It resulted in a failed compile.

The fix is to actually set the variables in the setenv-*.sh scripts, and modify GNUmakefile-cross to use those variables. It will avoid host environment cross-pollination by setting all variables to a known state.

We made that change at https://github.com/weidai11/cryptopp/issues/1014. As a side effect, you can use the setenv-*.sh for any project, and not just Crypto++. For example, it will work with Autotools projects.

Jeff

Reply all
Reply to author
Forward
0 new messages