# switch to 32-bit target (was linux-elf before, which I think is wrong also for i686)
eval "$(
  declare -f build | \
    sed '
      s@linux-x86_64@linux-generic32@
      s@ enable-ec_nistp_64_gcc_128 @ @
    '
)"

# i486-specific, disable hand-crafted assembly code
if [ "${CARCH}" = "i486" ]; then
  eval "$(
    declare -f build | \
      sed '
        s@no-ssl3-method@no-ssl3-method 386@
      '
  )"
fi

# i686-specific, disable hand-crafted assembly code
if [ "${CARCH}" = "i686" ]; then
  eval "$(
    declare -f build | \
      sed '
        s@no-ssl3-method@no-ssl3-method no-sse2@
      '
  )"
fi