LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-15-2006, 07:14 PM   #1
lilzz
Member
 
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

thanks
 
Old 08-15-2006, 07:16 PM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
I no expert in this but should not it be -march=k8.
 
Old 08-15-2006, 11:48 PM   #3
bulliver
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
Quote:
I no expert in this but should not it be -march=k8.
-march=pentium4 rather wouldn't you say?

Quote:
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"
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:22 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
Open Source Consulting | Domain Registration