This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

global constructor problems in 1.0.1


Checking out the problems I reported with gperf, it looks like none of
the compilers I built call global constructors.  The compilers I built
are configured a bit oddly, they think that they are cross-compilers
even though they are native, so I assume this must be something to do
with that.

Running the following test program always fails when compiled with
egcs-1.0.1 on my various platforms:

	#include <stdio.h>

	struct x {
		x()
		{
			printf("constructor called\n");
		}
	};

	x xxx;

	int
	main()
	{
		x *y = &xxx;
		return(0);
	}

As I check, I tried the aix 3 native c++ compiler, it works fine.

The output from

   gcc -v -o temp.exe temp.C

is attached.  Any ideas?

Joe Buehler

Reading specs from /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/specs
gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)
 /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=90 -D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_IBMR2 -D_POWER -D_AIX -D_AIX32 -Asystem(unix) -Asystem(aix) -Acpu(rs6000) -Amachine(rs6000) -D__EXCEPTIONS -D__CHAR_UNSIGNED__ -D_ARCH_PWR temp.C /tmp/ccsqkCzR.ii
GNU CPP version egcs-2.90.23 980102 (egcs-1.0.1 release)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++
 /usr/local/lib/g++-include
 /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/include
 /usr/local/rs6000-ibm-aix3.2.5/include
End of search list.
 /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/cc1plus /tmp/ccsqkCzR.ii -quiet -dumpbase temp.cc -version -o /tmp/ccsqkCzR.s
GNU C++ version egcs-2.90.23 980102 (egcs-1.0.1 release) (rs6000-ibm-aix3.2.5) compiled by GNU C version egcs-2.90.23 980102 (egcs-1.0.1 release).
 /usr/local/rs6000-ibm-aix3.2.5/bin/as -u -mpwr -o /tmp/ccsqkCzR1.o /tmp/ccsqkCzR.s
 /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/ld -debug -T512 -H512 -btextro -bhalt:4 -bnodelcsect -o temp.exe /usr/local/rs6000-ibm-aix3.2.5/lib/crt0.o -L/usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23 -L/usr/local/rs6000-ibm-aix3.2.5/lib /tmp/ccsqkCzR1.o /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/libgcc.a -lc /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/libgcc.a
collect2 version egcs-2.90.23 980102 (egcs-1.0.1 release)
ld_file_name        = /usr/local/rs6000-ibm-aix3.2.5/bin/ld
c_file_name         = /usr/local/rs6000-ibm-aix3.2.5/bin/gcc
nm_file_name        = /usr/local/rs6000-ibm-aix3.2.5/bin/nm
strip_file_name     = /usr/local/rs6000-ibm-aix3.2.5/bin/strip
c_file              = /tmp/cch7UBmj.c
o_file              = /tmp/cch7UBmj.o
COLLECT_NAMES       = /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/ld
COLLECT_GCC_OPTIONS = '-v' '-o' 'temp.exe'
COLLECT_GCC         = gcc
COMPILER_PATH       = /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/:/usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/:/usr/lib/gcc/rs6000-ibm-aix3.2.5/egcs-2.90.23/:/usr/lib/gcc/rs6000-ibm-aix3.2.5/:/usr/local/rs6000-ibm-aix3.2.5/bin/rs6000-ibm-aix3.2.5/egcs-2.90.23/:/usr/local/rs6000-ibm-aix3.2.5/bin/
LIBRARY_PATH        = /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/:/usr/lib/gcc/rs6000-ibm-aix3.2.5/egcs-2.90.23/:/usr/local/rs6000-ibm-aix3.2.5/lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/:/usr/local/rs6000-ibm-aix3.2.5/lib/

/usr/local/rs6000-ibm-aix3.2.5/bin/ld -T512 -H512 -btextro -bhalt:4 -bnodelcsect -o temp.exe /usr/local/rs6000-ibm-aix3.2.5/lib/crt0.o -L/usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23 -L/usr/local/rs6000-ibm-aix3.2.5/lib /tmp/ccsqkCzR1.o /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/libgcc.a -lc /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/libgcc.a
[Leaving /tmp/cch7UBmj.x]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]