https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124213

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsm28 at gcc dot gnu.org,
                   |                            |rearnsha at gcc dot gnu.org

--- Comment #6 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
My initial guess for this is that processing the specs for invoking the
assembler on the first file is corrupting the specs that are then used for the
second (and subsequent compilations).  If I run

gcc -v -c -mfpu=auto -march=armv7-a+simd t1.c t2.c

I see what you describe, but if I run 

gcc -v -S -mfpu=auto -march=armv7-a+simd t1.c t2.c

Then I see -mfpu=auto being passed to both compilations.

So somehow, it looks like processing this spec:

#define ASM_CPU_SPEC                                                    \
  " %{mfpu=auto:%<mfpu=auto %:asm_auto_mfpu(%{march=*: arch %*})}"      \
  " %{mcpu=generic-*:-march=%:rewrite_march(%{mcpu=generic-*:%*});"     \
  "   march=*:-march=%:rewrite_march(%{march=*:%*});"                   \
  "   mcpu=*:-mcpu=%:rewrite_mcpu(%{mcpu=*:%*})"                        \
  " }"

Which is supposed to suppress -mfpu=auto for the assembler, is affecting the
overall spec state seen by cc1.

Joseph, is this a midend bug, or is this just not supported by the spec
processing infrastructure?  If not, how do I achieve this for the assembler?

Reply via email to