This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: where is built-in specs located?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]