pforth icon indicating copy to clipboard operation
pforth copied to clipboard

dictionary not easy to build during cross-compilation

Open jpellegrini opened this issue 3 years ago • 3 comments

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?

jpellegrini avatar Jan 06 '21 03:01 jpellegrini

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

letoh avatar Aug 18 '21 10:08 letoh

here is a simple example for arm target: https://github.com/letoh/pforth/blob/improve-cross-build/platforms/pc-unix-arm-unix/Makefile.cross

letoh avatar Aug 24 '21 22:08 letoh

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.

jpellegrini avatar Apr 04 '22 11:04 jpellegrini