[GH-ISSUE #585] Autoconf: Better support for cross compile #258

Closed
opened 2026-10-14 02:58:56 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @magnumripper on GitHub (May 12, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/585

Originally assigned to: @magnumripper on GitHub.

All the SSE/AVX/XOP tests as well as the -march=native test should be disabled with the option
--disable-native-tests. This is a must for cross compiles.

A packager could do something like
./configure --disable-native-tests --with-arch="-m32 -msse2"
to produce a 32-bit build (that requires SSE2 but nothing more) on a 64-bit build host.

Originally created by @magnumripper on GitHub (May 12, 2014). Original GitHub issue: https://github.com/openwall/john/issues/585 Originally assigned to: @magnumripper on GitHub. All the SSE/AVX/XOP tests as well as the -march=native test should be disabled with the option `--disable-native-tests`. This is a must for cross compiles. A packager could do something like `./configure --disable-native-tests --with-arch="-m32 -msse2"` to produce a 32-bit build (that requires SSE2 but nothing more) on a 64-bit build host.
bsakaguchi 2026-10-14 02:58:56 +07:00
Author
Owner

@magnumripper commented on GitHub (May 12, 2014):

Other things to consider:

Things that should work fine with cross compile:

  • AC_CHECK_LIB
  • AC_SEARCH_LIBS
  • AC_CHECK_SIZEOF
  • AC_C_BIGENDIAN
  • The current CUDA test should be fine
  • The OpenCL test looks like it could work

Things that does NOT support cross compile:

  • PKG_CHECK_MODULES. I added an option --disable-nss today for that reason but we'd also disable it when --disable-native-tests are given.
  • The ARCH_ALLOWS_UNALIGNED test does not work with cross compile. It does work for building -m32 or -mx32 on a 64-bit build host, but not for more 'remote' cross compiles.
<!-- gh-comment-id:42888184 --> @magnumripper commented on GitHub (May 12, 2014): Other things to consider: Things that should work fine with cross compile: - AC_CHECK_LIB - AC_SEARCH_LIBS - AC_CHECK_SIZEOF - AC_C_BIGENDIAN - The current CUDA test should be fine - The OpenCL test looks like it could work Things that does NOT support cross compile: - [x] PKG_CHECK_MODULES. I added an option --disable-nss today for that reason but we'd also disable it when --disable-native-tests are given. - [ ] The ARCH_ALLOWS_UNALIGNED test does not work with cross compile. It does work for building -m32 or -mx32 on a 64-bit build host, but not for more 'remote' cross compiles.
Author
Owner

@magnumripper commented on GitHub (May 12, 2014):

From what I can tell, the archive macro AC_CHECK_ALIGNED_ACCESS_REQUIRED would not with cross compile any better than our current.

<!-- gh-comment-id:42889269 --> @magnumripper commented on GitHub (May 12, 2014): From what I can tell, the archive macro AC_CHECK_ALIGNED_ACCESS_REQUIRED would not with cross compile any better than our current.
Author
Owner

@magnumripper commented on GitHub (May 12, 2014):

Only ARCH_ALLOWS_UNALIGNED unhandled now (of the things I have recognized). I'm now starting work with mapping target triplet with arch.h...

<!-- gh-comment-id:42892526 --> @magnumripper commented on GitHub (May 12, 2014): Only ARCH_ALLOWS_UNALIGNED unhandled now (of the things I have recognized). I'm now starting work with mapping target triplet with arch.h...
Author
Owner

@magnumripper commented on GitHub (May 13, 2014):

f8e135c0 is a huge leap forward but nowhere near complete.

<!-- gh-comment-id:42904116 --> @magnumripper commented on GitHub (May 13, 2014): f8e135c0 is a huge leap forward but nowhere near complete.
Author
Owner

@magnumripper commented on GitHub (May 13, 2014):

93972e9a and a few more, major work done.

<!-- gh-comment-id:42995172 --> @magnumripper commented on GitHub (May 13, 2014): 93972e9a and a few more, major work done.
Author
Owner

@magnumripper commented on GitHub (May 18, 2014):

As far as I'm aware we can close this for now.

<!-- gh-comment-id:43448297 --> @magnumripper commented on GitHub (May 18, 2014): As far as I'm aware we can close this for now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#258
No description provided.