From 6ba30782fde4a013f577aab7fae8e1b227feb4e7 Mon Sep 17 00:00:00 2001 From: chuaizhzh Date: Sat, 3 Jul 2021 16:05:18 +0800 Subject: [PATCH] =?UTF-8?q?liteos=5Fa=20sysroot=20=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chuaizhzh Change-Id: Ica2f5bbfd7bf8c58e41e8de90364ceae96a6ff22 --- open_posix_testsuite/conformance/definitions/BUILD.gn | 3 ++- .../ltp-patch/generate-makefiles.sh.patch | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/open_posix_testsuite/conformance/definitions/BUILD.gn b/open_posix_testsuite/conformance/definitions/BUILD.gn index c6728223e..37c36198d 100644 --- a/open_posix_testsuite/conformance/definitions/BUILD.gn +++ b/open_posix_testsuite/conformance/definitions/BUILD.gn @@ -17,7 +17,8 @@ open_source_suite("ActsOpenPosixBuildOnlyTest") { suite_name = "acts" exec_command_path = "//third_party/ltp/testcases/open_posix_testsuite/" compiler = rebase_path("${ohos_build_compiler_dir}/bin/${ohos_build_compiler}") - prebuild_command = "make clean && make distclean && ./scripts/generate-makefiles.sh $compiler ${ohos_root_path} && make -j -C conformance/definitions" + sysroot_path = rebase_path(ohos_current_sysroot) + prebuild_command = "make clean && make distclean && ./scripts/generate-makefiles.sh $compiler ${ohos_root_path} ${sysroot_path} && make -j -C conformance/definitions" exec_sub_dir = "conformance/definitions" build_args = [ "signal_h/logfile", diff --git a/open_posix_testsuite/ltp-patch/generate-makefiles.sh.patch b/open_posix_testsuite/ltp-patch/generate-makefiles.sh.patch index 0f7f3ae26..82da72a8f 100644 --- a/open_posix_testsuite/ltp-patch/generate-makefiles.sh.patch +++ b/open_posix_testsuite/ltp-patch/generate-makefiles.sh.patch @@ -1,5 +1,5 @@ ---- third_party/ltp/testcases/open_posix_testsuite/scripts/generate-makefiles.sh 2020-09-03 20:31:21.369825435 +0800 -+++ test/xts/acts/open_posix_testsuite/ltp-patch/generate-makefiles.sh 2020-09-03 20:33:42.534681514 +0800 +--- third_party/ltp/testcases/open_posix_testsuite/scripts/generate-makefiles.sh 2021-07-03 15:38:26.370000000 +0800 ++++ test/xts/acts/open_posix_testsuite/ltp-patch/generate-makefiles.sh 2021-07-03 15:28:41.940000000 +0800 @@ -107,6 +107,7 @@ # @@ -12,16 +12,17 @@ # Build variables CFLAGS+= -I\$(top_srcdir)/include -+CFLAGS+= --target=arm-liteos --sysroot=${BUILD_ROOT_PATH}prebuilts/lite/sysroot ++CFLAGS+= --target=arm-liteos --sysroot=${SYSROOT_PATH} # XXX: for testfrmw.c -- needs to be moved into a library. CFLAGS+= -I\$(srcdir) -@@ -303,6 +305,8 @@ +@@ -303,6 +305,9 @@ GLOBAL_BOILERPLATE="${TOP_SRCDIR}/.global_boilerplate" CONFIG_MK="../../include/mk/config-openposix.mk" +COMPILE_PATH=$1 +BUILD_ROOT_PATH=$2 ++SYSROOT_PATH=$3 rm -f "$GLOBAL_BOILERPLATE" -- GitLab