Hosted GCC Cross Compiler: Where is my linker script?
Hosted GCC Cross Compiler: Where is my linker script?
I've followed the Hosted GCC Cross-Compiler tutorial on the wiki. I have a working compiler for my operating system, but I have not told it what linker script to use. How do I configure the compiler so that it uses the linker script I wrote for my operating system?
Re: Hosted GCC Cross Compiler: Where is my linker script?
-Wl or -Xlinker gcc options applied to the -T (--script) linker option
Re: Hosted GCC Cross Compiler: Where is my linker script?
I don't understand what you're trying to say. I can use `-T` to set a linker script when I compile, but I want to be able to use the hosted compiler that I ported for my operating system without having to add switches to the command line.
edit: I realize now that might have been unclear in my original post. I can compile software with "m68k-lambda-gcc -T [...]", I would like to be able to run just "m68k-lambda-gcc", but it's trying to use a default linker script that I didn't write.
Re: Hosted GCC Cross Compiler: Where is my linker script?
Maybe you can create a script that invokes the linker with the desired options and reference it in --with-ld at gcc configure time.
-
- Member
- Posts: 5560
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Hosted GCC Cross Compiler: Where is my linker script?
I think this step is where you'd set up the default linker script for your toolchain.
Re: Hosted GCC Cross Compiler: Where is my linker script?
oh, I see, so instead of giving it a linker script, I give it configuration options and it generates linker scripts to my needs?
-
- Member
- Posts: 5560
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Hosted GCC Cross Compiler: Where is my linker script?
That's correct. It should have options for everything you need, unless you're doing something extremely weird.