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

Fix bug in 64bit -> 32bit cross build #271

Merged
merged 1 commit into from
Oct 20, 2015

Conversation

jiangzidong
Copy link
Contributor

When cross-build 32bit version iotjs in 64bit host, the ./tools/build.py --target-arch=i686 will not succeed, because the "-m32" or "-march=i686" flag is not set in the cmake/config/i686-linux.cmake.

This patch fixs the bug.

1, add "-m32" or "-march=i686" flag in i686-linux.cmake
2, libuv is built by gyp. So we modified the tools/build.py to pass the target_arch to the gyp_uv
3, libtuv use the opt_cmake_toolchain_file() as its CMAKE_TOOLCHAIN_FILE, like other dep_modules did. so libtuv can also support i686 cross-build.

@seanshpark
Copy link
Contributor

@jiangzidong , I have changed libtuv so that to cross compile i686 in x86_64.
You can remove two changes

-                            join_path([LIBTUV_ROOT, 'cmake/config/config_' +
-                                      opt_target_tuple() + ".cmake"]))
+                             opt_cmake_toolchain_file())
+        check_run_cmd('cmake', libtuv_cmake_opt)

@jiangzidong
Copy link
Contributor Author

Hi, @seanshpark Should I 1) add a new commit after this, or 2) git commit --amend and push force, or 3) open a new PR?

@seanshpark
Copy link
Contributor

@jiangzidong , I think 2) will do.

@jiangzidong
Copy link
Contributor Author

@seanshpark Thanks, and I have updated

@seanshpark
Copy link
Contributor

@jiangzidong , Thank you. I'll check and merge.

@seanshpark
Copy link
Contributor

@jiangzidong , Can you please rebase to latest master? There was an update for libtuv.

…rate 32bit binary correctly.

IoT.js-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
@jiangzidong
Copy link
Contributor Author

@seanshpark Sorry that I forgot to sync. What about now?

@seanshpark
Copy link
Contributor

@jiangzidong , fine, thank you :)

@seanshpark seanshpark merged commit f8e8391 into jerryscript-project:master Oct 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants