List:Internals« Previous MessageNext Message »
From:Antony T Curtis Date:December 5 2000 10:03am
Subject:Compile options
View as plain text  
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 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 and run autoconf)

> 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

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."
mysql-3.23.28 NT, binary files opened as read-onlyRoger Larsson3 Dec
  • Re: mysql-3.23.28 NT, binary files opened as read-onlySinisa Milivojevic4 Dec
  • Re: mysql-3.23.28 NT, binary files opened as read-onlySasha Pachev4 Dec
  • mysql-3.23.28 NT, binary files opened as read-onlyMichael Widenius5 Dec
  • Compile optionsAntony T Curtis5 Dec
    • Compile optionsMichael Widenius12 Dec