]> granicus.if.org Git - clang/commitdiff
Revert "Define _GNU_SOURCE for rtems c++"
authorDaniel Jasper <djasper@google.com>
Thu, 15 Jun 2017 09:17:12 +0000 (09:17 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 15 Jun 2017 09:17:12 +0000 (09:17 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305456 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp
test/Preprocessor/init.c

index 3bf20fef5d22e439e060bc41874de95e944880ca..a3b8330707b9b7c3d87a3a14246a5a198e69a900 100644 (file)
@@ -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:
index f7540a6322fef526659e1dfb6a14b887ac7199cc..0bd9e9784599b77e036e52297ef248d02ec450c8 100644 (file)
 // 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