ITEEDU

2.12.5.1. HP-UX 10.20版注意事项

在HP-UX上编译MySQL时,有一些“小”问题。我们推荐您使用gcc而不是HP-UX自己的编译器,因为gcc可以生成更好的代码!

我们推荐在HP-UX上使用gcc 2.95,不使用高度优化标志(类似-O6),因为这在HP-UX 上可能不安全。

下面的configure行在gcc 2.95中应当工作:

CFLAGS="-I/opt/dce/include -fpic" \
CXXFLAGS="-I/opt/dce/include -felide-constructors -fno-exceptions \
-fno-rtti" \
CXX=gcc \
./configure --with-pthread \
    --with-named-thread-libs='-ldce' \
    --prefix=/usr/local/mysql --disable-shared

下面的configure行在gcc 3.1中应当工作:

CFLAGS="-DHPUX -I/opt/dce/include -O3 -fPIC" CXX=gcc \
CXXFLAGS="-DHPUX -I/opt/dce/include -felide-constructors \
    -fno-exceptions -fno-rtti -O3 -fPIC" \
./configure --prefix=/usr/local/mysql \
    --with-extra-charsets=complex --enable-thread-safe-client \
    --enable-local-infile  --with-pthread \
    --with-named-thread-libs=-ldce --with-lib-ccflags=-fPIC
    --disable-shared