pforth
pforth copied to clipboard
dictionary not easy to build during cross-compilation
Hello!
I have made an (unofficial) package of PForth for OpenWRT, and while cross-compiling, I noticed that the dictionary buillt on the compiling machine (amd64) had a cell size not compatible with the device I was compiling to (32 bit big-endian MIPS). So I made the package installer do this:
- install the source system (.fth files) to
/tmp/pforth-install/fth
(/tmp
is mounted on RAM - I did this because even those ~300k may be too much for some devices) - source the files to build the dictionary
- copy the dictionary where PForth can use it
- delete
/tmp/pforth-install/fth
However, it would be easier if one could cross-build the dictionary. Would it be too hard to implement?
How about using qemu user mode emulation to build the dictionary on the host machine? just like the use of wine in the mingw build: https://github.com/philburk/pforth/blob/master/platforms/mingw-crossbuild-linux/Makefile#L108
here is a simple example for arm target: https://github.com/letoh/pforth/blob/improve-cross-build/platforms/pc-unix-arm-unix/Makefile.cross
How about using qemu user mode emulation to build the dictionary on the host machine? just like the use of wine in the mingw build:
I'll check... But although technically the OpenWRT build system allows this, the OpenWRT project itself doesn't allow us to use anything besides what comes out of the box in buildroot.