aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2017-05-11 10:00:03 -0700
committerGravatar GitHub <noreply@github.com>2017-05-11 10:00:03 -0700
commit6d06776a126d90437361dcb295758a717d4b866d (patch)
tree59f1a6529508dda9cb820eef448ebd72922f3b51
parent8bab30dc7c6cdc5f6ae704171557c2e71e01c88d (diff)
parent6974763268e131addec3e64f25b6758f34e76c98 (diff)
Merge pull request #10963 from vjpai/remake
Stop checking for pre-c++11 compilers since these are no longer supported
-rw-r--r--Makefile8
-rw-r--r--templates/Makefile.template8
-rw-r--r--test/build/c++11.cc52
3 files changed, 0 insertions, 68 deletions
diff --git a/Makefile b/Makefile
index 1a8ee553ca..b28c0fb9e1 100644
--- a/Makefile
+++ b/Makefile
@@ -308,10 +308,6 @@ else
TMPOUT = `mktemp /tmp/test-out-XXXXXX`
endif
-# Detect if we can use C++11
-CXX11_CHECK_CMD = $(CXX) -std=c++11 -o $(TMPOUT) -c test/build/c++11.cc
-HAS_CXX11 = $(shell $(CXX11_CHECK_CMD) 2> /dev/null && echo true || echo false)
-
CHECK_SHADOW_WORKS_CMD = $(CC) -std=c99 -Werror -Wshadow -o $(TMPOUT) -c test/build/shadow.c
HAS_WORKING_SHADOW = $(shell $(CHECK_SHADOW_WORKS_CMD) 2> /dev/null && echo true || echo false)
ifeq ($(HAS_WORKING_SHADOW),true)
@@ -342,11 +338,7 @@ HOST_LD ?= $(LD)
HOST_LDXX ?= $(LDXX)
CFLAGS += -std=c99 -Wsign-conversion -Wconversion $(W_SHADOW) $(W_EXTRA_SEMI)
-ifeq ($(HAS_CXX11),true)
CXXFLAGS += -std=c++11
-else
-CXXFLAGS += -std=c++0x
-endif
CPPFLAGS += -g -Wall -Wextra -Werror -Wno-long-long -Wno-unused-parameter -DOSATOMIC_USE_INLINED=1
LDFLAGS += -g
diff --git a/templates/Makefile.template b/templates/Makefile.template
index 5ce606f828..a9dd171b84 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -206,10 +206,6 @@
TMPOUT = `mktemp /tmp/test-out-XXXXXX`
endif
- # Detect if we can use C++11
- CXX11_CHECK_CMD = $(CXX) -std=c++11 -o $(TMPOUT) -c test/build/c++11.cc
- HAS_CXX11 = $(shell $(CXX11_CHECK_CMD) 2> /dev/null && echo true || echo false)
-
%for warning in CHECK_WARNINGS:
${warning_var('CHECK_%s_WORKS_CMD', warning)} = $(CC) -std=c99 -Werror -W${warning} -o $(TMPOUT) -c test/build/${warning}.c
${warning_var('HAS_WORKING_%s', warning)} = $(shell $(${warning_var('CHECK_%s_WORKS_CMD', warning)}) 2> /dev/null && echo true || echo false)
@@ -230,11 +226,7 @@
HOST_LDXX ?= $(LDXX)
CFLAGS += -std=c99 -Wsign-conversion -Wconversion ${' '.join(warning_var('$(W_%s)', warning) for warning in PREFERRED_WARNINGS)}
- ifeq ($(HAS_CXX11),true)
CXXFLAGS += -std=c++11
- else
- CXXFLAGS += -std=c++0x
- endif
% for arg in ['CFLAGS', 'CXXFLAGS', 'CPPFLAGS', 'LDFLAGS', 'DEFINES']:
% if defaults.get('global', []).get(arg, None) is not None:
${arg} += ${defaults.get('global').get(arg)}
diff --git a/test/build/c++11.cc b/test/build/c++11.cc
deleted file mode 100644
index 4822a20e7f..0000000000
--- a/test/build/c++11.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-/* This is just a compilation test, to see if we have C++11. */
-
-#include <stdlib.h>
-#include <zlib.h>
-
-class Base {
- public:
- virtual void foo() = 0;
-};
-
-class Foo final : public Base {
- public:
- void foo() override {}
-};
-
-int main() {
- Foo().foo();
- return 0;
-}