bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Cygwin64 Build Errors


From: Juergen Sauermann
Subject: Re: [Bug-apl] Cygwin64 Build Errors
Date: Sun, 16 Aug 2015 16:40:38 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi,

in principle yes. I already had that check in configure.ac in  SVN 185:

# check if compiler knows -rdynamic
#
AC_MSG_CHECKING([whether $CXX accepts -rdynamic])
apl_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-rdynamic"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], 
 [CAN_rdynamic=yes], [CAN_rdynamic=no])
CXXFLAGS=$apl_save_CXXFLAGS
if test "x$CAN_rdynamic" = "xyes"; then
AC_SUBST([CXX_RDYNAMIC], ["-rdynamic"])
fi
AC_MSG_RESULT([$CAN_rdynamic])
But somehow that check didn't work (the check succeeded but the subsequent make failed,
I believe for clang). But maybe I was simply missing -Werror -Wall in the CXXFLAGS of ./configure.

We can give it another try, but someone needs to check it on his machine because on mine.
it always works. I believe the proper check should be something like:

# check if compiler knows -rdynamic
#
AC_MSG_CHECKING([whether $CXX accepts -rdynamic])
apl_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-rdynamic -Werror -Wall"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], 
 [CAN_rdynamic=yes], [CAN_rdynamic=no])
CXXFLAGS=$apl_save_CXXFLAGS
if test "x$CAN_rdynamic" = "xyes"; then
AC_SUBST([CXX_RDYNAMIC], ["-rdynamic"])
fi
AC_MSG_RESULT([$CAN_rdynamic])

/// Jürgen



On 08/16/2015 03:29 PM, Elias Mårtenson wrote:
Isn't a test as simple as simply trying to compile an empty program using -rdynamic and set -Werrors. If it passes, -rdynamic works. Otherwise don't use it.

Regards,
Elias

On 16 August 2015 at 16:27, Mike Duvos <address@hidden> wrote:
Hi Jürgen,

-rdynamic passes -export-dynamic to an ELF linker.  Windows isn't ELF, so the flag is meaningless under Cygwin.

If you just change the makefile to never use -rdynamic if it detects Cygwin/Windows, all other things being equal, that should fix it for Cygwin, without breaking it on any other platforms.

Regards,

Mike





reply via email to

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