Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
5edd78e7
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
1 年多 前同步成功
通知
460
Star
414
Fork
55
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos A
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5edd78e7
编写于
8月 09, 2021
作者:
O
openharmony_ci
提交者:
Gitee
8月 09, 2021
浏览文件
操作
浏览文件
下载
差异文件
!513 fix: clang相关编译选项隔离
Merge pull request !513 from MGY917/clang_isolation
上级
ba16cd34
77dcef4b
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
21 addition
and
5 deletion
+21
-5
apps/mksh/Makefile
apps/mksh/Makefile
+10
-3
apps/toybox/Makefile
apps/toybox/Makefile
+11
-2
未找到文件。
apps/mksh/Makefile
浏览文件 @
5edd78e7
...
@@ -39,11 +39,16 @@ BUILD_DIR := $(MKSH_DIR)/build
...
@@ -39,11 +39,16 @@ BUILD_DIR := $(MKSH_DIR)/build
BUILD_LOG
:=
$(MKSH_DIR)
/build.log
BUILD_LOG
:=
$(MKSH_DIR)
/build.log
TARGET_OS
:=
OpenHarmony
TARGET_OS
:=
OpenHarmony
LOCAL_CFLAGS
:=
-flto
-fdata-sections
-ffunction-sections
-Oz
-fstack-protector-strong
-D_FORTIFY_SOURCE
=
2
LOCAL_CFLAGS
:=
-flto
-fdata-sections
-ffunction-sections
-fstack-protector-strong
-D_FORTIFY_SOURCE
=
2
LOCAL_CFLAGS
+=
--target
=
$(LLVM_TARGET)
$(LLVM_SYSROOT)
LOCAL_CFLAGS
+=
-DMKSH_DISABLE_TTY_WARNING
-DMKSH_SMALL
=
1
-DMKSH_ASSUME_UTF8
=
1
-DMKSH_SMALL_BUT_FAST
=
0
-DMKSH_S_NOVI
=
1
-DHAVE_CAN_FSTACKPROTECTORSTRONG
=
1
LOCAL_CFLAGS
+=
-DMKSH_DISABLE_TTY_WARNING
-DMKSH_SMALL
=
1
-DMKSH_ASSUME_UTF8
=
1
-DMKSH_SMALL_BUT_FAST
=
0
-DMKSH_S_NOVI
=
1
-DHAVE_CAN_FSTACKPROTECTORSTRONG
=
1
LOCAL_CFLAGS
+=
-DMKSH_LESS_CMDLINE_EDITING
-DMKSH_LESS_BUILDINS
-DMKSH_NO_INITCOMS
-DADAPT_FOR_LITEOS_A
LOCAL_CFLAGS
+=
-DMKSH_LESS_CMDLINE_EDITING
-DMKSH_LESS_BUILDINS
-DMKSH_NO_INITCOMS
-DADAPT_FOR_LITEOS_A
LOCAL_LDFLAGS
:=
-Wl
,--gc-sections
-flto
-O2
--target
=
$(LLVM_TARGET)
$(LLVM_SYSROOT)
LOCAL_LDFLAGS
:=
-Wl
,--gc-sections
-flto
-O2
ifeq
($(LOSCFG_COMPILER_CLANG_LLVM), y)
LOCAL_CFLAGS
+=
-Oz
--target
=
$(LLVM_TARGET)
$(LLVM_SYSROOT)
else
LOCAL_CFLAGS
+=
-O2
endif
all
:
$(MKSH)
all
:
$(MKSH)
...
@@ -64,8 +69,10 @@ endif
...
@@ -64,8 +69,10 @@ endif
$(HIDE)$(CP)
$(MKSH)
$(APPS_OUT)
$(HIDE)$(CP)
$(MKSH)
$(APPS_OUT)
$(HIDE)
mkdir
-p
$(ETC_OUT)
$(HIDE)
mkdir
-p
$(ETC_OUT)
$(HIDE)$(CP)
-rf
$(BUILD_DIR)
/.mkshrc
$(ETC_OUT)
/
$(HIDE)$(CP)
-rf
$(BUILD_DIR)
/.mkshrc
$(ETC_OUT)
/
$(HIDE)$(RM)
$(BUILD_DIR)
$(BUILD_LOG)
clean
:
clean
:
$(HIDE)$(RM)
$(MKSH)
$(BUILD_DIR)
$(BUILD_LOG)
$(HIDE)$(RM)
$(MKSH)
$(BUILD_DIR)
$(BUILD_LOG)
.PHONY
:
all $(MKSH) clean
.PHONY
:
all $(MKSH) clean
apps/toybox/Makefile
浏览文件 @
5edd78e7
...
@@ -38,6 +38,13 @@ BUILD_DIR := $(TOYBOX_DIR)/build
...
@@ -38,6 +38,13 @@ BUILD_DIR := $(TOYBOX_DIR)/build
BUILD_LOG
:=
$(TOYBOX_DIR)
/build.log
BUILD_LOG
:=
$(TOYBOX_DIR)
/build.log
OUTNAME
:=
$(TOYBOX)
OUTNAME
:=
$(TOYBOX)
CFLAGS
:=
-D_FORTIFY_SOURCE
=
2
-fstack-protector-strong
LDFLAGS
:=
ifeq
($(LOSCFG_COMPILER_CLANG_LLVM), y)
CFLAGS
+=
--target
=
$(LLVM_TARGET)
$(LLVM_SYSROOT)
LDFLAGS
+=
--target
=
$(LLVM_TARGET)
$(LLVM_SYSROOT)
endif
$(TOYBOX)
:
$(TOYBOX)
:
ifneq
($(wildcard $(BUILD_DIR)),)
ifneq
($(wildcard $(BUILD_DIR)),)
$(HIDE)
echo
"not clean, rebuilding now"
;
$(HIDE)
echo
"not clean, rebuilding now"
;
...
@@ -46,12 +53,14 @@ else
...
@@ -46,12 +53,14 @@ else
$(HIDE)$(CP)
$(LITEOSTHIRDPARTY)
/
$(TOYBOX)
/.
$(BUILD_DIR)
$(HIDE)$(CP)
$(LITEOSTHIRDPARTY)
/
$(TOYBOX)
/.
$(BUILD_DIR)
$(HIDE)$(CP)
-p
$(LITEOSTHIRDPARTY)
/
$(TOYBOX)
/porting/liteos_a/.
$(BUILD_DIR)
$(HIDE)$(CP)
-p
$(LITEOSTHIRDPARTY)
/
$(TOYBOX)
/porting/liteos_a/.
$(BUILD_DIR)
endif
endif
$(HIDE)CFLAGS
=
"-D_FORTIFY_SOURCE=2 -fstack-protector-strong --target=
$(LLVM_TARGET)
$(LLVM_SYSROOT)
"
CC
=
"
$(CC)
"
OUTNAME
=
$(OUTNAME)
\
LDFLAGS
=
"--target=
$(LLVM_TARGET)
$(LLVM_SYSROOT)
"
\
$(HIDE)CFLAGS
=
"
$(CFLAGS)
"
CC
=
"
$(CC)
"
OUTNAME
=
"
$(OUTNAME)
"
\
LDFLAGS
=
"
$(LDFLAGS)
"
STRIP
=
"
$(STRIP)
"
\
make
-C
$(BUILD_DIR)
toybox
-j
>
$(BUILD_LOG)
2>&1
make
-C
$(BUILD_DIR)
toybox
-j
>
$(BUILD_LOG)
2>&1
$(HIDE)$(CP)
$(BUILD_DIR)/$(TOYBOX)
.
$(HIDE)$(CP)
$(BUILD_DIR)/$(TOYBOX)
.
$(HIDE)mkdir
-p
$(APPS_OUT)
$(HIDE)mkdir
-p
$(APPS_OUT)
$(HIDE)$(CP)
$(TOYBOX)
$(APPS_OUT)
$(HIDE)$(CP)
$(TOYBOX)
$(APPS_OUT)
$(HIDE)$(RM)
$(BUILD_DIR)
$(BUILD_LOG)
clean
:
clean
:
$(HIDE)$(RM)
$(TOYBOX)
$(BUILD_DIR)
$(BUILD_LOG)
$(HIDE)$(RM)
$(TOYBOX)
$(BUILD_DIR)
$(BUILD_LOG)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录