Hi
I am using Linaro gcc on Ubuntu/ARM. I am having a problem in building a package that does not support thumb nor thumb2. When I typed "gcc -v" I saw that "–with-mode=thumb" and I assume that means my gcc compiler will try to optimize some code in thumb. So I assume I need to make my Linaro compiler knows that no thumb! Please correct me if I were wrong.
What flag I have to pass in making? I mean what to type in after CCFLAGS= in make or what to be added in Makefile. Thanks!
On Thursday, 12 May 2011, AKS aungkyas@gmail.com wrote:
What flag I have to pass in making? I mean what to type in after CCFLAGS= in make or what to be added in Makefile. Thanks!
Try using -marm.
Ramana
linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Hi Ramana
I thought I have tried
./configure xxxxx CFLAGS="-marm" after sending the email below.
But I will try again and let you know. Thanks.
On 5/12/11, Ramana Radhakrishnan ramana.radhakrishnan@linaro.org wrote:
On Thursday, 12 May 2011, AKS aungkyas@gmail.com wrote:
What flag I have to pass in making? I mean what to type in after CCFLAGS= in make or what to be added in Makefile. Thanks!
Try using -marm.
Ramana
linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
On Thu, May 12, 2011 at 11:13 AM, AKS aungkyas@gmail.com wrote:
Hi Ramana
I thought I have tried
./configure xxxxx CFLAGS="-marm" after sending the email below.
Note that if you really typed './configure xxxxx CFLAGS="-marm"' it won't work.
CFLAGS needs to be set in the environment, and environment assignments have to go at the start of the command:
CFLAGS=-marm ./configure xxxxx
This may work for you, but as Peter points out, packages' build scripts tend to clobber/ignore the default CFLAGS in many places, so the only really robust way to get the desired effect is to rebuild the toolchain with different defaults. It just depends on how well behaved your package is.
If you're running on hardware that doesn't support support Thumb-2, you really do need to rebuild the toolchain because compiler support libraries such as libgcc still contain Thumb-2 instructions even if you invoke the compiler with -marm.
Cheers ---Dave
On Thu, May 12, 2011 at 3:07 AM, AKS aungkyas@gmail.com wrote:
Hi
I am using Linaro gcc on Ubuntu/ARM. I am having a problem in building a package that does not support thumb nor thumb2. When I typed "gcc -v" I saw that "–with-mode=thumb" and I assume that means my gcc compiler will try to optimize some code in thumb. So I assume I need to make my Linaro compiler knows that no thumb! Please correct me if I were wrong.
What flag I have to pass in making? I mean what to type in after CCFLAGS= in make or what to be added in Makefile. Thanks!
linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Oops here's the text:-
If you are building complete packages you may find that the package uses the compiler defaults
any compiler flags you add may be discarded, depending on the package
For the linaro toolchain these are armv7 thumb2
To build complete packages as arm you need to rebuild & re-install the linaro cross compiler package to default to the flavour you require e.g. armv7 or armv5 etc
See https://wiki.linaro.org/Platform/DevPlatform/CrossCompile and others
- search flavour, cross compiler
Peter
On Thu, May 12, 2011 at 3:07 AM, AKS aungkyas@gmail.com wrote:
Hi
I am using Linaro gcc on Ubuntu/ARM. I am having a problem in building a package that does not support thumb nor thumb2. When I typed "gcc -v" I saw that "–with-mode=thumb" and I assume that means my gcc compiler will try to optimize some code in thumb. So I assume I need to make my Linaro compiler knows that no thumb! Please correct me if I were wrong.
What flag I have to pass in making? I mean what to type in after CCFLAGS= in make or what to be added in Makefile. Thanks!
linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev