Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 20 Mar 2015 05:13:20 +0300
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: [GSoC] building JtR for MIC

On Fri, Mar 20, 2015 at 12:29:16AM +0100, magnum wrote:
> On 2015-03-18 11:38, Solar Designer wrote:
> > I notice that in jumbo my original mic.h is modified to use autoconf'ed
> > ARCH_* settings:
> > 
> > #if AC_BUILT
> > #include "autoconfig.h"
> > #else
> > #define ARCH_WORD                       long
> > #define ARCH_SIZE                       8
> > #define ARCH_BITS                       64
> > #define ARCH_BITS_LOG                   6
> > #define ARCH_BITS_STR                   "64"
> > #define ARCH_LITTLE_ENDIAN              1
> > #define ARCH_INT_GT_32                  0
> > #endif
> > 
> > This might be wrong since we're cross-compiling.  I doubt it's causing
> > trouble now, though, since the host system is almost certainly x86_64,
> > for which these settings just happen to be the same.
> 
> If configure does not realize we are cross-compiling, we are doing
> something wrong. If it does, it will likely end up with the correct
> figures for the target, not the build host.

Makes sense, but why take chances when we know that the above are the
correct settings for the target?

> configure will know you are cross-compiling if you supply a host triplet
> using eg. --host=i686-apple-darwin (which is what to use if building
> 32-bit from a 64-bit OSX) that differs from the build host (which should
> almost always end up right without an option - but there is one). I'm
> not quite sure what to supply for the MIC on Super but Lei suggests we
> use "--host=mic-linux" and I would think this would end up right.
> 
> I believe configure will also understand we are cross-compiling under a
> few other circumstances but you should verify this. The first few lines
> of output tells the tale:
> 
> *checking build system type... x86_64-apple-darwin14.1.0*
> *checking host system type... i686-apple-darwin*
> checking whether to compile using MPI... no
> checking for i686-apple-darwin-gcc... gcc -m32 -mno-avx
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> *checking whether we are cross compiling... no*
> 
> Hmm, the above is weird. Maybe building 32-bit from 64-bit is merely
> borderlining a cross compile.
> 
> Anyway, if things seem to end up wrong, the least you should do (and
> what I did when I got the above output) is `--disable-native-tests`.
> This is very close to saying "we ARE cross-compiling". No native checks
> will be made on the build host for getting info about the targeted system.

Thank you for describing this.

Given my lack of time, I'd appreciate it if you work with Lei on this,
including doing your own test builds for MIC on super.  That way, you'll
more likely spot any incorrect autoconf usage and such.

Thanks again,

Alexander

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ