[Slackbuilds-users] Desmume on 64-bit - optimization flag

Matteo Bernardini matteo.bernardini at gmail.com
Thu Jan 24 06:49:50 UTC 2013


A small thought: the problem setting ARCH=native is that the final package
will be called something like foo-1.1-native-1_SBo, while it should have a
name dependant on the minimum CPU where it will run (like Stuart is doing
on arm).

To get the CFLAGS selected by -march=native, for a possible use like
XGizzmo suggest, I use here this dirty trick

$ gcc -### -e -v -march=native /usr/include/stdlib.h 2>&1 | tail -1 | sed
"s|.*\"-march=|\"-march=|" | sed "s|\ -quiet\ .*||"
"-march=corei7-avx" -mcx16 -msahf -mno-movbe -mno-aes -mpclmul -mpopcnt
-mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm
-mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rdrnd -mno-f16c
-mno-fsgsbase --param "l1-cache-size=32" --param "l1-cache-line-size=64"
--param "l2-cache-size=3072" "-mtune=corei7-avx"

In theory, the resulting package built specifying these CFLAGS should be
called foo-1.1-corei7_avx-1_SBo (note the use of underscore in the ARCH to
avoid confusing pkgtool).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20130124/2816f61a/attachment-0001.html>


More information about the SlackBuilds-users mailing list