|To:||perlbug [...] perl.org|
|Date:||Fri, 17 Apr 2015 22:45:23 +0300|
|From:||Niko Tyni <ntyni [...] debian.org>|
|Subject:||[PATCH] Configure: Probe intsize with a compile-only test|
Forwarding this report by Helmut Grohne from <>: A major issue with cross building perl is that it tries to run host arch code during configure. In quite a few cases this is completely unnecessary. Consider its check for sizeof(int) for instance. As we know from autotools, sizeof values can be determined by bisecting using compile-only tests. I am therefore attaching a patch that turns the compile&run test for sizeof(int) into a compile-only test. Practically this means that people who wish to cross build perl no longer need to feed the value of intsize. Of course, this is just a drop in the bucket as there still are longsize, shortsize and many more. What I am seeking here is the preferred method to fix all of them. So rather than submitting a large patch pile against a possibly autogenerated file, I am submitting an incremental improvement to observe the processes. The patch is for 5.20.1 but it applies to current bleadperl with some fuzz. I've tried it out on i386 and amd64 (aka. x86_64), and it correctly determines intsize=4 there but outputs compiler messages like Checking to see how big your integers are... try.c: In function ‘main’: try.c:7:13: error: size of array ‘test’ is negative static int test[1 - 2 * (sizeof(int) >= 1)]; ^ I assume that's trivially fixable. If somebody could please add Helmut Grohne <firstname.lastname@example.org> to the watchlist of this ticket, that would probably help discussion by removing me as a middle-man. Many thanks for your work on Perl, -- Niko Tyni email@example.com
Message body is not shown because sender requested not to inline it.