LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 04-19-2007, 12:46 AM   #1
Noodles25
LQ Newbie
 
Registered: Apr 2007
Posts: 18

Rep: Reputation: 0
gcc: unrecognized option `-prefer-non-pic'


I'm compiling PHP 5.2.1 and trying to optimize it as much as possible by using some hints here: http://www.linux-mag.com/id/2573/

The server has a Xeon (as far as I know) and is running RHEL4 (not my choice).

I enter this command:
Code:
export CFLAGS="–march=pentium4 –O3 \
  –pipe –msse2 –mfpmath=sse,387 \
  –mmmx –fomit-frame-pointer \
  –prefer-non-pic"
And then ./configure ... (with all my modules etc), then make.

I notice throughout the compile it has this:

-I/usr/include -march=pentium4 -O3 -pipe -msse2 -mfpmath=sse,387 -mmmx -fomit-frame-pointer -prefer-non-pic -prefer-pic

And at the end it says:
gcc: unrecognized option `-prefer-non-pic'

The build succeeds, but prefer-non-pic is meant to give more performance (according to the article).

Can anyone tell me why it's not recognizing -prefer-non-pic?

TIA
 
Old 04-19-2007, 01:02 AM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
One odd thing is that the makefile includes both -prefer-non-pic and -prefer-pic...
What version of gcc are you running?

It should also be noticed that the Jeremy Garcia who wrote that article is none other than our own 'jeremy'.
 
Old 04-19-2007, 01:19 AM   #3
Noodles25
LQ Newbie
 
Registered: Apr 2007
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Matir
One odd thing is that the makefile includes both -prefer-non-pic and -prefer-pic...
What version of gcc are you running?
Code:
[root@db1 ~]# gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)
Quote:
It should also be noticed that the Jeremy Garcia who wrote that article is none other than our own 'jeremy'.
That's one of the reasons I posted here
 
Old 04-19-2007, 08:44 PM   #4
Noodles25
LQ Newbie
 
Registered: Apr 2007
Posts: 18

Original Poster
Rep: Reputation: 0
Fixed.

There was an option in my configure string that was setting it to -prefer-pic (was --use-pic). I removed it and also removed -prefer-non-pic in my CFLAGS and now it works fine.
 
  


Reply

Tags
gcc, php


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
gcc unrecognized option ruben22 Linux From Scratch 9 11-12-2008 05:41 AM
about -00 option of gcc George2 Programming 3 08-29-2006 04:28 PM
mysqld: unrecognized option `--skip-external-locking' MaulingMonkey Linux - Software 0 01-11-2005 03:01 PM
"ld unrecognized option '--as-needed'" aoe2bug Slackware 5 08-17-2004 06:59 PM
Alcatel Speedtouch: pppd[2287]: unrecognized option 'nas0' novazem Linux - Networking 1 03-16-2004 12:19 PM


All times are GMT -5. The time now is 10:19 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration