Re: clang + VFP

2013-04-23 Thread Sumit Semwal
Hi Renato,

I was trying to experiment with what you mentioned; here:
https://pastebin.linaro.org/view/35ea66c1 - it still seems to fail with the
same error.

Would you please have a look at it, and let me know if you spot something
absolutely basic and idiotic? (sorry, and a n00b to llvm / clang world !)

Best regards,
~Sumit.


On 18 April 2013 13:36, Renato Golin  wrote:

> Hi Tom,
>
> On 17 April 2013 21:13, Tom Gall  wrote:
>
>> When the clang .o is linked to the gcc/gcc+, I'm getting
>> /home/tgall/opencl/SNU/tmp2/cl_temp_1.tkl uses VFP register arguments,
>> /home/tgall/opencl/SNU/tmp2/cl_temp_1.o does not
>>
>
> This is pretty common. Clang assumes ARMv4 unless you're pretty specific
> about your core.
>
>
> clang -mfloat-abi=hard -mfpu=neon -S -emit-llvm -x cl
>> -I/home/tgall/opencl/SNU/src/compiler/tools/clang/lib/Headers
>> -I/home/tgall/opencl/SNU/inc -include
>> /home/tgall/opencl/SNU/inc/comp/cl_kernel.h
>> /home/tgall/opencl/SNU/tmp2/cl_temp_1.cl -o
>> /home/tgall/opencl/SNU/tmp2/cl_temp_1.ll
>>
>
> What target triple do you see when you run:
>
> $ head /home/tgall/opencl/SNU/tmp2/cl_temp_1.ll
>
> If it's "arm-blah", then it'll default to ARMv4. It has to be "armv7*" to
> default to Cortex-A8, but would be good to specify the CPU as well. It
> won't detect from the hardware you're in yet.
>
>
>
>> so first obvious question is -mfloat-abi=hard -mfpu=neon correct for
>> clang?
>>
>
> Neither required, nor sufficient. ;)
>
> When you chose your triple "armv7l-*" it'll default to A8, Neon,
> hard-float. If you specify hard-float and Neon, it won't default to A8 and
> the parameters will be ignored further in. It doesn't make sense, I agree,
> and it's a problem not just for cross-compilation, but native.
>
> The best bet is to specify the triple AND the CPU, so that you're sure
> you're getting what you want:
>
> $ clang -target arm-linux-gnueabihf -mcpu=cortex-a9 -mfpu=neon -mthumb
>
> As you noticed, Thumb2 is not the default for Cortex-A*, but hard-float
> is. You can always see what hidden options you got by adding -v to the
> command line. Also, the triple here is "arm-*" but Clang will notice the A9
> option and will change accordingly in the IR and pass the correct options
> to the assembler. If you do in two steps, you still have to pass it
> yourself, because "armv7-*" in the IR will turn out as Cortex-A8 by default.
>
> Two other options that I encourage you to try:
>
> -integrated-as : the experimental (on ARM) integrated assembler. You won't
> be using GAS, so if your code depends on GAS' idiosyncrasies, don't use
> this option.
>
> -O3 : Apart from the usual, this will turn on auto-vectorization (like
> GCC), which is also kind of experimental. Just be aware of that.
>
> Hope that helps,
> --renato
>
> PS: If you're cross compiling, you'll have to manually specify the include
> paths.
>



-- 

Thanks and regards,

Sumit Semwal

Linaro Kernel Engineer - Graphics working group

Linaro.org * **│ *Open source software for ARM SoCs*
***

Follow *Linaro: *Facebook  |
Twitter
 | Blog 
___
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain


Re: Linaro GCC 4.8 - Where are prebuilt baremetal (arm-none-eabi-) toolchain binaries?

2013-04-23 Thread Christopher Covington
On 04/23/2013 01:44 AM, Zhenqiang Chen wrote:
> On 23 April 2013 13:16, Sugumar Natarajan  wrote:
>> I couldn’t find the arm-none-eabi- bare metal version of Linaro GCC 4.8.
>> Please provide the link for prebuilt  baremetal tool chain binaries?
> 
> arm-none-eabi- or aarch64-none-elf-? Linaro TCWG does not release
> arm-none-eabi toolchain.

Interesting. I didn't realize that while Linaro links to the arm-none-eabi-
toolchain [1], the stuff is apparently actually built and maintained by ARM
Ltd. employees with their own separate Launchpad project [2].

1. http://www.linaro.org/downloads/ (see BARE-METAL)
2. https://launchpad.net/gcc-arm-embedded

Christopher

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.

___
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain


ARM native version of GCC

2013-04-23 Thread Sukumar Ghorai
Hi,
I am looking for pre-build (binary, tar) GCC for native ARM e.g. I need to
use in Angstrom FS and  panda board to compile the code.

Thanks & regards,
Sukumar
___
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain


Re: Linaro GCC 4.8 - Where are prebuilt baremetal (arm-none-eabi-) toolchain binaries?

2013-04-23 Thread Zhenqiang Chen
On 23 April 2013 20:30, Christopher Covington  wrote:
> On 04/23/2013 01:44 AM, Zhenqiang Chen wrote:
>> On 23 April 2013 13:16, Sugumar Natarajan  wrote:
>>> I couldn’t find the arm-none-eabi- bare metal version of Linaro GCC 4.8.
>>> Please provide the link for prebuilt  baremetal tool chain binaries?
>>
>> arm-none-eabi- or aarch64-none-elf-? Linaro TCWG does not release
>> arm-none-eabi toolchain.
>
> Interesting. I didn't realize that while Linaro links to the arm-none-eabi-
> toolchain [1], the stuff is apparently actually built and maintained by ARM
> Ltd. employees with their own separate Launchpad project [2].
>
> 1. http://www.linaro.org/downloads/ (see BARE-METAL)
> 2. https://launchpad.net/gcc-arm-embedded

Yip.

Linaro TCWG releases prebuilt arm-linux-gnueabihf-, aarch64-none-elf-
and aarch64-linux-gnu- toolchains at
https://launchpad.net/linaro-toolchain-binaries/+download
which are based on linaro-gcc source package release at
https://launchpad.net/gcc-linaro/+download.

Bare-metal (arm-none-eabi-) toolchain is maintained by ARM Lt.
employees. The 4.8 version will be released by the end of 2013.

Thanks!
-Zhenqiang

___
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain


[ACTIVITY] Week 16

2013-04-23 Thread Zhenqiang Chen
Summary:
* ARM internal training and R/M toolchain related work.
* Investigate Linaro toolchain 4.8 build issues.

Details:
1. Fix several linaro toolchain 4.8 binary build issues:
  * nls patch need be updated to add (char *) when assigning the
result of xmalloc to a char*.
  * gcc build pass-2 need build libbacktrace (get patch from
crosstool-ng upstream).
  * gcc build pass-2 build with "-j4" fail. Seams build order issue. A
workaround is to remove "-j4".
  * Mingw32 confiugre fail due to missing ISL. A workaround is to add
"--without-isl"

Plan:
* Work with Bero to release 4.8.
* Swith to ISL/CLooG for future release.

Best Regards!
-Zhenqiang

___
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain