[prev in list] [next in list] [prev in thread] [next in thread]
List: hpux-cxx-dev
Subject: CXX-DEV: g++ finally working
From: "DY, JERRY U (SBCSI)" <jd2419 () sbc ! com>
Date: 2004-08-14 0:57:47
Message-ID: CF5A888BE3E8BC41AE0B18ABE60C4D4780C531 () cafrfd1msgusr04 ! itservices ! sbc ! com
[Download RAW message or body]
I collected the following notes in the process of trying to get gcc
3.4.1 to work on HP-UX 11.11. I tested this and I was able to do a full
build of hundreds of thousands of lines of code previously compiled with
aC++. I've reported bug reports to the gcc bugzilla so these hacks may
not be necessary soon (hopefully).. but it still contains useful
information not in the gcc documentation. Thanks to Dennis Handly and
Martin Sebor for their help.
After untar'ing to a directory, edit the following files:
gcc-3.4.1/libstdc++-v3/include/c/std_cwchar.h
gcc-3.4.1/libstdc++-v3/include/c_std/std_cwchar.h
Find occurence of:
extern "C"
{
typedef struct
{
int __fill[6];
} mbstate_t;
}
Replace with:
#ifdef _MBSTATE_T
using ::mbstate_t;
#else
extern "C"
{
typedef struct
{
int __fill[6];
} mbstate_t;
}
#endif
Set environment variables to make sure wide characters and reentrant
functions are enabled.
export CPPFLAGS=-D_INCLUDE__STDC_A1_SOURCE -D_POSIX_C_SOURCE=199506L
export CFLAGS=-g -O2 $CPPFLAGS
Go to your object directory and run configure (change the directories as
appropriate -- this assumes that binutils been installed) and start the
build
../gcc-3.4.1/configure --prefix=/usr/local/appl/gcc
--with-as=/usr/local/appl/binutils/bin/as --enable-threads=posix
make bootstrap
On another window, go to the object directory and run the following
continuously:
find . -name wchar.h
Until wchar.h is generated. vi and replace all occurences of va_list to
__gnuc_va_list
Add the following to g++ options when compiling:
-D_INCLUDE__STDC_A1_SOURCE -D_POSIX_C_SOURCE=199506L
-Jerry
_________________________________________________________________
To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
with the message UNSUBSCRIBE cxx-dev
_________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic