Hylafax Mailing List Archives

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

./configure problems on Solaris 2.5.1 with SunPro compilers, more...



I have done more research.  I find that if I leave config.site alone
(leaving gcc as the default compiler) and instead, use this command
line...

$ ./configure --with-CC=cc --with-CXX=CC
[... stuff deleted ...]

Broken C++ handling of global constructors (CC//opt/SUNWspro/bin/CC).
 
Compilation or execution of the following test program failed:
 
----------------------------------------------------------
class foo {
private:
    int a;
public:
    foo() { a = -1; }
    int isInitialized() { return a == -1; }
};
static foo instanceOfFoo;
int main() { return instanceOfFoo.isInitialized() ? 0 : 1; }
----------------------------------------------------------
 
This program tests whether or not the C++ compilation support properly
handles global static variables with constructors.  A working C++
compilation environment is expected to arrange that global variables
that have a constructor function (foo::foo() above) be called prior to
the start of main().  HylaFAX will not operate properly if the C++
compilation environment does not correctly implement this.


~~~~~~~~~~~~~~~~~~~~

When I compile this same sample by hand, it works. (ie. the exit code
of the compiled program is 0...

$ CC test.cc
$ ./a.out
$ echo $?
0
$



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services