RE: State of TOOLSRC?

"Dittmar, Daniel" <[email protected]> Thu, 6 Mar 2003 16:09:32 +0100
Newsgroups gmane.comp.db.sapdb.sources
Message-ID <B9A2DDA03044D311BBD40008C75D6968147D8588@dewdfx24>
> At 11:13 Uhr +0100 5.3.2003, Dittmar, Daniel wrote:
> >The first compiler where there were actual problems was gcc 
> 3.1 for IA64
> >and they mended their ways. Compilers for Solaris, AIX, 
> HP-UX and DecUnix
> >all use sizeof (bool) == 1, otherwise, we would have fixed 
> that long ago.
> >It looks as if we have to anyway.
> 
> NetBSD 1.6 ships with gcc 2.95.3, and MacOS X 10.2 ships with 
> a hacked gcc
> 3.1 (apparently ppc support is nominal in gcc 2.xx). So it 
> looks like gcc
> in general uses whatever the CPUs natural word size is for bool.

Some versions of gcc (around 2.95) had an option -fnew-abi which resolved that problem. And version >= 3.2 seem commited to binary compatibility on the Intel platform. 

sizeof (bool) != 1 should be a problem only for bool in structs and classes. I don't know if there is an easy way to extract such type information from the debug info in the object files.

> >It's been build some time ago on Solaris/Sparc and AIX and 
> others have
> >been able to build them on Solaris/I386 and Linux/s390.
> 
> With the vendor compilers or with gcc?

Internally, we only use the vendor compiler. Our build tools are cetainly not expecting a choice of compiler (as you can see in toolvars.pl, where CFLAGS are set by choice of $OS and $MACH). There exists the script CCVers.pl, which makes the current version of the compiler available to vmake. It
might be a good idea to use these variables to check for a specific compiler.

> Can you draw the line between what would have to be 
> autoconfiscated, and
> where vmake takes over?

Even stuff that is built by vmake should #include "sapdbconfig.h" to get rid of the platform checks.

$(BUILDDIR)/envexec $(BUILDDIR) $(TOOL) perl $(TOOL)/bin/imf.pl -i -c alltools.mac
writes all the files and dependencies to stdout. Searching in this output for 
"language *'[cx]'" gives all the C and C++ files which might have to be converted to use sapdbconfig.h

Daniel Dittmar

-- 
Daniel Dittmar
SAP DB, SAP Labs Berlin
[email protected]
http://www.sapdb.org/