You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucy.apache.org by "Nick Wellnhofer (JIRA)" <ji...@apache.org> on 2017/02/04 16:21:51 UTC

[lucy-issues] [jira] [Commented] (CLOWNFISH-115) Support cross compiling

    [ https://issues.apache.org/jira/browse/CLOWNFISH-115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15852841#comment-15852841 ] 

Nick Wellnhofer commented on CLOWNFISH-115:
-------------------------------------------

I implemented the items mentioned above, but two other major issues came up:

* Build tools like lemon must be built with the host compiler, not the target compiler. Possible solutions:
** Make Charmonizer work with multiple (at least two) compilers. This is a major change because Charmonizer currently treats the Compiler object as singleton. Users should also be able to pass additional compiler and linker flags to each compiler separately, complicating things even more.
** Configure build tools separately, creating their own Makefiles from their own charmonizer.c. This seems to be a lot easier and maybe even more flexible.
* The installation scripts don't know how to install cross-compiled binaries and probably can't be made smart enough. Anyway, it's much better to have Charmonizer create an "install" target in the Makefile (CLOWNFISH-116). It also turned out that cross-compiling GCCs don't honor environment variables like {{LIBRARY_PATH}}, so the {{setup_env.sh}} method of building Lucy directly from a Clownfish source tree doesn't work. Installing Clownfish to a (temporary) directory is mandatory when cross-compiling.

> Support cross compiling
> -----------------------
>
>                 Key: CLOWNFISH-115
>                 URL: https://issues.apache.org/jira/browse/CLOWNFISH-115
>             Project: Apache Lucy-Clownfish
>          Issue Type: Improvement
>            Reporter: Nick Wellnhofer
>            Priority: Minor
>
> In order to support cross compiling, we'll have to:
> - Rework Charmonizer probes so they don't have to execute any test programs. This is a bit tricky for things like sizeof probes. Some work in this direction has already been done.
> - Remove as many things as possible from cfish_platform.h.
> -- Endian macros are only used in Lucy's NumberUtils.cfh. This needs to be reworked.
> -- The following things are compiler-specific and probably don't have to be adjusted when cross compiling:
> --- HAS_*_VARIADIC_MACROS (probably unneeded anyway)
> --- HAS_FUNC_MACRO
> --- IMPORT, EXPORT, INLINE
> --- std headers
> -- SIZEOF_* can already be removed. Was only needed for the old Perl labeled params code.
> -- U64_TO_DOUBLE can be removed. Was only needed for MSVC6 support.
> - If there are any remaining things in cfish_platform.h that can be different on the target platform, add a cross compliation mode to CFC that requires a generated charmony.h.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)