!198 重构kal/posix的BUILD.gn编译脚本,添加对musl c库的依赖

Merge pull request !198 from Caoruihong/liteos_m_build_gn
This commit is contained in:
openharmony_ci 2021-06-28 00:35:34 +00:00 committed by Gitee
commit 59225cb6df
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 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
config("include") {
include_dirs = [ "include" ]
}
static_library("posix") { static_library("posix") {
sources = [ sources = [
"src/errno.c", "src/errno.c",
"src/libc.c", "src/libc.c",
"src/malloc.c", "src/malloc.c",
"src/mqueue.c",
"src/pthread.c", "src/pthread.c",
"src/pthread_attr.c", "src/pthread_attr.c",
"src/pthread_cond.c", "src/pthread_cond.c",
"src/pthread_mutex.c", "src/pthread_mutex.c",
"src/semaphore.c", "src/semaphore.c",
"src/time.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_dirs = [
"include",
"../../kernel/arch/include", "../../kernel/arch/include",
"../../kernel/include", "../../kernel/include",
"../../utils", "../../utils",
] ]
public_configs = [ ":include" ] public_configs = [ ":include" ]
}
config("include") { public_deps = [
include_dirs = [ "//third_party/musl/porting/liteos_m/kernel",
"include", "//third_party/bounds_checking_function:libsec_static",
"//third_party/musl/porting/liteos_m/kernel/include",
"//third_party/bounds_checking_function/include",
] ]
} }

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);
}