From: Antony T Curtis Date: December 5 2000 10:03am Subject: Compile options List-Archive: http://lists.mysql.com/internals/184 Message-Id: <3A2CBD80.C7785507@abacus.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Since most people would be using GCC 2.95.x nowadays, I think it should be a good idea to change the default optimisation level in the configure.in file from "-O6" to "-O2"... In the 2.95.x compiler, setting -O3 can cause dangerous optimisations which would break applications. The "-O6" option only made any sense on the old 2.7 compilers. However, enabling "-fexpensive-optimizations" would appear to be relatively safe. Also - here are some additional tips for compiling for 64bittyness under AIX using GCC 2.95 (I already change the configure.in and run autoconf) $ OBJECT_MODE=64 \ > CC="gcc -pipe -maix64 -Wa,-many" \ > CXX="g++ -pipe -maix64 -Wa,-many" \ > CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti" \ > MAKE="gmake" \ > ./configure --without-docs --without-debug --with-low-memory to compile, the libtool shell script has to me modified, adding "-maix64" after the two instances where "-shared" occour and then to compile, simply run $ OBJECT_MODE=64 gmake (GNU make must be used, IBM make fails) Surprisingly enough, the compiled output is a smaller than the 32-bit version. Response times appear to be good however I haven't had much time to do objective comparisons with the 32bit binaries. (IBM's POWER architecture appears to use 32bit fixed length instructions which may account for the smaller binaries) The latest version of AIX shouldn't need the "-Wa,-many" option but since all it does is disable the opcode verification within IBM's assembler, it should be harmless and it avoids the bugs in the older AIX assemblers. -- ANTONY T CURTIS Tel: +44 (1635) 36222 Abacus Polar Holdings Ltd Fax: +44 (1635) 38670 > "An ounce of prevention is worth a pound of purge."