[Mesa-dev] [PATCH 0/2] Use target attribute for architecture optimizations

Marc Dietrich marvin24 at gmx.de
Tue Jan 27 04:59:54 PST 2015


Am Freitag, 16. Januar 2015, 13:42:53 schrieb Marc Dietrich:
> The GCC specific target function attribute or pragma can be used to enable
> architecture depended optimisation options (e.g. SSE) directly in source
> files instead of specifing them on the compiler command line. This is
> useful when linking files with different compiler options which happens
> when using LTO.

no comments?

btw. I tested this series with gcc 4.8/4.9 and clang (3.6). To use lto, you 
have to disable tls, e.g. --disable-gnu-tls. There is some strange 
interference with tls/asm code/lto I'm not able to resolve to make tls 
working.

To test LTO, you have pass special flags to configure:

LTO_GCC="-flto=4 -fuse-ld=gold -fuse-linker-plugin"

CFLAGS="$LTO_GCC"
CXXFLAGS="$LTO_GCC"
LDFLAGS="$LTO_GCC"
CC="gcc-4.9"
CXX="g++-4.9"
LD="ld.gold"
AR="gcc-ar-4.9"
NM="gcc-nm-4.9"
RANLIB="gcc-ranlib-4.9"

Marc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150127/9bcb92b9/attachment.sig>


More information about the mesa-dev mailing list