]> 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>
Mon, 29 May 2017 06:21:48 +0000 (09:21 +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 d7912e9e567095375ba9f270da2c7c53ba48180c..bf17dd63080b1c551a5f68b7090a0eb05e9ae58b 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() */