cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Detecting HP native C compiler on HP-UX

From: Michael Osipov <1983-01-06_at_gmx.net>
Date: Thu, 21 May 2015 21:16:46 +0200

Am 2015-05-20 um 18:37 schrieb Michael Osipov:
> Am 2015-05-20 um 09:28 schrieb DmiTriy Fedchenko:
>> 2015-05-19 19:45 GMT+03:00 Michael Osipov <1983-01-06_at_gmx.net>:
>>
>>> Am 2015-05-19 um 17:12 schrieb DmiTriy Fedchenko:
>>>
>>>> Hello,
>>>> I realise that m4/curl-compilers.m4 does not detecting properly HP
>>>> native
>>>> compiler on my HP-UX Itanium machines. The key problem in C
>>>> preprocessor
>>>> which has invoked there. On available for me machines I am using
>>>> cpp, not
>>>> "cc -E" and it is not defines __HP_cc, but __hpux.
>>>>
>>>
>>> Dima,
>>>
>>> was is the problem you are experiencing?
>>>
>>> I have no problem compiling curl on various machines running on HP-UX
>>> 11.31 in 32 bit mode.
>>>
>>> Michael
>>>
>>> -------------------------------------------------------------------
>>> List admin: http://cool.haxx.se/list/listinfo/curl-library
>>> Etiquette: http://curl.haxx.se/mail/etiquette.html
>>
>>
>> Michael,
>> There is no any issues with cURL compilation or working on HP-UX 11.31 in
>> 64bit, or 32bit modes. There is small error in configuration
>> procedure. You
>> can reproduce it if setup environment variable CPP:
>> export CPP=/usr/ccs/lbin/cpp or it preprnt path /usr/ccs/lbin to PATH and
>> run configure. In this case configure will not detect C compiler
>> properly:
>> "checking if compiler is HP-UX C... no"
>>
>> If you unset CPP variable then configure write:
>> "checking if compiler is HP-UX C... yes"
>>
>> This difference affects on configure detected CFLAGS if you did not
>> pass it:
>> CFLAGS='' vs CFLAGS='-z +W 4227,4255 -s +O2'
>>
>> Of course it is strange to use C preprocessor to detect is it native C
>> compiler or not but cURL do that for years. My patch works with native
>> HP-UX C preprocessor cpp as with C compiler in preprocessor mode.
>
> OK, got it. I will try to force the error tomorrow at work. Can you
> please attach a unified diff against current master. I will test that as
> well.

I can confirm that with CPP exported configure complains about the
compiler but compilation still works and cc ist detected.

Dima, please provide a unified patch, I'll retest and someone of the
devs can commit that then.

Michael

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-05-21