1570af302Sopenharmony_ciimport("../../../test_template.gni")
2570af302Sopenharmony_ci
3570af302Sopenharmony_cigroup("dl_different_hash") {
4570af302Sopenharmony_ci  testonly = true
5570af302Sopenharmony_ci  deps = [
6570af302Sopenharmony_ci    ":dl_a_sysv_hash_so",
7570af302Sopenharmony_ci    ":dl_different_hash_exe",
8570af302Sopenharmony_ci    ":dl_gnu_hash_so",
9570af302Sopenharmony_ci  ]
10570af302Sopenharmony_ci}
11570af302Sopenharmony_ci
12570af302Sopenharmony_ciohos_shared_library("dl_a_sysv_hash_so") {
13570af302Sopenharmony_ci  include_dirs = [ "." ]
14570af302Sopenharmony_ci
15570af302Sopenharmony_ci  sources = [ "sysv_hash_file.c" ]
16570af302Sopenharmony_ci
17570af302Sopenharmony_ci  output_name = "dl_sysv_hash_so"
18570af302Sopenharmony_ci
19570af302Sopenharmony_ci  output_extension = "so"
20570af302Sopenharmony_ci
21570af302Sopenharmony_ci  cflags = [ "-fPIC" ]
22570af302Sopenharmony_ci
23570af302Sopenharmony_ci  ldflags = [ "-Wl,--hash-style=sysv" ]
24570af302Sopenharmony_ci
25570af302Sopenharmony_ci  subsystem_name = "musl"
26570af302Sopenharmony_ci  part_name = "libc-test-lib"
27570af302Sopenharmony_ci}
28570af302Sopenharmony_ci
29570af302Sopenharmony_ciohos_shared_library("dl_gnu_hash_so") {
30570af302Sopenharmony_ci  include_dirs = [ "." ]
31570af302Sopenharmony_ci
32570af302Sopenharmony_ci  sources = [ "gnu_hash_file.c" ]
33570af302Sopenharmony_ci
34570af302Sopenharmony_ci  output_name = "dl_gnu_hash_so"
35570af302Sopenharmony_ci
36570af302Sopenharmony_ci  output_extension = "so"
37570af302Sopenharmony_ci
38570af302Sopenharmony_ci  cflags = [ "-fPIC" ]
39570af302Sopenharmony_ci
40570af302Sopenharmony_ci  ldflags = [ "-Wl,--hash-style=gnu" ]
41570af302Sopenharmony_ci
42570af302Sopenharmony_ci  subsystem_name = "musl"
43570af302Sopenharmony_ci  part_name = "libc-test-lib"
44570af302Sopenharmony_ci}
45570af302Sopenharmony_ci
46570af302Sopenharmony_ciohos_executable("dl_different_hash_exe") {
47570af302Sopenharmony_ci  sources = [ "dl_different_hash_exe.c" ]
48570af302Sopenharmony_ci  testonly = true
49570af302Sopenharmony_ci  deps = [
50570af302Sopenharmony_ci    ":dl_a_sysv_hash_so",
51570af302Sopenharmony_ci    ":dl_gnu_hash_so",
52570af302Sopenharmony_ci  ]
53570af302Sopenharmony_ci  include_dirs = [
54570af302Sopenharmony_ci    "../common",
55570af302Sopenharmony_ci    "//third_party/musl/libc-test/src/common",
56570af302Sopenharmony_ci  ]
57570af302Sopenharmony_ci  ldflags = [ "-Wl,-rpath=./:/data/local/tmp/libc-test-lib/" ]
58570af302Sopenharmony_ci  configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ]
59570af302Sopenharmony_ci  subsystem_name = "musl"
60570af302Sopenharmony_ci  part_name = "libc-test"
61570af302Sopenharmony_ci}
62