Skip to content

Unset SPACK_* before exec? #9

@haampie

Description

@haampie

The compiler wrapper basically translates *envp into *argv for the compiler.

In certain cases we hit "Argument list too long", which happens when env variables and command line arguments exceed a certain size (they go consecutively on the stack).

That suggests that we should clear SPACK_* variables after translation to command line arguments, so that if you can execute the wrapper, you can almost certainly execute the compiler.

Also, it could fix an issue where we're doubly wrapping: first gcc where pass -Wl,* and -L and then ld where pass those flags once more.

What remains to be checked is whether this works with GCC's LTO. GCC generates a makefile that invokes GCC again. I've never inspected that intermediate Makefile; presumably it doesn't hit the compiler wrapper again, and already contains all flags from the parent gcc invocation.

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