diff options
| author | Daniel Jasper <djasper@google.com> | 2017-06-15 09:17:12 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2017-06-15 09:17:12 +0000 |
| commit | d07825404971669f6877cd5097cb19bd60e62288 (patch) | |
| tree | fe3d45fdf70b51dae2c71face0a464d43cb9adcf | |
| parent | d9299293adce520c1eaccbbc4c628d3e3509b674 (diff) | |
| download | llvm-d07825404971669f6877cd5097cb19bd60e62288.zip llvm-d07825404971669f6877cd5097cb19bd60e62288.tar.gz llvm-d07825404971669f6877cd5097cb19bd60e62288.tar.bz2 | |
Revert "Define _GNU_SOURCE for rtems c++"
This reverts commit r305399.
This breaks a build in libcxx:
libcxx/src/system_error.cpp:90:16: error: assigning to 'int' from incompatible type 'char *'
if ((ret = ::strerror_r(ev, buffer, strerror_buff_size)) != 0) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Which makes sense according to:
https://linux.die.net/man/3/strerror_r
Not entirely sure how this needs to be fixed.
llvm-svn: 305456
| -rw-r--r-- | clang/lib/Basic/Targets.cpp | 3 | ||||
| -rw-r--r-- | clang/test/Preprocessor/init.c | 1 |
2 files changed, 0 insertions, 4 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 3bf20fe..a3b83307 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -4734,9 +4734,6 @@ protected: Builder.defineMacro("__rtems__"); Builder.defineMacro("__ELF__"); - // Required by the libc++ locale support. - if (Opts.CPlusPlus) - Builder.defineMacro("_GNU_SOURCE"); } public: diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c index f7540a63..0bd9e97 100644 --- a/clang/test/Preprocessor/init.c +++ b/clang/test/Preprocessor/init.c @@ -8779,7 +8779,6 @@ // KFREEBSDI686-DEFINE:#define __GLIBC__ 1 // // RUN: %clang_cc1 -x c++ -triple i686-pc-linux-gnu -fobjc-runtime=gcc -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GNUSOURCE %s -// RUN: %clang_cc1 -x c++ -triple sparc-rtems-elf -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GNUSOURCE %s // GNUSOURCE:#define _GNU_SOURCE 1 // // RUN: %clang_cc1 -x c++ -std=c++98 -fno-rtti -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix NORTTI %s |
