How to set gcc 4.3 default specs file?

后端 未结 3 628
长情又很酷
长情又很酷 2021-01-04 00:19

When using gcc version 4.3.2, I see how to generate specs using:

$ /usr/local/gcc-4.3.2/bin/gcc -v
Using built-in specs

Now changing to the

相关标签:
3条回答
  • 2021-01-04 00:44

    You rebuild gcc with your specs file as part of the build!

    A simpler solution is to create an alias:

    alias gcc_Gary gcc -specs /<folder With Specs File>/newSpecsFile
    
    0 讨论(0)
  • 2021-01-04 00:45

    As hinted at by the strace suggestion by Johannes Schaub - litb, it was a problem with where the compiler was looking for the file. As it turns out, the non-working installation had an environment variable set in the .bashrc that was causing the confusion.

    The correct location for the specs file is indeed the same directory that libgcc is in. Just be sure you're looking there.

    0 讨论(0)
  • 2021-01-04 01:02

    I used this command line:

    /usr/bin/set-gcc-default-3.sh i686-pc-mingw32

    but you'll probably want:

    /usr/bin/set-gcc-default-4.sh i686-pc-linux-gnu

    (Note the -4 instead of -3)

    This is built using the "alternatives" stuff, please see

    /usr/sbin/alternatives.exe --help

    And also see pages such as http://linux.about.com/library/cmd/blcmdl8_alternatives.htm

    0 讨论(0)
提交回复
热议问题