On Thu, Apr 28, 2011 at 12:26 PM, Sisyphus <[email protected]> wrote:
>
> ----- Original Message -----
> From: "Ruben Van Boxem"
>
>>> Is there a simple way for a program to determine the date that the
>> compiler
>>> was built ?
>>> (A #define that tells us would be ideal, if such exists.)
>>
>> I hope you're not planning on using the old compilers with wrong
>> underscore
>> prefixing rules? Please don't; it will cause a lot of trouble for people
>> trying to use libraries distributed by you. An ifdef for that would be
>> one
>> of the worst hacks possible :-(
>
> No - that wasn't the plan.
>
> The mpir library won't build with the old compilers (as MSVC-compliance
> relating to the underscores is expected, and non-compliance not catered
> for.)
> The thought was that if the mpir build process could easily and reliably
> detect that the compiler was too old, the build could be aborted with a
> message along the lines of "this compiler is too old, and is incapable of
> building mpir - you need a compiler that was built after 28/04/2010".
>
> I was just making the enquiry on their behalf.
>
> Cheers,
> Rob
In that case, if mpir is using autotools a configury check
can be done. I have the following in one of my projects
which can be adapted to their needs I guess:
dnl === Check for underscore on external symbols =====================
AC_MSG_CHECKING(whether external symbols need an underscore prefix)
AC_TRY_LINK(
[asm(".long _bar");
int bar;],
[],
AC_DEFINE(HAVE_SYM_PREFIX_UNDERSCORE, 1, [Define this if C symbols
are prefixed with an underscore]) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
--
Ozkan
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public