From: Martin Wohlert <martin@b-root-force.de>
To: gentoo-user-de@lists.gentoo.org
Subject: Re: [gentoo-user-de] Teilweise gelöst Was: Re: Update-Problem bei coreutils >= 8.25
Date: Tue, 3 Jan 2017 07:51:04 +0100 [thread overview]
Message-ID: <bcc84545-9878-13d5-e620-62c2f409f9b6@b-root-force.de> (raw)
In-Reply-To: <20170102224106.17b8fc6f@uwe-notebook>
Am 02.01.2017 um 22:41 schrieb Uwe Scholz:
> Weiß jemand, was passiert, wenn man bei den CFLAGS das march-Flag
> einfach weg lässt? Wird das dann automatisch auf das
> prozessorspezifische Flag gesetzt - in meinem Fall auf "sandybridge"?
Hallo Uwe!
Das -march Flag sorgt dafür, dass der Compiler binaries erzeugt, die
prozessorspezifische Instruktionen beinhalten können, die dann nur auf
Prozessoren laufen, die diese Instruktionen kennen. Z.B. sowas wie SSE4
Befehle.
Auf allen Prozessoren, die dann SSE4 unterstützen, würde das binary
laufen, aber halt nicht auf Prozessoren, die kein SSE4 kennen.
Wenn du das -march Flag weglässt, dann erzeugt der Compile einfache
binaries ohne derartige Instruktionen, sodass die binaries theoretisch
auf allen Prozessoren (gleicher Architektur) lauffähig sind. Es gibt
natürlich auch Programme, bei denen im Quelltext selbst noch
Inline-Assembler eingebaut ist, wo derartige Instruktionen einhalten
sein können. Dort findet aber in der Regel im Programmcode auch eine
Prüfung der CPU statt bevor derartige Befehle genutzt werden.
Anstatt des -march Flag kannst du auch das -mtune Flag verwenden, damit
bleiben deine binaries auch auf andere Prozessoren lauffähig, können
aber optimierten Code für speziell deine CPU enthalten. Die binaries
sind dadurch natürlich etwas größer.
LG
Martin
next prev parent reply other threads:[~2017-01-03 6:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-01 22:00 [gentoo-user-de] Update-Problem bei coreutils >= 8.25 Uwe Scholz
2017-01-02 7:34 ` Sven Eden
2017-01-02 21:41 ` [gentoo-user-de] Teilweise gelöst Was: " Uwe Scholz
2017-01-03 6:51 ` Martin Wohlert [this message]
2017-01-03 21:41 ` Uwe Scholz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bcc84545-9878-13d5-e620-62c2f409f9b6@b-root-force.de \
--to=martin@b-root-force.de \
--cc=gentoo-user-de@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox