On Wed, 14 Jan 2015 21:59:37 +0100 "Andreas K. Huettel" <dilfri...@gentoo.org> wrote:
> That said, long time ago I was taught that "instruction set > use-flags" should be avoided as much as possible. I don't remember > the source for that anymore. > > Question to all, is that documented anywhere, and what are the > specifics? I suspect "use flags that only switch CFLAGS etc" are > forbidden, "useflags that enable assembler code etc" are allowed? > I don't think this is documented besides the fact that forcing cflags is forbidden. For asm code you don't have much choice: either your package compiles all asm and has some kind of cpu detection so that it choses the best implementation at runtime (wasting a bit of resources), either if you enable something your cpu doesn't support then your program gets killed by SIGILL. Also, this is not the case for x86* but iirc on arm, if your cflags have some -march or -mcpu then gcc forwards it to as which in turns refuses any instruction not supported by your cpu: you must disable forbidden instructions in order to build your package. Alexis.