bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Intrinsic functions fails AC_CHECK_FUNCS test


From: Jerker Bäck
Subject: RE: Intrinsic functions fails AC_CHECK_FUNCS test
Date: Fri, 24 Aug 2007 14:51:17 +0200

Hello Ralf,
Thanks very much for answering my questions - again!

> Another thing you could do is write a config.site file with the right
> settings preseeded.  I generate these by running
>   configure -C
Great, a matter of fact I took this advise rather seriously and created a
test project. I ran a series of different compiler option combinations. I
have been wondering for some time about the intrinsic functions in relation
to interix and this enlightened me a bit from my prevailing darkness - good!
I actually also found a probable bug regarding LP64 labs in the Interix
system headers. 

It seems that 2 functions are always intrinsic: _alloca and _setjmp. A test
for these will always fail unless a proper prototype is supplied. Also, any
attempt to supply another implementation to these functions will never work
(fine!). Some of the intrinsic math functions are not implemented in the
Interix LIBC, so they could be an extra bonus if they are added to the
headers. They are (or should be) the long double, 80-bit precision data type
functions from 16bit CRT, considered obsolete by MS (long double are now
normally 64bit and are casted so in SUA C++ cmath).

For anyone interested, I attach a template config.site and a header with
prototypes which could be added (well, a test may be needed first).

Worth mentioning, the compiler automatically sets -O2 (which implies -Oi
intrinsics) if not set. So, a good rule would be to set -O1 (optimize for
size, which suppresses intrinsics) in the cc script (or whatever used). If
-O2 is really wanted, it's easy to later change the Makefiles produced by
configure.

> Yep.  Fixing this inside Autoconf isn't trivial either, though
> (at least insofar noone has put forth a good suggestion yet).
AN_FUNCTION - what is it? Could it not be used as some sort of a filter with
some conditionalis before the function is sent to the test?

Anyway, I may have a simple solution for the intrinsic functions, like this:

c.m4(262)

+ #if defined _MSC_VER
+ #pragma push_macro(" $1 ")
+ #endif

#undef $1

Needed to be tested a bit more though (e.g. compiler versions, intel
compiler). If it turns out well, what are the chances that it will make it
into autoconf?


Thanks Erik/Jerker

> Hello Erik, Jerker, however you call yourself ;-)
Aeeh, confusing right ... Jerker = old Nordic name for Erik


Attachment: interix_missing.h
Description: Text document

Attachment: config.site
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]