hauradou wrote: > Bruce Dubbs wrote: >> hauradou wrote: >> >> >>> well, the difference between a big patch and just one option to pass to >>> the compiler... >>> >> I don't consider a 49 line patch big. It is really only adding 8 lines >> and the rest is explanation. I believe the patch came from upstream. >> >> > when I look inside the patch, that's not what I see: > > Upstream Status: Not Submitted > Origin: http://www.eglibc.org/archives/patches/msg00073.html > > Looks like a patch for eglibc, written in year 2007
That's upstream or at least related to upstream. > yes. But why do you assume this method implies less optimal code ? Which > part of glibc's code would get sub-optimal? Looking more deeply, I think your method disables the assembly code completely. The error that it's fixing is: ./sysdeps/i386/fpu/s_frexp.S: Assembler messages: ./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef" Tracing that code to a macro (sysdeps/i386/sysdep.h, line 137): .ifndef __i686.get_pc_thunk.reg; Undefining __i686 is an error for the assembler just as setting to '1' is. It would lead to: .ifndef .get_pc_thunk.reg; It looks like (I am not an expert here and don't know for sure) the difference in gcc-4.5 is that the define substitutes in the line above and older version of gcc don't due to the dot after the __i686. This is a change in behavior. The patch does: +asm ("\n#if defined __i686 && defined __ASSEMBLER__"); +asm ("\n#undef __i686"); +asm ("\n#define __i686 __i686"); +asm ("\n#endif"); If undefining __i686 alone did the right thing, then the 3rd line wouldn't be needed. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page