Hi MH,
On 07/03/2020 08.42, 'MH' via Django users wrote:
Dear Kasper
Thank you very much. If you still read this, I would like to ask a
question about cross compilation. I found this developers guide from
Synology:
https://global.download.synology.com/download/Document/Software/DeveloperGuide/Firmware/DSM/All/enu/Synology_NAS_Server_3rd_Party_Apps_Integration_Guide.pdf
Cool that you haven't given up and that you're trying to figure things
out on your own. That's the best way to learn.
To answer a few specific questions:
# env
CC=/usr/local/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-gcc \
LD=/usr/local/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-ld \
RANLIB=/usr/local/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-ranlib
\
CFLAGS="-I/usr/local/arm-marvell-linux-gnueabi/arm-marvell-linux-gnueabi/libc/include-mhard-float
-mfpu=vfpv3-d16"\
LDFLAGS="-L/usr/local/arm-marvell-linux-gnueabi/arm-marvell-linux-gnueabi/libc/lib"\
./configure \
--host=armle-unknown-linux \
--target=armle-unknown-linux \
--build=i686-pc-linux" \
--prefix=/usr/local
|
There are also further questions like "do I have to insert the
backslashes?"
The backslash is used for escaping characters so they will not get
interpreted by the shell. In this case it's a new line character.
As you probably now, entering a new line character tells the shell to
execute the current command, if you have a long line, it is often more
readable to split it into several lines like has been done in this PDF.
It is similar to how you need to escape spaces in a filename containing
spaces since arguments to the command is most often separated by space.
Eg. doing:
# rm my filename
Will tell the shell to remove the files called "my" and "filename" while:
# rm my\ filename
Will tell the shell to remove a file called "my filename".
So in short, yes you need the new lines.
In this case this is used to change the environment variables used by
the configure command, but only for this command.
Doing something like:
# FOO=42 ./bar
Will set the value of FOO to 42 for the "bar" command, but set it back
to its previous value (or nothing) after "bar" has exited.
The configure command needs to know where to find the C compiler (and a
bunch of other stuff) I hope you can guess how you tell it where to find it.
but my more important question is around "how should I
adapt these recommendations to my case?"
That's they tricky part, since that is completely up to you to figure
out :-)
The toolchain that I extracted to /usr/local on my desktop PC has a
different name. The folder is called "arm-unknown-linux-gnueabi". In the
bin folder I can find many files starting with
"arm-unknown-linux-gnueabi". There are also several gcc files. gcc
itself, but also gcc-4.9.3, gcc-ar, gcc-nm, gcc-ranlib and there is a
also a file which ends on -ld.
Most of these are most likely symbolic links. Try running:
# ls -l
Instead, you should most likely get a visual idea of what that means.
However, there is no libc folder. When go back from the bin folder, then
there is just "lib" and in it "gcc". Then there is another
"arm-unknown-linux-gnueabi" folder and in it "4.9.3". But in there and
in the following subfolders I cannot find a file called
|include-mhard-float|
So, I do not even know what I am doing there, I am just trying to adapt
this to the available files.
Could you point me in the right direction?
Sorry, that's a bit too specific to the your Synology setup. I hope my
answers have been helpful anyway. It's pretty basic Unix stuff, so sorry
if it was obvious to you already, but it's extremely good to know these
things.
Good luck.
Kind regards,
Kasper Laudrup
Ps.
All of this is extremely off topic considering this is mailing list for
Django users. Hope everyone else is OK with that.
--
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/9e90153b-e449-8c98-487c-104163b13625%40stacktrace.dk.