Skip to content

Commit 4b4b176

Browse files
committed
v8: cherry-pick uclibc build patch from upstream
Original commit log follows: Restore V8_LIBC_UCLIBC as a libc option. As uClibc defines __GLIBC__ in an attempt to look like glibc, V8_LIBC_GLIBC was true for uClibc as well. Checking for uClibc before glibc fixes this and restores the correct behavior. Review URL: https://codereview.chromium.org/1066573005 Fixes: #1432 PR-URL: #1974 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
1 parent 74fdf73 commit 4b4b176

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

deps/v8/include/v8config.h

+4
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
// V8_LIBC_BIONIC - Bionic libc
125125
// V8_LIBC_BSD - BSD libc derivate
126126
// V8_LIBC_GLIBC - GNU C library
127+
// V8_LIBC_UCLIBC - uClibc
127128
//
128129
// Note that testing for libc must be done using #if not #ifdef. For example,
129130
// to test for the GNU C library, use:
@@ -136,6 +137,9 @@
136137
#elif defined(__BIONIC__)
137138
# define V8_LIBC_BIONIC 1
138139
# define V8_LIBC_BSD 1
140+
#elif defined(__UCLIBC__)
141+
// Must test for UCLIBC before GLIBC, as UCLIBC pretends to be GLIBC.
142+
# define V8_LIBC_UCLIBC 1
139143
#elif defined(__GLIBC__) || defined(__GNU_LIBRARY__)
140144
# define V8_LIBC_GLIBC 1
141145
#else

0 commit comments

Comments
 (0)