cross compile cilk gcc form arm-linux

cross compile cilk gcc form arm-linux

I have successfully compiled cilk gcc for a host computer but I would like to create binaries to compile my cilk gcc codes for a target board arm-linux. 

I have taken the general procedure used to cross compile gcc-4.8.2, but it shows errors related to some defined cilk variables that are not in the scope. 

These variables are in the file target-hooks-def.h that is generated in object holding directory during the built (#define TARGET_CILKPLUS_BUILTIN_ITT_NOTIFY_SECTION_NAME default_itt_notify_section_name).

if there is a link a special procedure or guideline I could follow I would really appreciate.

13 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I'd guess, if any work has been done to reconcile cilkplus with cross compilation, that should be in the gcc trunk version (4.9).  I've been building that version for Windows target, where cilk is explicitly not supported (and the test suite has been fixed so it doesn't try the cilk tests).  Any problems could be reported via gcc bugzilla.

Well, I used the 4.9 version and I am still getting these errors:

../../../gcc-cilk-src/gcc/config/arm/arm.c:664:29: error: ‘default_itt_notify_section_name’ was not declared in this scope
../../../gcc-cilk-src/gcc/config/arm/arm.c:664:29: error: ‘default_itt_notify_subtract_labels’ was not declared in this scope.
These variables exist in the gcc (without cilk libraries) but gcc cilk version 4.9 is using define TARGET_CILK.. default_itt_notify_section_name. arm.c contains include to target-def.h in the gcc-cilk-src which contains include target-hook-def.h. the latter generates in the gcc-cilk-obj and contains the definition of those variables.

Any idea what could be the problem ?

Hi Karim,

    What feature (s) in Cilk Plus are you planning to use? All major parts except _Cilk_for has been accepted into the mainline. _Cilk-for is under review and I can send you patches to apply to trunk if you like.

Thanks,

 

Balaji V. Iyer.

Hello, 

Thank you for the fast reply. so far I am just using spawn and sync. I actually built successfully the 4.9 branch on an x86_64 but when I try to build for an arm target or even build on an arm platform I get those errors.

Yes I would really appreciate if you can send me some patches.

Thanks,

Karim  

Hi Karim,

    If you are just using _Cilk_spawn and _Cilk_sync, then just check out the sources of GCC trunk (http://gcc.gnu.org/svn/gcc/trunk) and then just build it.

 

Thanks,

Balaji V. Iyer.

Hello, 

Actually I did try to build the GCC trunk and also tried the branch 4.8 but I still get the same error. I tried to build on ubuntu with x86_64 for arm target and also tried to build on the actual arm platform.  Besides I followed the procedure on cilkplus.org . Again the build on x86-64 without a target was successful

Any idea how to fix these errors ?

Attachments: 

AttachmentSize
Downloadimage/png build error.png373.16 KB

Hi Karim,

     I don't know how you are getting errors for default_itt_notify_section_name. That part is not even implemented in the trunk. Can you cut and paste the errors you are seeing on here?

 

thanks,

Balaji V. Iyer.

 

 

Hello, 

I am sorry for the confusion, now I am getting cross compiler errors. so far it has nothing to do with gcc cilk but rather cross compiling. 

Regards 

 

Hello, 

So now I go the trunk built on an arm platform and it was completed. but I noticed that libcilkrts and include/cilk/cilk.h are not built neither in the prefix nor in the obj folder. Even though I use the include/cilk/cilk.h and files that are build on an x86_64 machine the arm platform doesn't recognize them and throw me with the error 

/usr/bin/ld: cannot find -lcilkrts   

Any idea how to go through that ?

Regards 

Yes, the trunk build recognizes which targets have been updated for cilkplus support. There's probably a configure switch to over-ride defaults and accomplish a build to the extent possible (for example, on targets where default is to skip OpenMP, there's --enable-libgomp --enable-threads=posix).  limited target support for libcilkrts certainly is a big obstacle.

Besides, cilk_for isn't yet supported in trunk, so cilkplus usefulness seems limited.  That may be fixed soon (?).

I actually don't need cilk_for for now just spawn and sync are enough.

I am building on arm7l-linux-gnueabihf, you think I should try --enable-libgomp --enable-threads=posix while configuring ?

Regards 

No, I gave the configuration to add OpenMP only as an example of how a feature may be added for a target where it's not included in defaults.  I'd be making wild guesses if I suggested something for cilkplus; sooner or later I'd hope someone would come along with a more authoritative answer.

Leave a Comment

Please sign in to add a comment. Not a member? Join today