From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-12-01 09:57:11


Cédric Venet wrote:

> Hi,

Hi Cédric!

>
> Ps: perhaps I should post this on boost.build ?

Yes. I'm replying there, please follow up on boost.build.

> I recently tried to build boost 64bits on an intel EM64T (core 2 duo) with
> msvc. And bjam incorrectly selected the x86_amd64 toolset (cross compiler)
> instead of the amd64 one (native 64bits compiler).
>
> In the file boost/tools/build/v2/tools/msvc.jam at the line 314 the check
> is:
>
> if [ MATCH ^(AMD64) : [ os.environ PROCESSOR_IDENTIFIER ] ]
>
> should it be
>
> if [ MATCH ^(AMD64) : [ os.environ PROCESSOR_ARCHITECTURE ] ]

It was this way before. However Ilya Sokolov told me that
PROCESSOR_ARCHITECTURE is wrong -- it tells you what processor you have,
not what kind of OS you have. And you cannot run 64-bit binaries on
a 32-bit windows.

According to Ilya, PROCESSOR_IDENTIFIER is x86 on win32, whatever the
actual processor might be.

On win64, PROCESSOR_IDENTIFIER is supposed to be always AMD64.

> My os environement are:
>
> PROCESSOR_ARCHITECTURE=AMD64
> PROCESSOR_IDENTIFIER=EM64T Family 6 Model 15 Stepping 6, GenuineIntel

Hmm, this contradicts the statement above.

> if [ MATCH ^(AMD64) : [ os.environ PROCESSOR_IDENTIFIER ]
> || MATCH ^(EM64T) : [ os.environ PROCESSOR_IDENTIFIER ] ]
>
> (not certain about the syntax)

Yeah, this seems about right.

I've checked in the attached patch to SVN HEAD, would you please check if it works
better?

Thanks,
Volodya