# the src_prepare, src_configure, src_compile, and src_install
# phase hooks.
-inherit cmake-utils flag-o-matic multilib prefix eutils
+inherit cmake-utils flag-o-matic multilib prefix eutils toolchain-funcs
#
# HELPER FUNCTIONS:
if mysql_version_is_at_least "10.1.2" ; then
mycmakeargs+=( $(mysql-cmake_use_plugin cracklib CRACKLIB_PASSWORD_CHECK ) )
fi
+
+ # The build forces this to be defined when cross-compiling. We pass it
+ # all the time for simplicity and to make sure it is actually correct.
+ mycmakeargs+=( -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1) )
else
mycmakeargs+=( $(cmake-utils_use_with extraengine FEDERATED_STORAGE_ENGINE) )
fi
-DWITH_DEFAULT_FEATURE_SET=0
-DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
-DENABLE_STATIC_LIBS=$(usex static-libs)
+ # The build forces this to be defined when cross-compiling. We pass it
+ # all the time for simplicity and to make sure it is actually correct.
+ -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
)
if use test ; then
[[ ${host} == *-mint* ]]
}
+# @FUNCTION: tc-stack-grows-down
+# @DESCRIPTION:
+# Return shell true if the stack grows down. This is the default behavior
+# for the vast majority of systems out there and usually projects shouldn't
+# care about such internal details.
+tc-stack-grows-down() {
+ # List the few that grow up.
+ case ${ARCH} in
+ hppa|metag) return 1 ;;
+ esac
+
+ # Assume all others grow down.
+ return 0
+}
+
# @FUNCTION: tc-export_build_env
# @USAGE: [compiler variables]
# @DESCRIPTION: