cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Detecting HP native C compiler on HP-UX

From: DmiTriy Fedchenko <xfedch_at_gmail.com>
Date: Wed, 20 May 2015 10:28:53 +0300

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.

Thanks
Dmitriy

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