Description of problem: Compilation of dietlibc in devel branch fails on PPC machine at code like | 36 #define B0 + 1.0l/ 6/ 1/ 2 | ... | 50 static const double coeff[] = { B0, ... }; The error message is | libm/gamma.c:50: error: initializer element is not constant | libm/gamma.c:50: error: (near initialization for 'coeff[0]') This code looks sane to me, it builds fine on i386 and I do not have a PPC machine where I can trace it down further. Therefore, an | ExcludeArch: ppc Version-Release number of selected component (if applicable): dietlibc-0.29-5
If there's a compiler problem, please make sure a GCC bug is filed. It seems that this test case doesn't compile: static const double coeff[] = { +854513.0l /138 };
Removing the 'l' from the definitions of B0-B12 in libm/gamma.c seems to work around this problem. Does that result in any loss of precision? I don't think so.
I do not want to file GCC bugs without a (minimal) reproducer. I asked on fedora-devel maillist at 2006-02-18 for help about this issue but did not got a response. So, the fastest way to solve this problem would be when a PPC user files a GCC bug with a minimal program, gcc cmdline, gcc version and error message.
It is better to file the GCC bug with the whole preprocessed source for the offending file than not to file it at all. It was trivial to pare it down to a one-line test case. I can also provide you with access to PPC machines if you need it, if you _really_ wanted to make the minimal test case for yourself. Sorry I didn't see your mail on the fedora-devel list; please feel free to Cc me directly for PPC issues in future -- although I've also added myself to Cc for the ppc-excludearch tracker bug. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27054
Any progress on fixing this in FC5 GCC? We do also have a workaround which would allow dietlibc to build anyway.
Created attachment 144464 [details] Workaround Is there any particular reason why this workaround, which was identified eight months ago, has not yet been applied?
Fixed (well, worked around) in 0.30-4 for FC-6 and devel (the system thought that 0.30-3.fc6 already existed). Fixing the GCC bug would be useful though.