Hi MH,

On 06/03/2020 06.41, 'MH' via Django users wrote:
I will google how I can do this cross compiling. Just recently a friend told me that this could not be done, because it would always have to be done on the same machine. I guess there is no way around that.


Your friend is wrong. If you do embedded development it is quite common to do your development on an x86 host and then cross compile for eg. an ARM target.

How to do that all depends on your build environment and the target host. There are projects specifically for that (eg. Yocto, buildroot) and build systems like CMake supports that through toolchain files.

All of that is most definitely out of scope for what you are trying to achieve.

How would an environment help?


The environment is basically telling your toolchain (compiler, linker etc.) where to find stuff like headers and libraries as well as telling your build system to pick up the correct cross compiler so it will generate code for your target system.

The "arm-unknown-linux-gnueabi-ccache-gcc" executable you mentioned earlier is almost certainly a custom compiled version of GCC for targeting the specific version of ARM on your target (your Synology Diskstation) and other stuff (eg. the gnuabi part) required for generating code that can execute on your target.

The environment (chroot, CMake toolchain file etc.) will then tell your build scripts to use that compiler. Most often something as simple as setting the CC environment variable to the path of that executable, but that's only a small part of what is required.

My main point is still that this is not an easy thing to do. Most often the vendor of the target (I guess that would be Synology in your case) will provide a build environment for you that you could use as a starting point.

Even when that is the case, in my experience there's often quite a lot of tweaking to be done to get it all to work for your specific requirements.

In short. I have the fullest respect and understanding if you try to do this. We all learn from trying out and experimenting with things we have no previous experience with, that's how we get the experience after all, but as someone who has worked professionally with embedded development I would probably give up on this before I even started ;-)

Anyway, I wish you the best of luck.

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/169a4a8f-9e0c-eda3-c9be-15403b9b4c59%40stacktrace.dk.

Reply via email to