Skip to content

Commit

Permalink
enforce compilation of freetype with 32 bit on i686 systems
Browse files Browse the repository at this point in the history
In case of cross compilation on x86-64 systems for i686 targets, Freetype is not compiled for 32 bit.
See also: https://github.com/AdoptOpenJDK/TSC/issues/71#issuecomment-475451019
  • Loading branch information
pinhead84 committed Mar 22, 2019
1 parent 82c5ad4 commit 4aff8db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sbin/prepareWorkspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,14 @@ checkingAndDownloadingFreeType()
pngArg="--with-png=no";
fi

local freetypeCC="";
if [[ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "i686" ]] || [[ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "i386" ]] ; then
freetypeCC="gcc -m32";
fi

# We get the files we need at $WORKING_DIR/installedfreetype
# shellcheck disable=SC2046
if ! (bash ./configure --prefix="${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}"/installedfreetype "${pngArg}" "${BUILD_CONFIG[FREETYPE_FONT_BUILD_TYPE_PARAM]}" && ${BUILD_CONFIG[MAKE_COMMAND_NAME]} all && ${BUILD_CONFIG[MAKE_COMMAND_NAME]} install); then
if ! (CC="${freetypeCC}" bash ./configure --prefix="${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}"/installedfreetype "${pngArg}" "${BUILD_CONFIG[FREETYPE_FONT_BUILD_TYPE_PARAM]}" && ${BUILD_CONFIG[MAKE_COMMAND_NAME]} all && ${BUILD_CONFIG[MAKE_COMMAND_NAME]} install); then
# shellcheck disable=SC2154
echo "Failed to configure and build libfreetype, exiting"
exit;
Expand Down

0 comments on commit 4aff8db

Please sign in to comment.