feat: add deps to musl and securec

add deps to musl, and securec.
fwrap.c's contents are moved to musl.

Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: Ib451736798efd9745c6fbbbe5f355eea13477031
This commit is contained in:
Caoruihong 2021-06-24 11:24:15 +08:00
parent eca03e5ed6
commit bfa25fcaa3
2 changed files with 8 additions and 53 deletions

View File

@ -27,37 +27,34 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
config("include") {
include_dirs = [ "include" ]
}
static_library("posix") {
sources = [
"src/errno.c",
"src/libc.c",
"src/malloc.c",
"src/mqueue.c",
"src/pthread.c",
"src/pthread_attr.c",
"src/pthread_cond.c",
"src/pthread_mutex.c",
"src/semaphore.c",
"src/time.c",
"//third_party/musl/porting/liteos_m/kernel/src/string/strdup.c",
"//third_party/musl/porting/liteos_m/kernel/src/regex/regcomp.c",
"//third_party/musl/porting/liteos_m/kernel/src/regex/regexec.c",
"//third_party/musl/porting/liteos_m/kernel/src/regex/tre-mem.c",
]
include_dirs = [
"include",
"../../kernel/arch/include",
"../../kernel/include",
"../../utils",
]
public_configs = [ ":include" ]
}
config("include") {
include_dirs = [
"include",
"//third_party/musl/porting/liteos_m/kernel/include",
"//third_party/bounds_checking_function/include",
public_deps = [
"//third_party/musl/porting/liteos_m/kernel",
"//third_party/bounds_checking_function:libsec_static",
]
}

View File

@ -1,42 +0,0 @@
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. 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.
*
* 3. Neither the name of the copyright holder 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 HOLDER 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.
*/
#include "stdio_impl.h"
int __wrap_fclose(FILE *f)
{
return __fclose(f);
}
int __wrap_fflush(FILE *f)
{
return __fflush(f);
}