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 LINKCC (Bug #1189330) #42192

Closed
cludwig mannequin opened this issue Jul 15, 2005 · 2 comments
Closed

Fix LINKCC (Bug #1189330) #42192

cludwig mannequin opened this issue Jul 15, 2005 · 2 comments
Labels
build The build process and cross-build

Comments

@cludwig
Copy link
Mannequin

cludwig mannequin commented Jul 15, 2005

BPO 1239112
Nosy @loewis
Files
  • LINKCC_2-4-2.patch: Patch of configure.in and Misc/NEWS
  • 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 = None
    closed_at = <Date 2005-08-07.21:10:45.000>
    created_at = <Date 2005-07-15.19:26:36.000>
    labels = ['build']
    title = 'Fix LINKCC (Bug python/cpython#41894)'
    updated_at = <Date 2005-08-07.21:10:45.000>
    user = 'https://bugs.python.org/cludwig'

    bugs.python.org fields:

    activity = <Date 2005-08-07.21:10:45.000>
    actor = 'loewis'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Build']
    creation = <Date 2005-07-15.19:26:36.000>
    creator = 'cludwig'
    dependencies = []
    files = ['6731']
    hgrepos = []
    issue_num = 1239112
    keywords = ['patch']
    message_count = 2.0
    messages = ['48581', '48582']
    nosy_count = 2.0
    nosy_names = ['loewis', 'cludwig']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1239112'
    versions = ['Python 2.4']

    @cludwig
    Copy link
    Mannequin Author

    cludwig mannequin commented Jul 15, 2005

    A build of Python 2.4.1 on a i686-pc-linux-gnu system with
    GCC 4.0 failed. configure set `LINKCC=$(PURIFY) $(CC) '
    even though main() was compiled with g++ and you cannot
    lin C++ object files with the C compiler on this platform (Bug
    bpo-1189330).

    There was some discussion on python-dev that on some
    platforms (notably Linux/ELF) the C++ compiler is
    unnecessarily used to build Python which makes the python
    executable depend on this particular compiler version's C++
    runtime library. This patch does *not* address this issue; it
    keeps the criticized behaviour but fixes configure.in such
    that make does not fail anymore on above mentioned
    platform. (I will try to come up in the next weeks with a patch
    for the main trunk that addresses the - on some platforms -
    needless dependency on the C++ runtime.)

    In 2.4.1, configure compiled a single source file with the C++
    compiler and tries to link it with the C compiler. Apparently
    the improved optimizer of GCC 4.0 realized that in this
    simple test program all symbols from the C++ runtime could
    be omitted whence linking with the C compiler succeeded.

    The new test generates two source files that more closely
    resemble the situation with ccpython.cc: main() calls a C
    function in another translation unit. main() is compiled with
    the C++ compiler, the C function with the C compiler. Only if
    the resulting object files can be linked into an executable by
    the C compiler then configure sets 'LINKCC=$(PURIFY)
    $(CC)'.

    I tested the patch with GCC 4.0 and GCC 2.95.2 on
    i686-pc-linux-gnu.

    @cludwig cludwig mannequin closed this as completed Jul 15, 2005
    @cludwig cludwig mannequin added the build The build process and cross-build label Jul 15, 2005
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Aug 7, 2005

    Logged In: YES
    user_id=21627

    Thanks for the patch. Committed as

    configure 1.473
    configure.in 1.486
    NEWS 1.1331
    configure 1.462.2.9
    configure.in 1.475.2.9
    NEWS 1.1193.2.70

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 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
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants