]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[build] Fix __libgcc attribute for recent gcc versions
authorMichael Brown <mcb30@ipxe.org>
Fri, 25 Apr 2014 14:55:36 +0000 (15:55 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 25 Apr 2014 15:06:37 +0000 (16:06 +0100)
commit082cedb3c3cdc5fd5eb0c614b81a1ff2ff9499be
tree95b24f7f0948e2e1d94805da0b004069f09bd5b8
parentad7d5af5e19a016e484188a2c75818bb2d0a35db
[build] Fix __libgcc attribute for recent gcc versions

We observed some time ago (in commit 4ce8d61 "Import various libgcc
functions from syslinux") that gcc seems to treat calls to the
implicit arithmetic functions (e.g. __udivdi3()) as being affected by
-mregparm but unaffected by -mrtd.

This seems to be no longer the case with current gcc versions, which
treat calls to these functions as being affected by both -mregparm and
-mrtd, as expected.

There is nothing obvious in the gcc changelogs to indicate precisely
when this happened.  From experimentation with available gcc versions,
the change occurred sometime between v4.6.3 and v4.7.2.  We assume
that only versions up to v4.6.x require the special treatment.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/i386/include/bits/compiler.h