Skip to content

Commit

Permalink
v8: cherry-pick uclibc build patch from upstream
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
bnoordhuis committed Jun 14, 2015
1 parent 74fdf73 commit 4b4b176
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deps/v8/include/v8config.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
// V8_LIBC_BIONIC - Bionic libc
// V8_LIBC_BSD - BSD libc derivate
// V8_LIBC_GLIBC - GNU C library
// V8_LIBC_UCLIBC - uClibc
//
// Note that testing for libc must be done using #if not #ifdef. For example,
// to test for the GNU C library, use:
Expand All @@ -136,6 +137,9 @@
#elif defined(__BIONIC__)
# define V8_LIBC_BIONIC 1
# define V8_LIBC_BSD 1
#elif defined(__UCLIBC__)
// Must test for UCLIBC before GLIBC, as UCLIBC pretends to be GLIBC.
# define V8_LIBC_UCLIBC 1
#elif defined(__GLIBC__) || defined(__GNU_LIBRARY__)
# define V8_LIBC_GLIBC 1
#else
Expand Down

0 comments on commit 4b4b176

Please sign in to comment.