arsv / perl-cross

configure and cross-compile perl
Other
81 stars 28 forks source link

don't add "all" target to module builds #120

Closed alyssais closed 2 years ago

alyssais commented 2 years ago

When building with --all-static, this would previously try to build both the "all" and "static" targets, which would fail if the toolchain could only produce static libraries/executables. Here, I've removed the "all" target from all the module building lines, for symmetry. Those that don't specify a target will still default to all because MakeMaker ensures that in the Makefiles it generates.

arsv commented 2 years ago

The changes make sense, but as it is the patch breaks dynamic builds.

I think I got it working, but it would be nice to also check it with your all-static setup. https://github.com/arsv/perl-cross/pull/120/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52L227 In both static cases (dynaloader and static_modules), try removing the static target as well. Just let it build whatever it wants by default.

alyssais commented 2 years ago

I think I got it working, but it would be nice to also check it with your all-static setup.

This didn't quite work for me, because the $(static_modules) target only works if it runs the static target, not the default one. But by removing the static from pm_to_blib, I was able to complete both dynamic and static builds, so I think that's the way to go (and have updated the PR accordingly).