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 Fri, Dec 17, 2010 at 12:15 AM, Bryan Hundven <bryanhundven@gmail.com> wrote:
> 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
>

The specs default in gcc are usually located in:

gcc-<version>/gcc/...

and unset and redefined in gcc-<version>/gcc/config/...
depending on the needs of each architecture and sub architecture.

From the crosstool-ng perspective, if you wanted to modify the specs
as they are defined, it makes more sense to make a patch and put it in
your local patches by enabling CONFIG_PATCH_BUNDLED_LOCAL and setting
the path to you patches with CONFIG_LOCAL_PATCH_DIR and mirror the
directory structure in crosstool-ng/patches

So gcc patches would go in:
your_local_patch_directory/gcc/<version>/100-your-specs-hack.patch

-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]