Skip to content

gfortran linker - should probably default to "static" option for non-win32 #13

@ForsteriteFoe

Description

@ForsteriteFoe

The following code in pymake.py (starting at line 373):

    # syslibs
    syslibs = []
    if sys.platform != 'win32':
        syslibs.append('-lc')

Should probably default to:

    syslibs = []
    if sys.platform != 'win32':
        syslibs.append('-static')
        syslibs.append('-lc')

The difference is that without the -static option, the resulting executable does not bundle the "c library", rather it links to where it is installed on the system.

Without the static it means, that in order to run the executable, you have to install the gfortran development files. Which is fine, but adds a step that requires internet access if you are running a live USB version of Linux.

The difference in executable size between the linked (~2.5MB) and static (~5MB) is IMHO not worth it as a default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions