Re: Building MySQL under low-memory (VPS) conditions?
The build uses "GNU autotools", and that change how you work
with CFLAGS a bit. First of all, you set the flags when
you configure, like
CC=gcc CFLAGS=-O1 CXX=gcc CXXFLAGS=-O1 ./configure ......
i.e. on one row. You can of course do it as you did as
well, exporting it in the current environment, but not
really needed, and will in any case only affect the
configure, not the call to make.
Note the CXX=gcc, you can compile the MySQL sources using
CXX=gcc instead of CXX=g++. What it means is that C++ code
is compiled without dependencies on C++ runtime libraries.
This doesn't work with other compilers than gcc.
The GNU autotools (automake in this case) allows to override
CFLAGS, CXXFLAGS and LDFLAGS, but then you have to use
make AM_CFLAGS="-O1" AM_CXXFLAGS="-O1"
as CFLAGS and CXXFLAGS are kind of internal to the GNU
autotools magic, This also doesn't work for all make
programs, with gnu make the flags are passed on to
the make calls in sub directories,
kent
Kent Boortz, Release Staff Engineer
Oracle, the MySQL team, www.mysql.com