You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Keep the argument of -Xassembler / -Xpreprocessor etc. in place #22
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.
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
Activity
[-]spack gcc wrapper should not reorder arguments with "-Xassembler -Ixxx"[/-][+]Keep the argument of `-Xassembler` / `-Xpreprocessor` etc. in place[/+]