提交 cba516cb 编写于 作者: O openharmony_ci 提交者: Gitee

!55 fix: 修复用户态内存调测模块开启时编译不过问题

Merge pull request !55 from Harylee/mem
......@@ -52,7 +52,10 @@ build_ext_component("build_sysroot") {
makefile = rebase_path("Makefile", exec_path)
command = "make TOPDIR=$ohos_root_path SYSROOTDIR=$sysroot_path TARGETS=$targets -f $makefile"
command += " ARCH=$arch TARGET=$target_triple ARCH_CFLAGS=\"$arch_cflags\""
command += " BUILD_DEBUG=false BUILD_ALL_MULTILIB=false CLANG=\"$ohos_current_cc_command\""
command += " BUILD_ALL_MULTILIB=false CLANG=\"$ohos_current_cc_command\""
if (ohos_build_type == "debug") {
command += " BUILD_DEBUG=true"
}
if (ohos_kernel_type == "linux") {
deps += [ "//kernel/linux/patches:linux_kernel" ]
command += " LINUXDIR=" + rebase_path("$root_out_dir/kernel/linux-4.19")
......
......@@ -125,7 +125,10 @@ musl_install_for_liteos_a_user: musl_patch_for_liteos_a_user
../configure --prefix=/usr --target=$(TARGET) --includedir=/usr/include/$(TARGET) --libdir=/usr/$(MULTILIB) \
$(if $(LDFLAGS),LDFLAGS="$(LDFLAGS)",) \
CC="$(CC)" CROSS_COMPILE="$(CROSS_COMPILE)" CFLAGS="$(CFLAGS)" >/dev/null && \
sed '/install-libs:/s/if/and/g' Makefile | make -f- -sj install-headers install-libs DESTDIR=$(SYSROOTDIR)
sed '/install-libs:/s/if/and/g' Makefile | sed 's, -DCRT, -DCRT -fno-unwind-tables -fno-asynchronous-unwind-tables,g' | make -f- -sj install-headers install-libs DESTDIR=$(SYSROOTDIR)
ifeq ($(BUILD_DEBUG),true)
$(HIDE) mkdir -p unwind && cd unwind && $(CROSS_COMPILE)ar x $(shell $(CC) -print-file-name=libunwind.a) && $(CROSS_COMPILE)ar r $(SYSROOTDIR)/usr/$(MULTILIB)/libc.a *.o
endif
ifeq ($(wildcard $(LINUXHDRDIR)),)
LINUXHDRDIR = $(shell pwd)/linux_header_install_for_linux_user/usr/include
......@@ -181,7 +184,10 @@ musl_install_for_liteos_a_user$(1): musl_install_for_liteos_a_user
../configure --prefix=/usr --target=$$(TARGET) --libdir=/usr/$$(MULTILIB) \
$$(if $$(LDFLAGS),LDFLAGS="$$(LDFLAGS)",) \
CC="$$(CC)" CROSS_COMPILE="$$(CROSS_COMPILE)" CFLAGS="$$(CFLAGS)" >/dev/null && \
sed '/install-libs:/s/if/and/g' Makefile | make -f- -sj install-libs DESTDIR=$$(SYSROOTDIR)
sed '/install-libs:/s/if/and/g' Makefile | sed 's, -DCRT, -DCRT -fno-unwind-tables -fno-asynchronous-unwind-tables,g' | make -f- -sj install-libs DESTDIR=$$(SYSROOTDIR)
ifeq ($$(BUILD_DEBUG),true)
$(HIDE) mkdir -p unwind && cd unwind && $$(CROSS_COMPILE)ar x $$(shell $$(CC) -print-file-name=libunwind.a) && $$(CROSS_COMPILE)ar r $$(SYSROOTDIR)/usr/$$(MULTILIB)/libc.a *.o
endif
endif
endef
......@@ -192,7 +198,7 @@ endif
endif
clean:
$(HIDE) rm -rf musl_copy_for_* linux_header_install_for_*
$(HIDE) rm -rf musl_copy_for_* linux_header_install_for_* unwind
distclean: clean
$(HIDE) rm -rf $(SYSROOTDIR)/lib $(SYSROOTDIR)/usr
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册