]> granicus.if.org Git - gc/commitdiff
Fix 'missing libc-version.h' build error (uClibc/x86[_64])
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sun, 28 May 2017 18:21:09 +0000 (20:21 +0200)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 30 May 2017 08:49:05 +0000 (11:49 +0300)
(fix commit 3d34255)

uClibc defines __GLIBC__ but does not contain libc-version.h file.

* include/private/gcconfig.h [(I386 || X86_64) && LINUX && __GLIBC__]
(GLIBC_2_19_TSX_BUG): Do not define (and do not include
gnu/libc-version.h) if __UCLIBC__.

include/private/gcconfig.h

index 77bc00af07367f3e512eb51886c6a84e7a972c60..00f4713ad6fb41ee577e6e989caeb4819248451b 100644 (file)
 #         define GC_PREFETCH_FOR_WRITE(x) \
             __asm__ __volatile__ ("prefetchw %0" : : "m"(*(char *)(x)))
 #       endif
-#       if defined(__GLIBC__)
+#       if defined(__GLIBC__) && !defined(__UCLIBC__)
           /* Workaround lock elision implementation for some glibc.     */
 #         define GLIBC_2_19_TSX_BUG
 #         include <gnu/libc-version.h> /* for gnu_get_libc_version() */
           /* FIXME: This seems to be fixed in GLibc v2.14.              */
 #         define GETCONTEXT_FPU_EXCMASK_BUG
 #       endif
-#       if defined(__GLIBC__)
+#       if defined(__GLIBC__) && !defined(__UCLIBC__)
           /* Workaround lock elision implementation for some glibc.     */
 #         define GLIBC_2_19_TSX_BUG
 #         include <gnu/libc-version.h> /* for gnu_get_libc_version() */