diff --git a/open_posix_testsuite/conformance/definitions/BUILD.gn b/open_posix_testsuite/conformance/definitions/BUILD.gn index 37c36198dd3ee6f099a886f6a9656a6142ed4874..c0b17688503d46324286366476fde4a52444ebd4 100644 --- a/open_posix_testsuite/conformance/definitions/BUILD.gn +++ b/open_posix_testsuite/conformance/definitions/BUILD.gn @@ -18,7 +18,8 @@ open_source_suite("ActsOpenPosixBuildOnlyTest") { exec_command_path = "//third_party/ltp/testcases/open_posix_testsuite/" compiler = rebase_path("${ohos_build_compiler_dir}/bin/${ohos_build_compiler}") 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" + arch_cflags = string_join(" ", target_arch_cflags) + prebuild_command = "make clean && make distclean && ./scripts/generate-makefiles.sh $compiler ${ohos_root_path} ${sysroot_path} \"${arch_cflags}\" && make -j -C conformance/definitions" exec_sub_dir = "conformance/definitions" build_args = [ "signal_h/logfile", diff --git a/open_posix_testsuite/conformance/interfaces/BUILD.gn b/open_posix_testsuite/conformance/interfaces/BUILD.gn index 89966b905136029e63c35535fa57e82d9b60d5ac..3e4ce529da6d75c3cef42f04dbabfdcb4733581b 100755 --- a/open_posix_testsuite/conformance/interfaces/BUILD.gn +++ b/open_posix_testsuite/conformance/interfaces/BUILD.gn @@ -18,7 +18,8 @@ open_source_suite("ActsOpenPosixTest") { suite_name = "acts" exec_command_path = "//third_party/ltp/testcases/open_posix_testsuite/" 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/interfaces" + arch_cflags = string_join(" ", target_arch_cflags) + prebuild_command = "make clean && make distclean && ./scripts/generate-makefiles.sh $compiler ${ohos_root_path} ${sysroot_path} \"${arch_cflags}\" && make -j -C conformance/interfaces" exec_sub_dir = "conformance/interfaces" deps = [ "//test/xts/acts/open_posix_testsuite/conformance/definitions:ActsOpenPosixBuildOnlyTest", diff --git a/open_posix_testsuite/ltp-patch/generate-makefiles.sh.patch b/open_posix_testsuite/ltp-patch/generate-makefiles.sh.patch index 82da72a8f582cbccb0aa23ad40eeb5cd2d66d4b8..833f3455a4aa76bd9852326863fe1555bd4ef090 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 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 +--- third_party/ltp/testcases/open_posix_testsuite/scripts/generate-makefiles.sh 2021-07-08 10:43:20.237148000 +0800 ++++ test/xts/acts/open_posix_testsuite/ltp-patch/generate-makefiles.sh 2021-07-08 10:38:59.237148000 +0800 @@ -107,6 +107,7 @@ # @@ -12,17 +12,18 @@ # Build variables CFLAGS+= -I\$(top_srcdir)/include -+CFLAGS+= --target=arm-liteos --sysroot=${SYSROOT_PATH} ++CFLAGS+= --target=arm-liteos --sysroot=${SYSROOT_PATH} ${ARCH_CFLAGS} # XXX: for testfrmw.c -- needs to be moved into a library. CFLAGS+= -I\$(srcdir) -@@ -303,6 +305,9 @@ +@@ -303,6 +305,10 @@ GLOBAL_BOILERPLATE="${TOP_SRCDIR}/.global_boilerplate" CONFIG_MK="../../include/mk/config-openposix.mk" +COMPILE_PATH=$1 +BUILD_ROOT_PATH=$2 +SYSROOT_PATH=$3 ++ARCH_CFLAGS=$4 rm -f "$GLOBAL_BOILERPLATE"