Re: Porting newlib with custom linking
Jim Wilson <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <CAFyWVabsoLMV0ab=RiJ2Og9zgwXLMFmaai0+tSXakAevCS6vcA@mail.gmail.com> |
On Sun, Apr 21, 2019 at 10:19 AM Bandhav Veluri <[email protected]> wrote: > Thanks a lot Jim! Yes, specs file feels like an elegant way to do it. Is there a way I can edit the default specs file? > We are working on a fork of riscv-newlib and intend that installation of our newlib to be separate. So it's okay to change the default behaviour of gcc. "riscv64-unknown-elf-gcc -dumpspecs > specs" will give you the default specs file. If you modify this and put this in the gcc install dir (same place where libgcc.a is installed), then gcc will use this specs file instead of the built-in default specs. If you run gcc with the -v option, it will tell you whether it is using the built-in specs or reading them from a file. You can use this to confirm that it is using your modified specs file. I think any dir in the libraries: line of "gcc --print-search-dirs" should work, but I normally use the gcc install dir. Jim