Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler options for x64 builds on Windows #59996

Closed
jkloth opened this issue Aug 27, 2012 · 8 comments
Closed

Fix compiler options for x64 builds on Windows #59996

jkloth opened this issue Aug 27, 2012 · 8 comments
Assignees
Labels
build The build process and cross-build OS-windows

Comments

@jkloth
Copy link
Contributor

jkloth commented Aug 27, 2012

BPO 15792
Nosy @loewis, @vstinner, @tiran, @tjguk, @jkloth, @briancurtin
Files
  • pcbuild.diff
  • pcbuild.diff.2
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/tjguk'
    closed_at = <Date 2013-10-28.10:33:32.747>
    created_at = <Date 2012-08-27.14:17:30.771>
    labels = ['build', 'OS-windows']
    title = 'Fix compiler options for x64 builds on Windows'
    updated_at = <Date 2013-10-29.21:10:11.433>
    user = 'https://github.com/jkloth'

    bugs.python.org fields:

    activity = <Date 2013-10-29.21:10:11.433>
    actor = 'python-dev'
    assignee = 'tim.golden'
    closed = True
    closed_date = <Date 2013-10-28.10:33:32.747>
    closer = 'tim.golden'
    components = ['Build', 'Windows']
    creation = <Date 2012-08-27.14:17:30.771>
    creator = 'jkloth'
    dependencies = []
    files = ['27015', '32326']
    hgrepos = []
    issue_num = 15792
    keywords = ['patch']
    message_count = 8.0
    messages = ['169200', '169222', '192608', '192800', '201107', '201488', '201521', '201672']
    nosy_count = 8.0
    nosy_names = ['loewis', 'vstinner', 'christian.heimes', 'tim.golden', 'jkloth', 'brian.curtin', 'jeremy.kloth', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue15792'
    versions = ['Python 3.3', 'Python 3.4']

    @jkloth
    Copy link
    Contributor Author

    jkloth commented Aug 27, 2012

    The attached patch fixes the compiler options used for building the x64 platform.

    • In VC10 the passing /GS- as an additional option has been replaced by the MSBuild BufferSecurityCheck command
    • The /USECL:xxx option is only for the VSExtComp plugin for VS.NET 2003 (VC7.1) used to build a 64-bit Python 2.5

    The attached patch modifies the x64 properties for VS8/9/10.

    @jkloth jkloth added the build The build process and cross-build label Aug 27, 2012
    @jeremykloth
    Copy link
    Mannequin

    jeremykloth mannequin commented Aug 27, 2012

    I did forgot t mention that this change also silences a compiler warning:

    cl : Command line warning D9025: overriding '/GS' with '/GS-'

    The /USECL:xxx option does not provoke a warning is it is being
    evaluated as '/U "SECL:xxx"' (undefine macro)

    @jkloth
    Copy link
    Contributor Author

    jkloth commented Jul 8, 2013

    Adding Victor Stinner as he has been quite active in fixing Windows 64-bit issues.

    @tiran tiran added OS-windows build The build process and cross-build labels Jul 8, 2013
    @jkloth
    Copy link
    Contributor Author

    jkloth commented Jul 10, 2013

    Just to note that, as it stands, these wrongly assigned options account for 28 of the 216 warnings (or 13%) currently emitted. This is just one easy step towards a warning-free 64-bit Windows build.

    It would be nice to get Win64 to be one of the warning-free platforms (see msg63893 of bpo-1616).

    @tjguk
    Copy link
    Member

    tjguk commented Oct 24, 2013

    Retargetted patch against current tip. If no-one objects I'll commit this in the next day or two.

    @tjguk tjguk self-assigned this Oct 24, 2013
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 27, 2013

    New changeset 7c46b1b239fe by Tim Golden in branch 'default':
    bpo-15792 Correct build options on Win64. Patch by Jeremy Kloth.
    http://hg.python.org/cpython/rev/7c46b1b239fe

    @tjguk
    Copy link
    Member

    tjguk commented Oct 28, 2013

    Applied. Thanks for the patch.

    @tjguk tjguk closed this as completed Oct 28, 2013
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 29, 2013

    New changeset c49b8bdcb5cb by Tim Golden in branch '3.3':
    bpo-15792 Correct build options on Win64. Patch by Jeremy Kloth.
    http://hg.python.org/cpython/rev/c49b8bdcb5cb

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    build The build process and cross-build OS-windows
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants