Skip to content

Keep the argument of -Xassembler / -Xpreprocessor etc. in place #22

Open

Description

@weidendo

The gcc option "-Xassembler option" is expected to pass "option" to the assembler. The spack gcc wrapper handles this wrong when "option" is "-Ixxx", because it resorts all "-I" options. It should not touch the order of whatever comes after "-Xassembler". Same is probably true if an "-I" option comes after "-Xpreprocessor" or "-Xlinker".

Steps to reproduce the issue

Building the test suite for Valgrind ("spack install --test root Valgrind"), at some point gcc is called with "gcc ... -Xassembler -I. -MT million.o -o million.o million.S". This is screwed up by the gcc wrapper to "gcc ... -Xassembler -MT million.o -o million.o million.S", failing with "million.o: file not found".

Error Message

In any spack build, a gcc command involving "-Xassembler -I. option" may fail because "option" will not be parsed by gcc itself but passed to the assembler instead.

Information on your system

Linux

Activity

  1. added
    bug
    on Feb 1, 2019
  2. added
    bug
    on Oct 9, 2026
  3. transferred this issue fromspack/spackon Oct 9, 2026
  4. changed the title [-]spack gcc wrapper should not reorder arguments with "-Xassembler -Ixxx"[/-] [+]Keep the argument of `-Xassembler` / `-Xpreprocessor` etc. in place[/+] on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions