Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile for arm-linux-gnueabihf? #26

Closed
giorgio130 opened this issue Jul 1, 2013 · 8 comments
Closed

Compile for arm-linux-gnueabihf? #26

giorgio130 opened this issue Jul 1, 2013 · 8 comments

Comments

@giorgio130
Copy link
Member

Hi! since Kobo switched to armhf from armel in their latest firmware release, I'm trying to compile koreader for this architecture. I tried to simply modify Makefile.defs putting CHOST?=arm-linux-gnueabihf in it, but it looks like this setting is respected only partially since in the end the linker seems to complain that part of the binaries are for armhf and part of them are for armel (looks like thirdparty libraries are still built for armel). What else should I change?

@giorgio130
Copy link
Member Author

I've solved this, it required a little more than a "make clean" since it didn't actually remove all the cruft. In the end I also changed to ARM_ARCH:=-march=armv6j -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=hard -marm

@houqp
Copy link
Member

houqp commented Jul 2, 2013

oh, cool, do we also need to adapt the makefile?

@hwhw
Copy link
Member

hwhw commented Jul 2, 2013

Hm. Shouldn't specifying CHOST on the make command line be enough? like e.g.

$ make CHOST=arm-linux-gnueabihf

That way, all subsequent definitions via ?= and := should be overridden, I
think. Or was it via environment variable (like in "CHOST=... make")? I'm
pretty sure I switched between compilers that way pretty easily.

BTW, we should identify what cruft is left by "make clean" - as that may
give us strange bugshere and there when not working properly.

@giorgio130
Copy link
Member Author

It looked like thirdparty libs and luajit were not properly cleaned. Yes, specifying CHOST looks to be enough, but I don't think you can change to -mfloat-abi=hard by a command line switch, right?

@hwhw
Copy link
Member

hwhw commented Jul 2, 2013

Yes, that may pose some problems, I guess. I'm not too sure, though. Isn't
that the default value for a hf-toolchain, though?

@giorgio130
Copy link
Member Author

it is but in Makefile.defs it is specified:
ARM_ARCH:=-march=armv6j -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp -marm
so if you don't change it in the end you get a strange hybrid I guess. I didn't try though to leave it unchanged and see if the produced binary would run.

@hwhw
Copy link
Member

hwhw commented Jul 2, 2013

Oh, right. It probably won't run, no - unsure if it would even link...

@houqp
Copy link
Member

houqp commented Jul 3, 2013

yeah, we can change ARM_ARCH according to environment. So if you think it's necessary, we should do so.

btw, what command did you run to clean? make clean in koreader or koreader-base?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants