where is built-in specs located?

Bryan Hundven bryanhundven@gmail.com
Fri Dec 17 08:15:00 GMT 2010


On Thu, Dec 16, 2010 at 11:55 PM, Sathishkumar Duraisamy
<flowerslab@gmail.com> wrote:
> Hi,
>
> I have build tool chain using crosstool-ng 1.90.  I don't know much
> about internals of tool chain. Can you please clear my doubts:
>
> 1. Where is built-in specs located?
> 2. Can we change it? Does it create any problems?

I will tell you how to cut off your fingers, but don't get mad at me
when it hurts or if you bleed to death!

In other words, this is not recommended, but I will tell you how.

When you run:

echo "int main() {}" | <path_to_your>-gcc -v -xc -

You should see at the top of the output:

-----------------8<-------------8<--------------
Using built-in specs.
-----------------8<-------------8<--------------

<path_to_your>-gcc -dumpspecs > specsfile

vim specsfile

read: http://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html
and use google to find out more...

sudo cp specsfile $(dirname $(<path_to_your>-gcc -print-libgcc-file-name))/specs

Now when you run:

echo "int main() {}" | <path_to_your>-gcc -v -xc -

You should see something like:

-----------------8<-------------8<--------------
Reading specs from
<path_to_your_toolchain>/lib/gcc/i686-nptl-linux-gnu/4.5.1/specs
-----------------8<-------------8<--------------

> --
> Regards,
> Sathishkumar

Again,

Modifying the specs for the toolchain may not be the right thing to
do. So if things break horribly... I warned you!

-Bryan

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list