[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wget2 cross-compile on iOS arm64
From: |
Ryan Schmidt |
Subject: |
Re: Wget2 cross-compile on iOS arm64 |
Date: |
Tue, 23 Mar 2021 05:16:15 -0500 |
On Mar 23, 2021, at 04:01, Jeffrey Walton wrote:
> On Tue, Mar 23, 2021 at 12:38 AM Ryan Schmidt wrote:
>>
>> On Mar 22, 2021, at 17:56, Jeffrey Walton wrote:
>>
>>> It looks like this is an Autotools problem. Autotools should test if
>>> ccp works as expected, and avoid cpp if it does not. Autotools should
>>> not break the build.
>>>
>>> Perl works around Apple's cpp:
>>> https://github.com/Perl/perl5/blob/blead/hints/darwin.sh#L131.
>>
>> You're referring to the part of their code that adds -no-cpp-precomp if the
>> compiler accepts it? The last version of Apple gcc that did anything in
>> response to -no-cpp-precomp was Apple gcc 3.1. Apple gcc 3.3 and later do
>> nothing in response to -no-cpp-precomp. That flag is ancient history.
>>
> Actually I was talking about the comment that says, " Avoid Apple's
> cpp precompiler".
.....this is the block of code including that comment:
# Avoid Apple's cpp precompiler, better for extensions
if [ "X`echo | ${cc} -no-cpp-precomp -E - 2>&1 >/dev/null`" = "X" ]; then
cppflags="${cppflags} -no-cpp-precomp"
# This is necessary because perl's build system doesn't
# apply cppflags to cc compile lines as it should.
ccflags="${ccflags} ${cppflags}"
fi
So they wish to avoid Apple's cpp precompiler ("cpp-precomp"), and the way that
they do that is that they test whether the compiler supports the flag
"-no-cpp-precomp" and if so they add that flag which instructs Apple gcc to use
gcc's standard preprocessor instead.
cpp-precomp existed in Apple gcc 3.1 and earlier. Apple removed it in Apple gcc
3.3 and later. In Apple gcc 3.3 and later the flag "-no-cpp-precomp", while
still accepted, is ignored and does nothing. gcc's standard preprocessor is
used in all cases in Apple gcc 3.3 and later. See the release notes:
https://opensource.apple.com/source/gccfast/gccfast-1626/AppleReleaseNotes.html?f=text
Apple gcc as a whole has been dead for a decade already. We use clang now.
So again, what you're talking about is ancient history and is not the cause of
the build failure you saw. I believe the cause of the build failure you saw is
that you weren't providing the right flags to accomplish cross-compilation. I
showed a set of flags that worked for me and I suggest you work from there.