Re: [Boost-bugs] [Boost C++ Libraries] #9445: context asm files fail to build for x32 ABIs

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9445: context asm files fail to build for x32 ABIs
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-02-29 08:29:41

#9445: context asm files fail to build for x32 ABIs
  Reporter: Mike Frysinger <vapier@…> | Owner: olli
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: context
   Version: Boost 1.55.0 | Severity: Problem
Resolution: fixed | Keywords:

Comment (by steve@…):

 Replying to [comment:29 olli]:
> Replying to [comment:26 anonymous]:
> > I've tried building boost from the develop branch. Pretty much as I
> >
> > gcc.jam sets -m32 if a 32bit platform is detected. This isn't
 appropriate for x32, since as I mentioned previously -m32 specifies IA32.
 -mx32 is used for x32. Or simply no -m since it's the toolchain default.
 [Why does boost set it anyway? Virtually every other project obeys
 whatever ABI is set by compiler/cflags, and detects the properties based
 upon the compiler output]
> >
> > boost-build adds -march=i686 to the cflags for building on 32bit x86
 platform, this is incompatible with x32 since x32 is an x86-64 variant
 ABI. It fails with "error: CPU you selected does not support x86-64
 instruction set" [As above, why does boost set -march? The only time a
 specific -march is necessary to allow use of flags such as -mavx is when
 that instruction set flag is not allowed for the configured -march, if
 there's no -march, the compiler produces code for the default and or
 generic configured target (x86-64 on amd64/em64t), then all -m instruction
 extension flags are allowed.]
> >
> > I'll see if I can remove the -march/ABI overrides and get it to
> you could try address-model=64 on b2 cmdline
 The problem is, it's neither -m32 or -m64, which address-model selects in
                 if $(model) = 32
                     option = -m32 ;
                 else if $(model) = 64
                     option = -m64 ;

 The correct flag for x32 is -mx32, or the toolchain default on an x32
 system. I still don't really understand why boost-build is setting these
 flags at all, perhaps it's something we'll just have to live with patching
 in our eclass? So for now, that's what I've done, along with removing the
 -march flags, so that our C(XX)FLAGS can provide them. [which is the
 Gentoo way]

 This has allowed me emerge a multilib (x32-abi, ia32, amd64) boost while
 respecting the global CFLAGS.

Ticket URL: <>
Boost C++ Libraries <>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC