First test version of the compiler c++/g++ version 4.1.3 for QNX 6.3.0

Submitted by bbceler on

First test version of the compiler c ++/ g ++ 4.1.3 for QNX 6.3.0, built on the base gcc-g++-4.1-20070604 (prerelease) is now available at http://www.ajam.org.pl/
# gcc --version
gcc (GCC) 4.1.3 20070604 (prerelease)
# c++ --version
c++ (GCC) 4.1.3 20070604 (prerelease)

This is the example of the compilation
--------------------------------------
# cat pr3.cc
#include
#include
#include
#include

class outbuf : public std::streambuf
{
protected:
/* central output function
* - print characters in uppercase mode
*/
virtual int_type overflow (int_type c) {
if (c != EOF) {
// convert lowercase to uppercase
c = std::toupper(static_cast(c),getloc());

// and write the character to the standard output
if (putchar(c) == EOF) {
return EOF;
}
}
return c;
}
};

int main()
{
// create special output buffer
outbuf ob;
// initialize output stream with that output buffer
std::ostream out(&ob);

out "31 hexadecimal: "
std::hex 31 std::endl;
return 0;
}

# g++ -v -o pr3 pr3.cc
Using built-in specs.
Target: i386-pc-nto-qnx6.3.0
Configured with: /src/gcc-4.1-20070604/configure --srcdir=/src/gcc-4.1-20070604 --program-suffix=4.1.3
--enable-version-specific-runtime-libs --enable-languages=c,c++,ada,fortran,objc,obj-c++
--enable-threads=posix --enable-shared --enable-libssp --enable-libada --disable-werror
--with-included-gettext --with-libiconv-prefix=/usr/local --cache-file=Cashe.log
Thread model: posix
gcc version 4.1.3 20070604 (prerelease)
/usr/local/libexec/gcc/i386-pc-nto-qnx6.3.0/4.1.3/cc1plus -quiet -v -nostdinc -nostdinc++
-isystem /usr/local/lib/gcc/i386-pc-nto-qnx6.3.0/4.1.3/include/c++
-isystem /usr/local/lib/gcc/i386-pc-nto-qnx6.3.0/4.1.3/include/c++/i386-pc-nto-qnx6.3.0
-isystem /usr/local/lib/gcc/i386-pc-nto-qnx6.3.0/4.1.3/include/c++/backward
-idirafter /usr/qnx630/target/qnx6/usr/include
pr3.cc -quiet -dumpbase pr3.cc -auxbase pr3 -version -o /tmp/ccbkJpIr.s
#include "..." search starts here:
#include ...> search starts here:
/usr/local/lib/gcc/i386-pc-nto-qnx6.3.0/4.1.3/include/c++
/usr/local/lib/gcc/i386-pc-nto-qnx6.3.0/4.1.3/include/c++/i386-pc-nto-qnx6.3.0
/usr/local/lib/gcc/i386-pc-nto-qnx6.3.0/4.1.3/include/c++/backward
/usr/qnx630/target/qnx6/usr/include
End of search list.
GNU C++ version 4.1.3 20070604 (prerelease) (i386-pc-nto-qnx6.3.0)
compiled by GNU C version 4.1.3 20070604 (prerelease).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 0ba1a88cbabcebd22c3904fced6baada
/usr/local/lib/gcc/i386-pc-nto-qnx6.3.0/4.1.3/../../../../i386-pc-nto-qnx6.3.0/bin/as -V -Qy
-o /tmp/cc1Pzieg.o /tmp/ccbkJpIr.s
GNU assembler version 2.17 (i386-pc-nto-qnx6.3.0) using BFD version 2.17
/usr/local/libexec/gcc/i386-pc-nto-qnx6.3.0/4.1.3/collect2 -V -Y P,/usr/qnx630/target/qnx6/x86/lib
-Qy -b elf32-i386 -m i386nto --dynamic-linker /usr/lib/ldqnx.so.2
-opr3 /usr/qnx630/target/qnx6/x86/lib/crt1.o /usr/qnx630/target/qnx6/x86/lib/crti.o
/usr/qnx630/target/qnx6/x86/lib/crtbegin.o
-L/usr/local/lib/gcc/i386-pc-nto-qnx6.3.0/4.1.3
-L/usr/local/lib/gcc/i386-pc-nto-qnx6.3.0/4.1.3/../../../../i386-pc-nto-qnx6.3.0/lib
-L/usr/local/lib/gcc/i386-pc-nto-qnx6.3.0/4.1.3/../../.. /tmp/cc1Pzieg.o
-lstdc++ -lm -lgcc
-L /usr/qnx630/target/qnx6/x86/lib
-L /usr/qnx630/target/qnx6/x86/usr/lib
-L /usr/qnx630/target/qnx6/x86/opt/lib -lc -dn -Bstatic -lc -lgcc
/usr/qnx630/target/qnx6/x86/lib/crtend.o /usr/qnx630/target/qnx6/x86/lib/crtn.o
GNU ld version 2.17
Supported emulations:
i386nto
# ./pr3
31 HEXADECIMAL: 1F
# ldd pr3
./pr3:
libstdc++.so.6 => /usr/local/lib/libstdc++.so.6 (0xb8200000)
libm.so.2 => /lib/libm.so.2 (0xb82db000)
libc.so.2 => /usr/lib/ldqnx.so.2 (0xb0300000)
#
# cat pr1.cc
#include
main( void )
{
cout "Hello .............." endl;
}
# c++ -o pr1 pr1.cc
In file included from /usr/local/lib/gcc/i386-pc-nto-qnx6.3.0/4.1.3/include/c++/backward/iostream.h:31, from pr1.cc:1:
/usr/local/lib/gcc/i386-pc-nto-qnx6.3.0/4.1.3/include/c++/backward/backward_warning.h:32:2: warning:
#warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header .
To disable this warning use -Wno-deprecated.
# ./pr1
Hello ..............
Press any key to continue...