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

support -cross=/pathto/config.sh #428

Open
rurban opened this issue Nov 15, 2018 · 0 comments
Open

support -cross=/pathto/config.sh #428

rurban opened this issue Nov 15, 2018 · 0 comments
Assignees
Milestone

Comments

@rurban
Copy link
Owner

rurban commented Nov 15, 2018

Small devices often do not have enough memory or not even an installed
compiler to compile a perl script. In this case you
need the target config.sh on your filesystem, and pass it as
-cross=pathto/target-config.sh option to the compiler. Several host config
values will then be replaced by its target values, so that it can be
run on the target system with the target configuration. Esp. for the
target specific @INC, which must find run-time modules in its path.
Note that the basic architecture must still match, i.e. the perl
version and the settings for usemultiplicity and useithreads must be
the same as on the host. It's is strongly recommended to also have
the same byteorder, ivsize and nvsize settings on the native host.

cross targets need different config keys in the C file.
easier than a --target=triple or perlbinary arg seems to be a path to the cross config.sh file.

e.g. @INC needs to be different for run-time require calls, but all system relevant config settings need to be set. B::C::Config is generated. Override differing values from the cross config, and use $Config{perlpath} and $Config{osname} instead of $^X and $^O. Generate an adequate @INC to resolve run-time require's, but leave %INC untouched.

For the time being demand equal version, multiplicity and ithreads settings, but theoretically even this could be taken from the cross target.

Support --cross PATH for perlcc, -cross=PATH for the backends.

@rurban rurban self-assigned this Nov 15, 2018
@rurban rurban modified the milestone: february release Nov 15, 2018
rurban added a commit that referenced this issue Nov 17, 2018
@rurban rurban changed the title support --cross=/pathto/config.sh support -cross=/pathto/config.sh Nov 17, 2018
@rurban rurban added this to the 1.56 milestone Nov 18, 2018
rurban added a commit that referenced this issue Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant