Giter VIP home page Giter VIP logo

Comments (4)

chrox avatar chrox commented on May 14, 2024

According to LuaJIT document, it's necessary to add "-m32" flag in HOST_CC when cross compiling for 32 bit architecture to make pointer size match.

Current Makefile is largely used for cross compiling except building the emulator that use SDL to handle input/output. I'm not sure if native compile is even supported without large portion of modification. But is there a particular reason to choose native compiling instead of cross compiling? I would never try to compile anything on a 800 MHz CPU plus 256 MB RAM of my Kindle device.

from koreader-base.

lgeek avatar lgeek commented on May 14, 2024

I can confirm this is the only change required to build koreader-base (and koreader) natively on ARM (at least for Kobo devices).

As to why, it's because I'm building koreader as part of a larger collection of software, some of which is easier to just build natively. I'm using a more powerful machine, not my ereader, and the build time is entirely reasonable.

For my own use I can work around this with a local patch. However, since it seems to be the only issue blocking compilation on non-x86 hosts, I think it might be worth fixing upstream.

from koreader-base.

chrox avatar chrox commented on May 14, 2024

Then it seems easy to fix. Probably we can differentiate toolchains with $(CC) -dumpmachine (the MACHINE variable defined in Makefile.def) with findstring function like this

HOST_CC="$(HOSTCC) $(if $(findstring,x86_64,$(MACHINE)),-m32,)"

from koreader-base.

houqp avatar houqp commented on May 14, 2024

++ on what chrox's approach. @lgeek , feel free to send a PR

from koreader-base.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.