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


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: Porting newlib with custom linking


On Sun, Apr 21, 2019 at 10:19 AM Bandhav Veluri
<bandhav.veluri00@gmail.com> 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


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