Conditionally Patching output of Makefile from Configure?

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Conditionally Patching output of Makefile from Configure?

Jeffrey Walton-3
Hi All,

While working on Apple with Mac OS X and iOS, I found I needed to
patch OpenSSL 1.0.1c's Makefile.

Makefile.org has the following line, and it was copied directly into
Makefile by Configure:

    MAKEDEPPROG=makedepend

When the Configure target is iphoneos (cross), iphonesimulator
(cross), or macosx (native), I need a different statement:

    MAKEDEPPROG=$(CC) -M

I've looked at Configure, but I have no clue on the best way to handle
the support/additions needed.

Can anyone offer some advice?

Jeff
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Conditionally Patching output of Makefile from Configure?

Jakob Bohm-7
On 30-12-2012 21:01, Jeffrey Walton wrote:

> Hi All,
>
> While working on Apple with Mac OS X and iOS, I found I needed to
> patch OpenSSL 1.0.1c's Makefile.
>
> Makefile.org has the following line, and it was copied directly into
> Makefile by Configure:
>
>      MAKEDEPPROG=makedepend
>
> When the Configure target is iphoneos (cross), iphonesimulator
> (cross), or macosx (native), I need a different statement:
>
>      MAKEDEPPROG=$(CC) -M
>
> I've looked at Configure, but I have no clue on the best way to handle
> the support/additions needed.
>
> Can anyone offer some advice?
>
> Jeff
>
I have found the script build.sh from
  <https://github.com/st3fan/ios-openssl>
to work nicely for iOS builds of 1.0.1c with no patching of openssl.
(Admitted, I did adapt the script for our environment)

--
Jakob Bohm, CIO, partner, WiseMo A/S. http://www.wisemo.com
Transformervej 29, 2730 Herlev, Denmark. direct: +45 31 13 16 10
<call:+4531131610>
This message is only for its intended recipient, delete if misaddressed.
WiseMo - Remote Service Management for PCs, Phones and Embedded
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Conditionally Patching output of Makefile from Configure?

Jeffrey Walton-3
On Sun, Dec 30, 2012 at 3:20 PM,  <[hidden email]> wrote:

> On 30-12-2012 21:01, Jeffrey Walton wrote:
>>
>> Hi All,
>>
>> While working on Apple with Mac OS X and iOS, I found I needed to
>> patch OpenSSL 1.0.1c's Makefile.
>>
>> Makefile.org has the following line, and it was copied directly into
>> Makefile by Configure:
>>
>>      MAKEDEPPROG=makedepend
>>
>> When the Configure target is iphoneos (cross), iphonesimulator
>> (cross), or macosx (native), I need a different statement:
>>
>>      MAKEDEPPROG=$(CC) -M
>>
>> I've looked at Configure, but I have no clue on the best way to handle
>> the support/additions needed.
>>
>> Can anyone offer some advice?
>>
> I have found the script build.sh from
>  <https://github.com/st3fan/ios-openssl>
> to work nicely for iOS builds of 1.0.1c with no patching of openssl.
> (Admitted, I did adapt the script for our environment)
Thanks Jakob.

If you run the script with an "-no-xxx" option, how does it perform?
For example, try -no-dtls. A quick drive by did not reveal MAKEDEPEND
modification.

What I found  (using the same tool chain): "-no-xxx"  requires a `make
depend`. 'make depend` fails on my 10.7 and 10.8 test machines because
Apple removed `makedepend` at 10.7.2 or 10.7.3. So I need to cut over
to `$(CC) -M`.

Jeff
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Conditionally Patching output of Makefile from Configure?

Jakob Bohm-7
On 30-12-2012 21:34, Jeffrey Walton wrote:

> On Sun, Dec 30, 2012 at 3:20 PM,  <[hidden email]> wrote:
>> On 30-12-2012 21:01, Jeffrey Walton wrote:
>>> Hi All,
>>>
>>> While working on Apple with Mac OS X and iOS, I found I needed to
>>> patch OpenSSL 1.0.1c's Makefile.
>>>
>>> Makefile.org has the following line, and it was copied directly into
>>> Makefile by Configure:
>>>
>>>       MAKEDEPPROG=makedepend
>>>
>>> When the Configure target is iphoneos (cross), iphonesimulator
>>> (cross), or macosx (native), I need a different statement:
>>>
>>>       MAKEDEPPROG=$(CC) -M
>>>
>>> I've looked at Configure, but I have no clue on the best way to handle
>>> the support/additions needed.
>>>
>>> Can anyone offer some advice?
>>>
>> I have found the script build.sh from
>>   <https://github.com/st3fan/ios-openssl>
>> to work nicely for iOS builds of 1.0.1c with no patching of openssl.
>> (Admitted, I did adapt the script for our environment)
> Thanks Jakob.
>
> If you run the script with an "-no-xxx" option, how does it perform?
> For example, try -no-dtls. A quick drive by did not reveal MAKEDEPEND
> modification.
Sorry, didn't try that.  I don't have the OS/X machine handy, so I can't
test it right now.
> What I found  (using the same tool chain): "-no-xxx"  requires a `make
> depend`. 'make depend` fails on my 10.7 and 10.8 test machines because
> Apple removed `makedepend` at 10.7.2 or 10.7.3. So I need to cut over
> to `$(CC) -M`.
Isn't there a third party makedepend you could use, or a simple two line
script like:

#!/bin/bash
${CC} -M "$@"


--
Jakob Bohm, CIO, partner, WiseMo A/S. http://www.wisemo.com
Transformervej 29, 2730 Herlev, Denmark. direct: +45 31 13 16 10
<call:+4531131610>
This message is only for its intended recipient, delete if misaddressed.
WiseMo - Remote Service Management for PCs, Phones and Embedded
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Conditionally Patching output of Makefile from Configure?

Jakob Bohm-7
On 31-12-2012 00:14, [hidden email] wrote:

> On 30-12-2012 21:34, Jeffrey Walton wrote:
>> On Sun, Dec 30, 2012 at 3:20 PM,  <[hidden email]> wrote:
>>> On 30-12-2012 21:01, Jeffrey Walton wrote:
>>>> Hi All,
>>>>
>>>> While working on Apple with Mac OS X and iOS, I found I needed to
>>>> patch OpenSSL 1.0.1c's Makefile.
>>>>
>>>> Makefile.org has the following line, and it was copied directly into
>>>> Makefile by Configure:
>>>>
>>>>       MAKEDEPPROG=makedepend
>>>>
>>>> When the Configure target is iphoneos (cross), iphonesimulator
>>>> (cross), or macosx (native), I need a different statement:
>>>>
>>>>       MAKEDEPPROG=$(CC) -M
>>>>
>>>> I've looked at Configure, but I have no clue on the best way to handle
>>>> the support/additions needed.
>>>>
>>>> Can anyone offer some advice?
>>>>
>>> I have found the script build.sh from
>>>   <https://github.com/st3fan/ios-openssl>
>>> to work nicely for iOS builds of 1.0.1c with no patching of openssl.
>>> (Admitted, I did adapt the script for our environment)
>> Thanks Jakob.
>>
>> If you run the script with an "-no-xxx" option, how does it perform?
>> For example, try -no-dtls. A quick drive by did not reveal MAKEDEPEND
>> modification.
> Sorry, didn't try that.  I don't have the OS/X machine handy, so I
> can't test it right now.
>> What I found  (using the same tool chain): "-no-xxx"  requires a `make
>> depend`. 'make depend` fails on my 10.7 and 10.8 test machines because
>> Apple removed `makedepend` at 10.7.2 or 10.7.3. So I need to cut over
>> to `$(CC) -M`.
> Isn't there a third party makedepend you could use, or a simple two
> line script like:
>
> #!/bin/bash
> ${CC} -M "$@"
>
>
At second thought, I seem to recall that the old gcc-based apple
toolchain had severe anomalies in the handling of the -M family
of options, and I am unsure how the new clang/llvm tools do.  I
also seem to recall that you may need to use their old gcc-based
toolchain when targeting the older armv6 based devices.

So it is probably safer to just do whichever of the following3
works best:

ln -s /bin/true /usr/local/bin/makedepend
ln -s /bin/echo /usr/local/bin/makedepend
ln -s /usr/local/bin/fakedepend /usr/local/bin/makedepend

(where /usr/local/bin/fakedepend would be a small script to output
semantically empty dependency lines for each of its args).

Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S. http://www.wisemo.com
Transformervej 29, 2730 Herlev, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Conditionally Patching output of Makefile from Configure?

Jeffrey Walton-3
In reply to this post by Jakob Bohm-7
On Sun, Dec 30, 2012 at 3:20 PM,  <[hidden email]> wrote:

> On 30-12-2012 21:01, Jeffrey Walton wrote:
>>
>> Hi All,
>>
>> While working on Apple with Mac OS X and iOS, I found I needed to
>> patch OpenSSL 1.0.1c's Makefile.
>>
>> Makefile.org has the following line, and it was copied directly into
>> Makefile by Configure:
>>
>>      MAKEDEPPROG=makedepend
>>
>> When the Configure target is iphoneos (cross), iphonesimulator
>> (cross), or macosx (native), I need a different statement:
>>
>>      MAKEDEPPROG=$(CC) -M
>>
>> I've looked at Configure, but I have no clue on the best way to handle
>> the support/additions needed.
>>
>> Can anyone offer some advice?
>>
> I have found the script build.sh from
>  <https://github.com/st3fan/ios-openssl>
> to work nicely for iOS builds of 1.0.1c with no patching of openssl.
> (Admitted, I did adapt the script for our environment)
Thanks Jakob. I got to rest up last night and my mind is fresh (for
what that's worth). So here's a more concise request. Keep in mind
that Configure is a PERL script, and I have no practical PERL
experience.

Configure should test `makeddepend`. If 'makedepend' succeeds, do
nothing. If 'makedepend' fails, it should patch the resulting Makefile
with "MAKEDEPEND=$(CC) -M' on Apple platforms.

That's the behavior I am looking for.  and the Makefile.org are
available online for inspection.
http://cvs.openssl.org/fileview?f=openssl/Configure&v=1.621.2.37.2.32.2.11
http://cvs.openssl.org/fileview?f=openssl/Makefile.org&v=1.295.2.10.2.11.2.3

Jeff
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Conditionally Patching output of Makefile from Configure?

Ben Laurie-2
On Mon, Dec 31, 2012 at 11:39 AM, Jeffrey Walton <[hidden email]> wrote:

> On Sun, Dec 30, 2012 at 3:20 PM,  <[hidden email]> wrote:
>> On 30-12-2012 21:01, Jeffrey Walton wrote:
>>>
>>> Hi All,
>>>
>>> While working on Apple with Mac OS X and iOS, I found I needed to
>>> patch OpenSSL 1.0.1c's Makefile.
>>>
>>> Makefile.org has the following line, and it was copied directly into
>>> Makefile by Configure:
>>>
>>>      MAKEDEPPROG=makedepend
>>>
>>> When the Configure target is iphoneos (cross), iphonesimulator
>>> (cross), or macosx (native), I need a different statement:
>>>
>>>      MAKEDEPPROG=$(CC) -M
>>>
>>> I've looked at Configure, but I have no clue on the best way to handle
>>> the support/additions needed.
>>>
>>> Can anyone offer some advice?
>>>
>> I have found the script build.sh from
>>  <https://github.com/st3fan/ios-openssl>
>> to work nicely for iOS builds of 1.0.1c with no patching of openssl.
>> (Admitted, I did adapt the script for our environment)
> Thanks Jakob. I got to rest up last night and my mind is fresh (for
> what that's worth). So here's a more concise request. Keep in mind
> that Configure is a PERL script, and I have no practical PERL
> experience.
>
> Configure should test `makeddepend`. If 'makedepend' succeeds, do
> nothing. If 'makedepend' fails, it should patch the resulting Makefile
> with "MAKEDEPEND=$(CC) -M' on Apple platforms.
>
> That's the behavior I am looking for.  and the Makefile.org are
> available online for inspection.
> http://cvs.openssl.org/fileview?f=openssl/Configure&v=1.621.2.37.2.32.2.11
> http://cvs.openssl.org/fileview?f=openssl/Makefile.org&v=1.295.2.10.2.11.2.3

According to my reading of Configure (in 1.0.1 at least) it should
already change makedepend to $cc, which should be specified by the
platform. Not sure why it appears not to!
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Conditionally Patching output of Makefile from Configure?

Jakob Bohm-7
In reply to this post by Jeffrey Walton-3
On 12/31/2012 12:39 PM, Jeffrey Walton wrote:

> On Sun, Dec 30, 2012 at 3:20 PM,  <[hidden email]> wrote:
>> On 30-12-2012 21:01, Jeffrey Walton wrote:
>>>
>>> Hi All,
>>>
>>> While working on Apple with Mac OS X and iOS, I found I needed to
>>> patch OpenSSL 1.0.1c's Makefile.
>>>
>>> Makefile.org has the following line, and it was copied directly into
>>> Makefile by Configure:
>>>
>>>       MAKEDEPPROG=makedepend
>>>
>>> When the Configure target is iphoneos (cross), iphonesimulator
>>> (cross), or macosx (native), I need a different statement:
>>>
>>>       MAKEDEPPROG=$(CC) -M
>>>
>>> I've looked at Configure, but I have no clue on the best way to handle
>>> the support/additions needed.
>>>
>>> Can anyone offer some advice?
>>>
>> I have found the script build.sh from
>>   <https://github.com/st3fan/ios-openssl>
>> to work nicely for iOS builds of 1.0.1c with no patching of openssl.
>> (Admitted, I did adapt the script for our environment)
> Thanks Jakob. I got to rest up last night and my mind is fresh (for
> what that's worth). So here's a more concise request. Keep in mind
> that Configure is a PERL script, and I have no practical PERL
> experience.
>
> Configure should test `makeddepend`. If 'makedepend' succeeds, do
> nothing. If 'makedepend' fails, it should patch the resulting Makefile
> with "MAKEDEPEND=$(CC) -M' on Apple platforms.
>
Did you read my second post from last night (the one about me not
trusting the "$(CC) -M" option on OS/X?).

> That's the behavior I am looking for.  and the Makefile.org are
> available online for inspection.
> http://cvs.openssl.org/fileview?f=openssl/Configure&v=1.621.2.37.2.32.2.11
> http://cvs.openssl.org/fileview?f=openssl/Makefile.org&v=1.295.2.10.2.11.2.3
>

I think this is better done by someone who is already familiar with that
piece of code ("./Configure") and its design/style.


Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  http://www.wisemo.com
Transformervej 29, 2730 Herlev, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Conditionally Patching output of Makefile from Configure?

Jeffrey Walton-3
On Mon, Dec 31, 2012 at 8:39 AM, Jakob Bohm <[hidden email]> wrote:

> On 12/31/2012 12:39 PM, Jeffrey Walton wrote:
>>
>> On Sun, Dec 30, 2012 at 3:20 PM,  <[hidden email]> wrote:
>>>
>>> On 30-12-2012 21:01, Jeffrey Walton wrote:
>>>>
>>>>...
>>
>> Configure should test `makeddepend`. If 'makedepend' succeeds, do
>> nothing. If 'makedepend' fails, it should patch the resulting Makefile
>> with "MAKEDEPEND=$(CC) -M' on Apple platforms.
>>
> Did you read my second post from last night (the one about me not trusting
> the "$(CC) -M" option on OS/X?).
Yes. The process is for OS X 10.6, 10.7, and 10.8. It  is not for
older versions of Apple tools chains as you indicated in the earlier
response.

The worse case is: the replacement of 'makedpend` with `$(CC) -M` is
lateral. That is, we traded one broken system for another broken
system without requiring the user to do a thing. No user intervention
is good (during the swap of the known missing 'makedepend').

If that fails, I will point folks to your suggestions (seriously). I
have the link save locally and will provide them with, "Please see
Jakob Bohm's post at ...".

>> That's the behavior I am looking for.  and the Makefile.org are
>> available online for inspection.
>> http://cvs.openssl.org/fileview?f=openssl/Configure&v=1.621.2.37.2.32.2.11
>>
>> http://cvs.openssl.org/fileview?f=openssl/Makefile.org&v=1.295.2.10.2.11.2.3
>>
>
> I think this is better done by someone who is already familiar with that
> piece of code ("./Configure") and its design/style.
Agreed :)

Jeff
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Conditionally Patching output of Makefile from Configure?

Jeffrey Walton-3
In reply to this post by Ben Laurie-2
On Mon, Dec 31, 2012 at 7:00 AM, Ben Laurie <[hidden email]> wrote:

> On Mon, Dec 31, 2012 at 11:39 AM, Jeffrey Walton <[hidden email]> wrote:
>> On Sun, Dec 30, 2012 at 3:20 PM,  <[hidden email]> wrote:
>>> On 30-12-2012 21:01, Jeffrey Walton wrote:
>>>>
>>>> ....
>>
>> Configure should test `makeddepend`. If 'makedepend' succeeds, do
>> nothing. If 'makedepend' fails, it should patch the resulting Makefile
>> with "MAKEDEPEND=$(CC) -M' on Apple platforms.
>>
>> That's the behavior I am looking for.  and the Makefile.org are
>> available online for inspection.
>> http://cvs.openssl.org/fileview?f=openssl/Configure&v=1.621.2.37.2.32.2.11
>> http://cvs.openssl.org/fileview?f=openssl/Makefile.org&v=1.295.2.10.2.11.2.3
>
> According to my reading of Configure (in 1.0.1 at least) it should
> already change makedepend to $cc, which should be specified by the
> platform. Not sure why it appears not to!
I'm in a cross-compile environment. Perhaps its due to grepping for
"^gcc", while OS X will have "llvm-gcc"?

Its just speculation since I did not see that in 'config' and
'Configure' when I looked.

Jeff
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Conditionally Patching output of Makefile from Configure?

Ben Laurie-2
On Wed, Jan 2, 2013 at 8:34 AM, Jeffrey Walton <[hidden email]> wrote:

> On Mon, Dec 31, 2012 at 7:00 AM, Ben Laurie <[hidden email]> wrote:
>> On Mon, Dec 31, 2012 at 11:39 AM, Jeffrey Walton <[hidden email]> wrote:
>>> On Sun, Dec 30, 2012 at 3:20 PM,  <[hidden email]> wrote:
>>>> On 30-12-2012 21:01, Jeffrey Walton wrote:
>>>>>
>>>>> ....
>>>
>>> Configure should test `makeddepend`. If 'makedepend' succeeds, do
>>> nothing. If 'makedepend' fails, it should patch the resulting Makefile
>>> with "MAKEDEPEND=$(CC) -M' on Apple platforms.
>>>
>>> That's the behavior I am looking for.  and the Makefile.org are
>>> available online for inspection.
>>> http://cvs.openssl.org/fileview?f=openssl/Configure&v=1.621.2.37.2.32.2.11
>>> http://cvs.openssl.org/fileview?f=openssl/Makefile.org&v=1.295.2.10.2.11.2.3
>>
>> According to my reading of Configure (in 1.0.1 at least) it should
>> already change makedepend to $cc, which should be specified by the
>> platform. Not sure why it appears not to!
> I'm in a cross-compile environment. Perhaps its due to grepping for
> "^gcc", while OS X will have "llvm-gcc"?
>
> Its just speculation since I did not see that in 'config' and
> 'Configure' when I looked.

The relevant line is:

s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Conditionally Patching output of Makefile from Configure?

Jakob Bohm-7
In reply to this post by Jeffrey Walton-3
On 1/2/2013 9:34 AM, Jeffrey Walton wrote:

> On Mon, Dec 31, 2012 at 7:00 AM, Ben Laurie <[hidden email]> wrote:
>> On Mon, Dec 31, 2012 at 11:39 AM, Jeffrey Walton <[hidden email]> wrote:
>>> On Sun, Dec 30, 2012 at 3:20 PM,  <[hidden email]> wrote:
>>>> On 30-12-2012 21:01, Jeffrey Walton wrote:
>>>>>
>>>>> ....
>>>
>>> Configure should test `makeddepend`. If 'makedepend' succeeds, do
>>> nothing. If 'makedepend' fails, it should patch the resulting Makefile
>>> with "MAKEDEPEND=$(CC) -M' on Apple platforms.
>>>
>>> That's the behavior I am looking for.  and the Makefile.org are
>>> available online for inspection.
>>> http://cvs.openssl.org/fileview?f=openssl/Configure&v=1.621.2.37.2.32.2.11
>>> http://cvs.openssl.org/fileview?f=openssl/Makefile.org&v=1.295.2.10.2.11.2.3
>>
>> According to my reading of Configure (in 1.0.1 at least) it should
>> already change makedepend to $cc, which should be specified by the
>> platform. Not sure why it appears not to!
> I'm in a cross-compile environment. Perhaps its due to grepping for
> "^gcc", while OS X will have "llvm-gcc"?
>
> Its just speculation since I did not see that in 'config' and
> 'Configure' when I looked.


Note that in standard IOS builds, cc is "cc" or "gcc" for backward
compatibility, but it is really the llvm-clang compiler (not the
llvm-gcc compiler, which is a different part of the llvm project).

Also note that "as" is (or at least recently was) the  Apple fork of GNU
as, not the llvm assembler (again, this is for iOS).


Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  http://www.wisemo.com
Transformervej 29, 2730 Herlev, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Conditionally Patching output of Makefile from Configure?

Jeffrey Walton-3
On Wed, Jan 2, 2013 at 5:07 AM, Jakob Bohm <[hidden email]> wrote:

> On 1/2/2013 9:34 AM, Jeffrey Walton wrote:
>>
>> On Mon, Dec 31, 2012 at 7:00 AM, Ben Laurie <[hidden email]> wrote:
>>>
>>> On Mon, Dec 31, 2012 at 11:39 AM, Jeffrey Walton <[hidden email]>
>>> wrote:
>>>>
>>>> On Sun, Dec 30, 2012 at 3:20 PM,  <[hidden email]> wrote:
>>>>>
>>>>> On 30-12-2012 21:01, Jeffrey Walton wrote:
>>>>>>
>>>>>>
>>>>>> ....
>>>>
>>>>
>>>> Configure should test `makeddepend`. If 'makedepend' succeeds, do
>>>> nothing. If 'makedepend' fails, it should patch the resulting Makefile
>>>> with "MAKEDEPEND=$(CC) -M' on Apple platforms.
>>>>
>>>> That's the behavior I am looking for.  and the Makefile.org are
>>>> available online for inspection.
>>>>
>>>> http://cvs.openssl.org/fileview?f=openssl/Configure&v=1.621.2.37.2.32.2.11
>>>>
>>>> http://cvs.openssl.org/fileview?f=openssl/Makefile.org&v=1.295.2.10.2.11.2.3
>>>
>>>
>>> According to my reading of Configure (in 1.0.1 at least) it should
>>> already change makedepend to $cc, which should be specified by the
>>> platform. Not sure why it appears not to!
>>
>> I'm in a cross-compile environment. Perhaps its due to grepping for
>> "^gcc", while OS X will have "llvm-gcc"?
>>
>> Its just speculation since I did not see that in 'config' and
>> 'Configure' when I looked.
>
> Note that in standard IOS builds, cc is "cc" or "gcc" for backward
> compatibility, but it is really the llvm-clang compiler (not the llvm-gcc
> compiler, which is a different part of the llvm project).
Ah, good eye for details. I never made the distinction though I new
Clang was in play.

> Also note that "as" is (or at least recently was) the  Apple fork of GNU as,
> not the llvm assembler (again, this is for iOS).
Yes, this has given me trouble more than once when I hand cod ARM
assembly in an iOS project. Apple's 'as' would not recognize the ADDS
instruction in Thumb mode (the routine needed access to the status
register for carry/overflow). I had to emit the byte codes by hand:

__asm__
(
  "ldr  r0, %[xa]   ;"  // R0 = a
  "ldr  r1, %[xb]   ;"  // R1 = b
  ".inst.w 0x1809   ;"  // Issue 'adds r1, r1, r0'
  ...
);

Jeff
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]