LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-14-2007, 11:59 AM   #1
matsko
Member
 
Registered: Dec 2005
Posts: 51

Rep: Reputation: Disabled
GCC Flags


I am reading a book called setting up LAMP and there is a section which teaches how to install mysql from source. The source files are to be compiled, but the compilation includes flags which I don't know what they are used for, and if they are really safe to use.

CFLAGS="-03"
CXX=gcc
CXXFLAGS="-03 -mpentiumpro -mstack-align-double -felide-constructors -fno-exceptions -fno-rtti"

# then the configure script

The book says that it's mandatory to use these flags and to have a newer compiler that understands them. If not, then the MySQL server could randomly crash. I am paranoid to use them, because I do not know exactly what they are meant to do.

Can someone please tell me which flags do what and if they are safe to use.

Thanks
 
Old 05-14-2007, 12:16 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Here's a description of all the gcc flags for the latest stable release (4.1.2) http://gcc.gnu.org/onlinedocs/gcc-4....Option-Summary.
 
Old 05-14-2007, 01:23 PM   #3
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
those instructions may be valid in combination with the other optimizations used
in the book for the othr LAMP programms but only if you use exactly the versions used in the book and possibly with only the specific hardware used by the book writers.

you can give it a try one way or the other and give it some tests and if its going to be unstable you will know right away. mysql even comes with a test suite.
make test

what you posted there makes the book a bit suspect in my mind.

mostly the only necesary thing to add to the flags of mysql is
C_EXTRA_FLAGS=-fno-strict-aliasing

now the 64000 dollar question is if you need a rock solid server why not use debian or something
where the compiles have already been fully tested for both stability and security ?

building a server from scratch is not the greatest thing to be doing if you have to ask what the optimization flags do.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Qt tool for gcc flags Ephracis Programming 4 01-15-2006 01:28 AM
flags for compiling Xlib.h in gcc Maidros Programming 2 06-15-2005 05:00 AM
GCC 3.4/3.3 Optimization Flags monohouse Linux - Software 0 10-28-2004 10:48 AM
gcc Pentium3 flags in menuconfig Kristian2 Slackware - Installation 2 06-11-2004 09:49 AM
mplayer - wrong gcc flags crashmeister Linux - Software 2 11-19-2002 06:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration