libxx: Unify uClibc++ and libc++ config

code just need check CONFIG_CXX_EXCEPTION/CONFIG_CXX_LIBSUPCXX now,
instead uClibc++/libc++ specific config

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3b00a5a6701b8bf1c70de89f2d924592ca3e38b0
This commit is contained in:
Xiang Xiao
2020-06-28 23:03:57 +08:00
committed by Alan Carvalho de Assis
parent 9db5d2aeea
commit 6abd03d53f
13 changed files with 47 additions and 58 deletions
+7 -32
View File
@@ -31,10 +31,15 @@ config HAVE_CXXINITIALIZE
toolchain (via up_cxxinitialize()).
config CXX_EXCEPTION
bool
bool "Enable Exception Support"
default LIBCXX || UCLIBCXX
config CXX_LIBSUPCXX
bool
bool "Have libsupc++ (required)"
default LIBCXX || UCLIBCXX
---help---
Select if your toolchain provides libsupc++. This option is required
at present because the built-in libsupc++ support is incomplete.
comment "LLVM C++ Library (libcxx)"
@@ -49,23 +54,6 @@ config LIBCXX
be built by selecting this option. See the README.txt file in the
libcxx package for information on installing libcxx.
if LIBCXX
config LIBCXX_EXCEPTION
bool "Enable Exception Support"
default y
select CXX_EXCEPTION
config LIBCXX_HAVE_LIBSUPCXX
bool "Have libsupc++ (required)"
default y
select CXX_LIBSUPCXX
---help---
Select if your toolchain provides libsupc++. This option is required
at present because the built-in libsupc++ support is incomplete.
endif
comment "uClibc++ Standard C++ Library"
config UCLIBCXX
@@ -78,22 +66,9 @@ config UCLIBCXX
if UCLIBCXX
config UCLIBCXX_EXCEPTION
bool "Enable Exception Support"
default y
select CXX_EXCEPTION
config UCLIBCXX_IOSTREAM_BUFSIZE
int "IO Stream Buffer Size"
default 32
config UCLIBCXX_HAVE_LIBSUPCXX
bool "Have libsupc++ (required)"
default y
select CXX_LIBSUPCXX
---help---
Select if your toolchain provides libsupc++. This option is required
at present because the built-in libsupc++ support is incomplete.
endif
endif
+4 -14
View File
@@ -35,17 +35,7 @@
include $(TOPDIR)/Make.defs
CXXSRCS = libxx_cxapurevirtual.cxx libxx_eabi_atexit.cxx libxx_cxa_atexit.cxx
CXXSRCS += libxx_cxa_guard.cxx
# Some of the libs/libxx/ files are not need if uClibc++ or libcxx is installed
# because uClibx++ or libcxx will replace them
ifeq (,$(findstring y,$(CONFIG_UCLIBCXX) $(CONFIG_LIBCXX)))
CXXSRCS += libxx_delete.cxx libxx_delete_sized.cxx libxx_deletea.cxx
CXXSRCS += libxx_deletea_sized.cxx libxx_new.cxx libxx_newa.cxx
CXXSRCS += libxx_stdthrow.cxx
endif
CXXSRCS = libxx_cxa_atexit.cxx libxx_eabi_atexit.cxx
# Include the uClibc++ Make.defs file if selected. If it is included,
# the uClibc++/Make.defs file will add its files to the source file list,
@@ -59,10 +49,10 @@ endif
ifeq ($(CONFIG_UCLIBCXX),y)
include uClibc++/Make.defs
endif
ifeq ($(CONFIG_LIBCXX),y)
else ifeq ($(CONFIG_LIBCXX),y)
include libcxx/Make.defs
else
include cxx.defs
endif
# Object Files
+24
View File
@@ -0,0 +1,24 @@
############################################################################
# libs/libxx/cxx.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
###########################################################################
CXXSRCS += libxx_cxa_guard.cxx libxx_cxapurevirtual.cxx
CXXSRCS += libxx_delete.cxx libxx_delete_sized.cxx libxx_deletea.cxx
CXXSRCS += libxx_deletea_sized.cxx libxx_new.cxx libxx_newa.cxx
CXXSRCS += libxx_stdthrow.cxx