LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   gcc Pentium3 flags in menuconfig (https://www.linuxquestions.org/questions/slackware-installation-40/gcc-pentium3-flags-in-menuconfig-192003/)

Kristian2 06-10-2004 01:23 PM

gcc Pentium3 flags in menuconfig
 
when I build the Linux kernel for a Pentium3 I get '-march=i686' as compiler option in the build process while I would have expected '-march=pentium3'. And why is the option -O2 used instead of -O3?
Do I have to correct this manually?


Regards,

Kristian Keller

bulliver 06-10-2004 03:49 PM

These settings are set in the variable $CFLAGS

Here is some background from my /etc/make.conf file:
Code:

# Host and optimization settings
# ==============================
#
# For optimal performance, enable a CFLAGS setting appropriate for your CPU
#
# -mcpu=<cpu-type> means optimize code for the particular type of CPU without
# breaking compatibility with other CPUs.
#
# -march=<cpu-type> means to take full advantage of the ABI and instructions
# for the particular CPU; this will break compatibility with older CPUs (for
# example, -march=athlon-xp code will not run on a regular Athlon, and
# -march=i686 code will not run on a Pentium Classic.
#
# CPU types supported in gcc-3.2 and higher: athlon-xp, athlon-mp, athlon-4,
# athlon-tbird, athlon, k6, k6-2, k6-3, i386, i486, i586 (Pentium), i686
# (PentiumPro), pentium, pentium-mmx, pentiumpro, pentium2 (Celeron), pentium3,
# and pentium4. Note that Gentoo Linux 1.4 and higher include at least gcc-3.2.
#
# CPU types supported in gcc-2.95*: k6, i386, i486, i586 (Pentium), i686
# (Pentium Pro), pentium, pentiumpro Gentoo Linux 1.2 and below use gcc-2.95*

I am not sure where this variable gets set in slackware though....

Kristian2 06-11-2004 09:49 AM

The options in the makefile in /usr/src/linux/arch/i386 should be set cpu specific but they aren't, I changed the appropriate definition to 'pentium3', likewise for other processors.
The optimization -O3 results in a larger kernel as well, that doesn't seem to fit on a floppy and therefore fails to link. Probably not so interesting anyway.


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