MySQL Forums
Forum List  »  Source, Builds, Binaries

Re: Building MySQL under low-memory (VPS) conditions?
Posted by: Kent Boortz
Date: April 30, 2007 12:12PM

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

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Building MySQL under low-memory (VPS) conditions?
2139
April 30, 2007 12:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.