Opened 8 years ago

Closed 8 years ago

#10757 closed Bugs (invalid)

Building boost with MSVC and SAFESEH

Reported by: Tobias Loew Owned by: olli
Milestone: To Be Determined Component: context
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

Hi,

when building boost on MSVC with SAFESEH (which is implicit on x64-builds) I get linking problems, since the MASM-compiler does not have the "safeseh" option on its command line. There is also a thread on boost/dev about this issue

http://boost.2283326.n4.nabble.com/context-msvc-SAFESEH-td4652245.html

I could solve it by adding safeseh in the two files mentioned here:

in boost_1_56_0\libs\context\build\Jamfile.v2:

actions masm {

ml /safeseh /c /Fo"$(<)" "$(>)"

}

in boost_1_56_0\tools\build\src\tools\msvc.jam:

local default-assembler-i386 = "ml -coff -safeseh" ;

Could someone please add a boost-build-option to control the safeseh-setting.

Thanks

Tobias

Change History (4)

comment:1 by viboes, 8 years ago

Component: Building Boostcontext
Owner: set to olli

comment:2 by olli, 8 years ago

SAFESEH is irrelevant on x64 (Windows) systems because exception handlers are table-based (stored in PDATA) -> it is not implicit on x64 systems.

Last edited 8 years ago by olli (previous) (diff)

comment:3 by Tobias Loew, 8 years ago

Please forget about the text in the parenthesis. The trouble occurs on MSVC 32-bit compilations when SAFESEH is enabled. I can confirm that linking only succeeds when I add "safeseh" to the ml options.

Tobias

comment:4 by olli, 8 years ago

Resolution: invalid
Status: newclosed

You are using MSVC which itself uses MASM to compile assembler files. If you require additional compiler flags than you have to apply those flags at b2/bjam command line (maybe cxxflags). If this does not work because /SAFESEH is not passed to MASM by MSVC than this is an issue of boost.build (and requires an feature request for boost.build).

Last edited 8 years ago by olli (previous) (diff)
Note: See TracTickets for help on using tickets.