Reputation: 1519
I want to change the behavior of the ARM toolchain arm-linux-gnueabi-gcc
in my Linux machine, that the compiled code will be in Thumb
mode as default - same as passing the -mthumb
flag.
I came across this document, which under the section of --with-mode
describes exactly what I try to achieve. However, I couldn't understand from their explanation how can I actually set this option.
Can anyone clarify this for me, or suggest another way to achieve my goal?
Upvotes: 0
Views: 782
Reputation: 140970
You can "mask" the executable file /usr/bin/arm-linux-gnueabi-gcc
with your own script that is named the same inside /usr/local/bin
.
#!/bin/sh
/usr/bin/arm-linux-gnueabi-gcc -mthumb "$@"
Because PATH should list /usr/local/bin
directory before /usr/bin
, when you type arm-linux-gnueabi-gcc
without the path in your console, your script will chosen first and will execute the real arm-linux-gnueabi-gcc
executable with the additional option.
Upvotes: 1