Boost C++ Libraries: Ticket #9445: context asm files fail to build for x32 ABIs https://svn.boost.org/trac10/ticket/9445 <p> building boost on x32 systems does: </p> <pre class="wiki">Performing configuration checks - 32-bit : yes - arm : no - mips1 : no - power : no - sparc : no - x86 : yes ... Component configuration: - atomic : building - chrono : building - context : not building ... </pre><p> but it still tries to build the context code anyways and fails: </p> <pre class="wiki">"x86_64-pc-linux-gnux32-g++" -x assembler-with-cpp -finline-functions \ -Wno-inline -Wall -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_DYN_LINK=1 \ -DBOOST_CONTEXT_SOURCE -DNDEBUG -I"." -c -o \ "bin.v2/libs/context/build/gcc-4.8/gentoorelease/pch-off/threading-multi/asm/jump_i386_sysv_elf_gas.o" \ "libs/context/src/asm/jump_i386_sysv_elf_gas.S" libs/context/src/asm/jump_i386_sysv_elf_gas.S: Assembler messages: libs/context/src/asm/jump_i386_sysv_elf_gas.S:71: Error: operand type mismatch for `jmp' </pre><p> this is because it's trying to build the i386 code instead of the x86_64 code </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9445 Trac 1.4.3 olli Sat, 30 Nov 2013 21:43:47 GMT <link>https://svn.boost.org/trac10/ticket/9445#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:1</guid> <description> <p> You try to compile 32bit version of boost.context on a 64bit Linux as you see in the output: Performing configuration checks </p> <ul><li>32-bit : yes </li><li>x86 : yes </li></ul><p> The compiler your system chooses is "x86_64-pc-linux-gnux32-g++". And it seams that it tries to use 64bit GNUas instead of the 32bit GNUas which results in errors because jump_i386_sysv_elf_gas.S was chosen. You should check your environment if you expect to get 64bit code compiled but bjam selects 32bit. If you look at the test results at <a href="http://www.boost.org/development/tests/release/developer/context.html">http://www.boost.org/development/tests/release/developer/context.html</a> the tests pass. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sat, 30 Nov 2013 22:19:43 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:2</guid> <description> <p> olli: x32 is an experimental architecture, separate from x86 and x86-64. See "X32_ABI" article in Wikipedia. </p> <p> (Trying to include URL results in "Submission rejected as potential spam (External links in post found)".) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Sat, 30 Nov 2013 23:01:09 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:3</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:2" title="Comment 2">anonymous</a>: </p> <blockquote class="citation"> <p> olli: x32 is an experimental architecture, separate from x86 and x86-64. See "X32_ABI" article in Wikipedia. </p> </blockquote> <p> OK, if its is not i386 (32bit SYSV ABI) then it is not supported (yet). </p> </description> <category>Ticket</category> </item> <item> <author>Mike Frysinger <vapier@…></author> <pubDate>Sun, 01 Dec 2013 05:29:17 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:4</guid> <description> <p> ok, but there doesn't seem to be a way to do a build w/out it. even though my summary said "context: not building", it still tried to build it. </p> <p> as a quick hack, i changed the i386 file to include the x86_64 one when <span class="underline">x86_64</span> is defined. it compiled. but i don't know if it works as i don't have a test case handy ... </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Sun, 01 Dec 2013 08:22:20 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9445#comment:5 https://svn.boost.org/trac10/ticket/9445#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> to disable building boost.context you have to apply --without-context --without-coroutine to bjam command line (because boost.coroutine depends on boost.context) </p> Ticket Mike Frysinger <vapier@…> Sun, 01 Dec 2013 20:32:29 GMT <link>https://svn.boost.org/trac10/ticket/9445#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:6</guid> <description> <p> why was this closed as invalid ? other x32 bugs posted were (eventually) addressed. i've also posted a way forward here. if you don't want to fix the x32 bug, then wait for someone else to do so. </p> <p> independently, the build system sounds broken if its display doesn't match reality. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Sun, 01 Dec 2013 21:37:16 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:7</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:6" title="Comment 6">Mike Frysinger &lt;vapier@…&gt;</a>: </p> <blockquote class="citation"> <p> why was this closed as invalid ? other x32 bugs posted were (eventually) addressed. i've also posted a way forward here. if you don't want to fix the x32 bug, then wait for someone else to do so. </p> </blockquote> <p> because as you said, x32 is experimental and including x86_64 mnemonics into a i386 dedicated file is a dirty hack. a vaild fix would be providing assembler code for jump_fcontext/make_fcontext for x32/ABI. </p> <blockquote class="citation"> <p> independently, the build system sounds broken if its display doesn't match reality. </p> </blockquote> <p> then add an bug for the build system, please </p> </description> <category>Ticket</category> </item> <item> <author>Mike Frysinger <vapier@…></author> <pubDate>Mon, 02 Dec 2013 08:13:47 GMT</pubDate> <title>status changed; resolution deleted https://svn.boost.org/trac10/ticket/9445#comment:8 https://svn.boost.org/trac10/ticket/9445#comment:8 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">invalid</span> </li> </ul> <p> i never said x32 was experimental. it was released more than a year ago and is in shipping versions of packages (gcc/glibc/binutils/boost/etc...). closing bugs as invalid does not help anything. </p> <p> i managed to get the test to run and even the existing x86_64 asm does not work. looking at bit more, it seems it's due to the asm encoding the sizes/offsets of the fields. it's not hard to fix. </p> Ticket Mike Frysinger <vapier@…> Mon, 02 Dec 2013 08:14:41 GMT attachment set https://svn.boost.org/trac10/ticket/9445 https://svn.boost.org/trac10/ticket/9445 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-x32-context.patch</span> </li> </ul> <p> x32 support for context module </p> Ticket Mike Frysinger <vapier@…> Mon, 02 Dec 2013 08:24:57 GMT <link>https://svn.boost.org/trac10/ticket/9445#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:9</guid> <description> <p> there might be a cleaner way to handle the x86_64/x32 differences (mov vs movq), but this one passes the testcase included in the context subdir </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Mon, 02 Dec 2013 08:50:49 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:10</guid> <description> <p> x32 has no priority - I'm dealign with ARM on iOS and Windows I can't provide implementations for each valid combination of architecture + ABI + OS + compiler-suite out there. So if x32 is important for you, you could provide an implementation? I've definitely not the time. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Mon, 02 Dec 2013 08:55:08 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:11</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:8" title="Comment 8">Mike Frysinger &lt;vapier@…&gt;</a>: </p> <blockquote class="citation"> <p> i never said x32 was experimental. </p> </blockquote> <p> see comment 2: </p> <p> -&gt; olli: x32 is an experimental architecture, separate from x86 and x86-64. </p> </description> <category>Ticket</category> </item> <item> <author>Mike Frysinger <vapier@…></author> <pubDate>Mon, 02 Dec 2013 09:18:21 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:12 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:12</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:10" title="Comment 10">olli</a>: </p> <blockquote class="citation"> <p> So if x32 is important for you, you could provide an implementation? </p> </blockquote> <p> i did -- see the attachment </p> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:11" title="Comment 11">olli</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:8" title="Comment 8">Mike Frysinger &lt;vapier@…&gt;</a>: </p> <blockquote class="citation"> <p> i never said x32 was experimental. </p> </blockquote> <p> see comment 2: </p> <p> -&gt; olli: x32 is an experimental architecture, separate from x86 and x86-64. </p> </blockquote> <p> and see the author. that isn't me. i'm not responsible for random things other people say. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Mon, 02 Dec 2013 09:50:28 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:13 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:13</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:12" title="Comment 12">Mike Frysinger &lt;vapier@…&gt;</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:10" title="Comment 10">olli</a>: </p> <blockquote class="citation"> <p> So if x32 is important for you, you could provide an implementation? </p> </blockquote> <p> i did -- see the attachment </p> </blockquote> <p> it is not an acceptable patch because you patch a file which is intended for x86_64/SYSV ABI (as the name indicates jump_x86_64_sysv_elf_gas.S) </p> <ul><li>required is an implementation for jump_fcontext/make_fcontext specialized for architecture + ABI + binary-format + assembler-tool </li><li>entry in build/Jamfile.v2 for selecting the correct implementation </li></ul> </description> <category>Ticket</category> </item> <item> <author>Mike Frysinger <vapier@…></author> <pubDate>Mon, 02 Dec 2013 20:08:22 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:14 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:14</guid> <description> <p> i've posted working assembly code for x32. what you speak of now is purely build issues. i've never written Jamfiles before, nor do i understand how boost puts things together when it comes to api/abi selection. seems like it makes more sense to have someone (e.g. you) who is an expert in the build system to do the build pieces. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Sun, 08 Dec 2013 12:12:45 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9445#comment:15 https://svn.boost.org/trac10/ticket/9445#comment:15 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> I believe your patch is not correct - after reading the x32 ABI it is clear that it uses the same calling conventions like SYSV/x86_64 (only pointers are 32bit instead of 64bit). </p> <p> branch develop, commit f183534baa2d38cdca80787dffd112796a5bdd2f contains support for x32 </p> Ticket olli Mon, 09 Dec 2013 18:21:25 GMT <link>https://svn.boost.org/trac10/ticket/9445#comment:16 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:16</guid> <description> <p> fix requires to apply abi=x32 at bjam commandline because boost.build has no idea about the ABI used on the platform and x32 is not the default ABI on x86_64/POSIX </p> </description> <category>Ticket</category> </item> <item> <author>steve@…</author> <pubDate>Fri, 26 Feb 2016 13:09:35 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:17 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:17</guid> <description> <p> I'm working on Gentoo x32, as Mike was previously. We've been applying his hack for x32 support with boost for the last couple of years, it doesn't work any more, and that brought me here. I see in comment 15 correct support landed in the develop branch, but I've checked out the current git repository and it doesn't seem to exist at all! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Fri, 26 Feb 2016 16:09:16 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:18 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:18</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:17" title="Comment 17">steve@…</a>: </p> <blockquote class="citation"> <p> I'm working on Gentoo x32, as Mike was previously. We've been applying his hack for x32 support with boost for the last couple of years, it doesn't work any more, and that brought me here. I see in comment 15 correct support landed in the develop branch, but I've checked out the current git repository and it doesn't seem to exist at all! </p> </blockquote> <p> The API has been changed - you could try the experimental support for X32 on branch develop (you need to specify b2-property abi=x32 at b2 cmdline) </p> </description> <category>Ticket</category> </item> <item> <author>steve@…</author> <pubDate>Fri, 26 Feb 2016 18:13:55 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:19 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:19</guid> <description> <p> I've pull the git source as I mentioned but couldn't find the commit where it landed, and greping the source didn't reveal anything related to x32. </p> <p> I've only tried building 1.58 so far, with abi=x32. That obviously didn't work. So I've been trying to reimplement the same behaviour with abi=x32. </p> <p> I'll try the develop branch before I do any more work on this, but since I can find no reference to x32 I'd be surprised if it makes a difference! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Fri, 26 Feb 2016 19:36:27 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:20 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:20</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:19" title="Comment 19">steve@…</a>: </p> <blockquote class="citation"> <p> I've pull the git source as I mentioned but couldn't find the commit where it landed, and greping the source didn't reveal anything related to x32. </p> <p> I've only tried building 1.58 so far, with abi=x32. That obviously didn't work. So I've been trying to reimplement the same behaviour with abi=x32. </p> <p> I'll try the develop branch before I do any more work on this, but since I can find no reference to x32 I'd be surprised if it makes a difference! </p> </blockquote> <p> search for commit-id 9f2584ea81d9f2d663fa7704fcaa87f06783662d in branch develop </p> </description> <category>Ticket</category> </item> <item> <author>steve@…</author> <pubDate>Fri, 26 Feb 2016 20:05:07 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:21 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:21</guid> <description> <p> git show origin/develop 9f2584ea81d9f2d663fa7704fcaa87f06783662d fatal: bad object 9f2584ea81d9f2d663fa7704fcaa87f06783662d </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Fri, 26 Feb 2016 21:16:50 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:22 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:22</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:21" title="Comment 21">steve@…</a>: </p> <blockquote class="citation"> <p> git show origin/develop 9f2584ea81d9f2d663fa7704fcaa87f06783662d fatal: bad object 9f2584ea81d9f2d663fa7704fcaa87f06783662d </p> </blockquote> <p> <a class="ext-link" href="https://github.com/boostorg/context/commit/9f2584ea81d9f2d663fa7704fcaa87f06783662d"><span class="icon">​</span>https://github.com/boostorg/context/commit/9f2584ea81d9f2d663fa7704fcaa87f06783662d</a> works seams your local repo is broken </p> </description> <category>Ticket</category> </item> <item> <author>steve@…</author> <pubDate>Fri, 26 Feb 2016 22:02:46 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:23 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:23</guid> <description> <p> Ah, I wasn't looking at the context submodule! I was in the main boost repository. Sorry for my confusion. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Sat, 27 Feb 2016 08:12:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:24 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:24</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:23" title="Comment 23">steve@…</a>: </p> <blockquote class="citation"> <p> Ah, I wasn't looking at the context submodule! I was in the main boost repository. Sorry for my confusion. </p> </blockquote> <p> no problem, but could you tell me if it is working (keep in mind that the API of fcontext has been changed) </p> </description> <category>Ticket</category> </item> <item> <author>steve@…</author> <pubDate>Sat, 27 Feb 2016 12:08:05 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:25 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:25</guid> <description> <p> Before I get started, and unless this has changed in the develop branch, I wonder if there's some way to turn off the automatic -march and -m[32|64] selection? I have been trying to understand how this all works, but it doesn't make sense to me why the build system should override the default or user specified settings. </p> <p> This is similar to the LTO issue (I need to provide more data for), but of course much more critical since -m32 results in building for the IA32 ISA instead of x32! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sat, 27 Feb 2016 20:52:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:26 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:26</guid> <description> <p> I've tried building boost from the develop branch. Pretty much as I expected: </p> <p> 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] </p> <p> 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.] </p> <p> I'll see if I can remove the -march/ABI overrides and get it to build... </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sun, 28 Feb 2016 11:39:17 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:27 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:27</guid> <description> <p> With my changes, I'm now able to build boost-1.58 again, I back-ported the x32 patch and it seems to have built fine. I have tried the develop branch from git, but I'm hitting a probably unrelated problem: </p> <p> ./boost/python/slice.hpp:122:36: error: ‘distance’ is not a member of ‘boost::detail’ </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Sun, 28 Feb 2016 12:05:24 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:28 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:28</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:27" title="Comment 27">anonymous</a>: </p> <blockquote class="citation"> <p> With my changes, I'm now able to build boost-1.58 again, I back-ported the x32 patch and it seems to have built fine. I have tried the develop branch from git, but I'm hitting a probably unrelated problem: </p> <p> ./boost/python/slice.hpp:122:36: error: ‘distance’ is not a member of ‘boost::detail’ </p> </blockquote> <p> no idea - seams unrelated to boost.context </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Sun, 28 Feb 2016 12:05:53 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:29 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:29</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:26" title="Comment 26">anonymous</a>: </p> <blockquote class="citation"> <p> I've tried building boost from the develop branch. Pretty much as I expected: </p> <p> 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] </p> <p> 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.] </p> <p> I'll see if I can remove the -march/ABI overrides and get it to build... </p> </blockquote> <p> you could try address-model=64 on b2 cmdline </p> </description> <category>Ticket</category> </item> <item> <author>steve@…</author> <pubDate>Mon, 29 Feb 2016 08:29:41 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:30 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:30</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:29" title="Comment 29">olli</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9445#comment:26" title="Comment 26">anonymous</a>: </p> <blockquote class="citation"> <p> I've tried building boost from the develop branch. Pretty much as I expected: </p> <p> 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] </p> <p> 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.] </p> <p> I'll see if I can remove the -march/ABI overrides and get it to build... </p> </blockquote> <p> you could try address-model=64 on b2 cmdline </p> </blockquote> <p> The problem is, it's neither -m32 or -m64, which address-model selects in gcc.jam: </p> <blockquote> <p> if $(model) = 32 { </p> <blockquote> <p> option = -m32 ; </p> </blockquote> <p> } else if $(model) = 64 { </p> <blockquote> <p> option = -m64 ; </p> </blockquote> <p> } </p> </blockquote> <p> 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] </p> <p> This has allowed me emerge a multilib (x32-abi, ia32, amd64) boost while respecting the global CFLAGS. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 29 May 2018 06:48:50 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9445#comment:31 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9445#comment:31</guid> <description> <p> Is there a way to hidden the assembler file in the exported symbols of libboost_context.so? </p> <p> In my env, readelf --wide --symbols /my-build/boost/1.67.0-<a class="missing changeset" title="No changeset 0 in the repository">r0/boost_1_67_0/x86_64-poky-linux/boost/bin</a>.v2/libs/context/build/aca09349fdb84d131321425f6c3a38ed/libboost_context.so.1.67.0 </p> <p> 42: 0000000000000000 0 FILE LOCAL DEFAULT ABS /my-build/boost/1.67.0-<a class="missing changeset" title="No changeset 0 in the repository">r0/boost_1_67_0/x86_64-poky-linux/boost/bin</a>.v2/libs/context/build/aca09349fdb84d131321425f6c3a38ed/asm/make_x86_64_sysv_elf_gas.o </p> <p> I don't want the make_x86_64_sysv_elf_gas.o line exist in the output of "readelf --wide --symbols /my-build/boost/1.67.0-<a class="missing changeset" title="No changeset 0 in the repository">r0/boost_1_67_0/x86_64-poky-linux/boost/bin</a>.v2/libs/context/build/aca09349fdb84d131321425f6c3a38ed/libboost_context.so.1.67.0" </p> </description> <category>Ticket</category> </item> </channel> </rss>