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

            Bug ID: 70783
           Summary: -spec option behavior is different to implicit spec
                    file
           Product: gcc
           Version: 4.8.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andreas.g.jhoss at gmx dot de
  Target Milestone: ---

Created attachment 38339
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38339&action=edit
The failing specs file

I can verify that easily on every Linux system with native compiler
Anyway I am using a gcc backcross compiler (Linux->Windows-Linux) with one
substitute rule.

Is this a lack of documentation or a bug ?

I put a spec file in /usr/lib/gcc/i686-pc-linux-gnu/4.8.5/specs or wherever the
specfile is searched and add a substitute rule (See attached file)

But the substitue rule is only recognized if I do the gcc call with option
-specs=....

Working :

g++ r:\test.cpp -nojhdefaultlibs -o r:\test 
-specs=q:/gnuwinh5/bin/../lib/gcc/i686-pc-linux-gnu/4.8.5/

Reading specs from q:/gnuwinh5/bin/../lib/gcc/i686-pc-linux-gnu/4.8.5/specs
Reading specs from q:/gnuwinh5/bin/../lib/gcc/i686-pc-linux-gnu/4.8.5/specs
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=q:/gnuwinh5/bin/../libexec/gcc/i686-pc-linux-gnu/4.8.5/lto-wrapper.exe
Target: i686-pc-linux-gnu
......

Not Working :
If am using the implicit specs file with same path but option is not
recognized.
Reading specs from q:/gnuwinh5/bin/../lib/gcc/i686-pc-linux-gnu/4.8.5/specs
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=q:/gnuwinh5/bin/../libexec/gcc/i686-pc-linux-gnu/4.8.5/lto-wrapper.exe
g++: error: unrecognized command line option '-nojhdefaultlibs'
Target: i686-pc-linux-gnu
......

It doesn't matter what substitute rule I define and also where I define it
makes no difference

Reply via email to