Cross compiler CFLAGS thought

What’s the difference between mtune and mcpu. I’ve seen some that say to use mtune and I’ve been using mcpu.

Advertisements
This entry was posted in Embedded, Linux and tagged , . Bookmark the permalink.

2 Responses to Cross compiler CFLAGS thought

  1. W says:

    -mcpu is the old way to specify both architecture and optimization target.
    Nowadays, you say -march=i686 to use i686 instructions, and -mtune=core2 to optimize the code for a Intel core 2. Use mtune for optimization, and mcpu to define the oldest architecture that can run your executable.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s