LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   gcc: unrecognized option `-prefer-non-pic' (http://www.linuxquestions.org/questions/linux-software-2/gcc-unrecognized-option-%60-prefer-non-pic-547214/)

Noodles25 04-19-2007 12:46 AM

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

Matir 04-19-2007 01:02 AM

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'.

Noodles25 04-19-2007 01:19 AM

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 :)

Noodles25 04-19-2007 08:44 PM

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.


All times are GMT -5. The time now is 06:04 AM.