Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-15-2006, 08:14 PM   #1
Registered: Aug 2006
Posts: 73

Rep: Reputation: 15
GCC compiler option for 64 bit

original GCC makefile GCC flag
CCFLAGS=-Wall -m32 -march=i486 -Os -fomit-frame-pointer -fno-builtin -ffreestanding

modified for 64 bit
CCFLAGS=-Wall -m64 -march=i686 -Os -fomit-frame-pointer -fno-builtin -ffreestanding

error message
main.c:1: error: CPU you selected does not support x86-64 instruction set

how should I modify to make it compile for 64bit.
CPU I have is P4 2.2GHz

Old 08-15-2006, 08:16 PM   #2
Senior Member
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,595

Rep: Reputation: 98
I no expert in this but should not it be -march=k8.
Old 08-16-2006, 12:48 AM   #3
Senior Member
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
I no expert in this but should not it be -march=k8.
-march=pentium4 rather wouldn't you say?

how should I modify to make it compile for 64bit.
CPU I have is P4 2.2GHz
You are aware that the P4 isn't 64 bit right?

If you are trying to compile code on your P4 for a different (actually 64bit) machine then I suggest you start with a google search for "gcc cross compiling"


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
c compiler problem in 64-bit version. hold_breal Linux - Software 4 04-23-2006 05:45 PM
No 32-bit depth option allowed petruccigp Linux - Hardware 4 12-09-2005 11:29 AM
what does the option -s of gcc mean ? hongxing Linux - Software 3 11-28-2005 09:12 PM
64-bit Assembly Compiler for Linux? ace_bandit_1 Linux - Software 1 05-13-2005 04:52 PM
Latex compiler under 64 bit SUSE 9.2? tavisor Linux - Software 3 04-22-2005 05:36 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:37 PM.

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