Currently, export DEFS="NO_ASM" is set unconditionally. Consider the following: app-arch/gzip/gzip-1.10.ebuild: src_configure() { use static && append-flags -static # avoid asm if pic if use pic ; then export DEFS="NO_ASM" fi econf --disable-gcc-warnings #663928 } Thoughts? Thanks!
Another thing I just noticed, the NEWS file in the gzip source says: "When configuring gzip, ./configure DEFS='...-DNO_ASM...' now suppresses assembler again. [bug introduced in gzip-1.3.5]" After examining the code, I found this: tailor.h: # if !defined(NO_ASM) && !defined(ASMV) NO_ASM in this context is a GCC macro, and these are called with -D in CFLAGS. The gzip developers offer you to amend CFLAGS using the DEFS variable. I believe: export DEFS="NO_ASM" is the incorrect syntax here, and from a GCC perspective, the current ebuild doesn't make much sense either. I'm pretty sure that: export DEFS="-DNO_ASM" should be used in place of it, if you really want to disable potentially non-friendly PIC code.
One additional note: On amd64 the NO_ASM option does nothing at all, because it seems gzip does not contain any amd64-optimized assembly code.
Am I misreading this? I made a forum post about this bug and they said that "NO_ASM" is conditional in this context, and is only set if "pic" USE is enabled. Line: use pic && export DEFS="NO_ASM" That does not seem conditional to me.. If it is, I don't see it.
That means "if the pic USE flag is enabled, set the DEFS variable to NO_ASM".
If the DEFS variable is set to any string containing "NO_ASM", assembly code is disabled. http://git.savannah.gnu.org/cgit/gzip.git/tree/configure.ac?h=v1.10#n210
Ah, yeah my ebuild writing style is out of date: https://devmanual.gentoo.org/ebuild-writing/use-conditional-code/index.html "forms which are occasionally seen in older code must not be used." Didn't see that. Portage should probably warn users they're using the old way of doing it. Cheers.