mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-aeba937762a0238ef22abb38adc31ce3aad4ab83 / contrib / amd.sh
blobc8951b2f07f62a1309f1645198059312ed303eab
1 echo "building AMD GPU related common component-->"
2 #===============================================================================
3 # AMD/addrlib... AMD did not get the memo about c++ toxicity.
4 #------------------------------------------------------------------------------
5 mkdir -p $build_dir/src/amd/addrlib
6 #------------------------------------------------------------------------------
7 # filenames must be different as we put everything in one directory
8 libaddrlib_cxx_pathnames="\
9 $src_dir/src/amd/addrlib/src/addrinterface.cpp \
10 $src_dir/src/amd/addrlib/src/core/addrelemlib.cpp \
11 $src_dir/src/amd/addrlib/src/core/addrlib.cpp \
12 $src_dir/src/amd/addrlib/src/core/addrlib1.cpp \
13 $src_dir/src/amd/addrlib/src/core/addrlib2.cpp \
14 $src_dir/src/amd/addrlib/src/core/addrlib3.cpp \
15 $src_dir/src/amd/addrlib/src/core/addrobject.cpp \
16 $src_dir/src/amd/addrlib/src/core/coord.cpp \
17 $src_dir/src/amd/addrlib/src/gfx12/gfx12addrlib.cpp \
18 $src_dir/src/amd/addrlib/src/gfx11/gfx11addrlib.cpp \
19 $src_dir/src/amd/addrlib/src/gfx10/gfx10addrlib.cpp \
20 $src_dir/src/amd/addrlib/src/gfx9/gfx9addrlib.cpp \
21 $src_dir/src/amd/addrlib/src/r800/ciaddrlib.cpp \
22 $src_dir/src/amd/addrlib/src/r800/egbaddrlib.cpp \
23 $src_dir/src/amd/addrlib/src/r800/siaddrlib.cpp \
25 for src_pathname in $libaddrlib_cxx_pathnames
27 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
28 printf "CXXPP $src_pathname --> $build_dir/src/amd/addrlib/$cxxpp_filename\n"
29 $cxxpp $src_pathname -o $build_dir/src/amd/addrlib/$cxxpp_filename \
30 -I$cc_internal_fixed_incdir \
31 -I$cc_internal_incdir \
32 -I$cxx_internal_incdir \
33 -I$linux_incdir \
34 -I$syslib_incdir \
36 -DLITTLEENDIAN_CPU \
37 -I$build_dir/src/amd/addrlib/src/chip/r800 \
38 -I$src_dir/src/amd/addrlib/src/chip/r800 \
39 -I$build_dir/src/amd/addrlib/src/chip/gfx9 \
40 -I$src_dir/src/amd/addrlib/src/chip/gfx9 \
41 -I$build_dir/src/amd/addrlib/src/chip/gfx10 \
42 -I$src_dir/src/amd/addrlib/src/chip/gfx10 \
43 -I$build_dir/src/amd/addrlib/src/chip/gfx11 \
44 -I$src_dir/src/amd/addrlib/src/chip/gfx11 \
45 -I$build_dir/src/amd/addrlib/src/chip/gfx12 \
46 -I$src_dir/src/amd/addrlib/src/chip/gfx12 \
47 -I$build_dir/src/amd/addrlib/src/core \
48 -I$src_dir/src/amd/addrlib/src/core \
49 -I$build_dir/src/amd/addrlib/src \
50 -I$src_dir/src/amd/addrlib/src \
51 -I$build_dir/src/amd/addrlib/inc \
52 -I$src_dir/src/amd/addrlib/inc \
53 -I$build_dir/src \
54 -I$src_dir/src \
55 -I$build_dir/include \
56 -I$src_dir/include &
57 done
58 #------------------------------------------------------------------------------
59 wait
60 #------------------------------------------------------------------------------
61 for src_pathname in $libaddrlib_cxx_pathnames
63 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
64 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
65 printf "CXX_S $build_dir/src/amd/addrlib/$cxxpp_filename --> $build_dir/src/amd/addrlib/$asm_filename\n"
66 $cxx_s $build_dir/src/amd/addrlib/$cxxpp_filename -o $build_dir/src/amd/addrlib/$asm_filename &
67 done
68 #------------------------------------------------------------------------------
69 wait
70 #------------------------------------------------------------------------------
71 os=
72 for src_pathname in $libaddrlib_cxx_pathnames
74 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
75 o_filename=$(basename $src_pathname .cpp).cpp.cxx.s.o
76 os="$os $build_dir/src/amd/addrlib/$o_filename"
77 printf "AS $build_dir/src/amd/addrlib/$asm_filename --> $build_dir/src/amd/addrlib/$o_filename\n"
78 $as $build_dir/src/amd/addrlib/$asm_filename -o $build_dir/src/amd/addrlib/$o_filename &
79 done
80 #------------------------------------------------------------------------------
81 wait
82 #------------------------------------------------------------------------------
83 printf "AR RCS $build_dir/libaddrlib.a $os\n"
84 $ar_rcs $build_dir/libaddrlib.a $os
85 #===============================================================================
86 # amd/common
87 #------------------------------------------------------------------------------
88 mkdir -p $build_dir/src/amd/common
89 #------------------------------------------------------------------------------
90 libamd_common_c_pathnames="\
91 $src_dir/src/amd/common/amd_family.c \
92 $src_dir/src/amd/common/ac_binary.c \
93 $src_dir/src/amd/common/ac_cmdbuf.c \
94 $src_dir/src/amd/common/ac_debug.c \
95 $src_dir/src/amd/common/ac_descriptors.c \
96 $src_dir/src/amd/common/ac_ib_parser.c \
97 $src_dir/src/amd/common/ac_formats.c \
98 $src_dir/src/amd/common/ac_nir.c \
99 $src_dir/src/amd/common/ac_nir_cull.c \
100 $src_dir/src/amd/common/ac_nir_lower_esgs_io_to_mem.c \
101 $src_dir/src/amd/common/ac_nir_lower_global_access.c \
102 $src_dir/src/amd/common/ac_nir_lower_image_opcodes_cdna.c \
103 $src_dir/src/amd/common/ac_nir_lower_ngg.c \
104 $src_dir/src/amd/common/ac_nir_lower_ps.c \
105 $src_dir/src/amd/common/ac_nir_lower_resinfo.c \
106 $src_dir/src/amd/common/ac_nir_lower_subdword_loads.c \
107 $src_dir/src/amd/common/ac_nir_lower_taskmesh_io_to_mem.c \
108 $src_dir/src/amd/common/ac_nir_lower_tess_io_to_mem.c \
109 $src_dir/src/amd/common/ac_nir_lower_tex.c \
110 $src_dir/src/amd/common/ac_nir_meta_cs_blit.c \
111 $src_dir/src/amd/common/ac_nir_meta_cs_clear_copy_buffer.c \
112 $src_dir/src/amd/common/ac_nir_meta_ps_resolve.c \
113 $src_dir/src/amd/common/ac_nir_opt_outputs.c \
114 $src_dir/src/amd/common/ac_parse_ib.c \
115 $src_dir/src/amd/common/ac_perfcounter.c \
116 $src_dir/src/amd/common/ac_pm4.c \
117 $src_dir/src/amd/common/ac_shader_util.c \
118 $src_dir/src/amd/common/ac_shader_args.c \
119 $src_dir/src/amd/common/ac_shadowed_regs.c \
120 $src_dir/src/amd/common/ac_gather_context_rolls.c \
121 $src_dir/src/amd/common/ac_gpu_info.c \
122 $src_dir/src/amd/common/ac_surface.c \
123 $src_dir/src/amd/common/ac_surface_meta_address_test.c \
124 $src_dir/src/amd/common/ac_msgpack.c \
125 $src_dir/src/amd/common/ac_rtld.c \
126 $src_dir/src/amd/common/ac_rgp.c \
127 $src_dir/src/amd/common/ac_rgp_elf_object_pack.c \
128 $src_dir/src/amd/common/ac_spm.c \
129 $src_dir/src/amd/common/ac_sqtt.c \
130 $src_dir/src/amd/common/ac_surface_modifier_test.c \
132 for src_pathname in $libamd_common_c_pathnames
134 cpp_filename=$(basename $src_pathname .c).cpp.c
135 printf "CPP $src_pathname --> $build_dir/src/amd/common/$cpp_filename\n"
136 $cpp $src_pathname -o $build_dir/src/amd/common/$cpp_filename \
137 -I$cc_internal_fixed_incdir \
138 -I$cc_internal_incdir \
139 -I$linux_incdir \
140 -I$syslib_incdir \
142 -I$build_dir/src/gallium/auxiliary \
143 -I$src_dir/src/gallium/auxiliary \
144 -I$build_dir/src/gallium/include \
145 -I$src_dir/src/gallium/include \
146 -I$build_dir/src/util \
147 -I$src_dir/src/util \
148 -I$build_dir/src/mesa \
149 -I$src_dir/src/mesa \
150 -I$build_dir/src/amd/common \
151 -I$src_dir/src/amd/common \
152 -I$build_dir/src/amd \
153 -I$src_dir/src/amd \
154 -I$build_dir/src/compiler/nir \
155 -I$src_dir/src/compiler/nir \
156 -I$build_dir/src/compiler \
157 -I$src_dir/src/compiler \
158 -I$build_dir/src \
159 -I$src_dir/src \
160 -I$build_dir/include \
161 -I$src_dir/include \
163 $syslib_cpp_flags_defs \
164 $linux_cpp_flags_defs \
165 $cc_builtins_cpp_flags_defs \
166 $cc_attributes_cpp_flags_defs \
167 $mesa_cpp_flags_defs \
169 $external_deps_cpp_flags &
170 done
171 #-------------------------------------------------------------------------------
172 wait
173 #------------------------------------------------------------------------------
174 for src_pathname in $libamd_common_c_pathnames
176 cpp_filename=$(basename $src_pathname .c).cpp.c
177 asm_filename=$(basename $src_pathname .c).cpp.c.s
178 printf "CC_S $build_dir/src/amd/common/$cpp_filename --> $build_dir/src/amd/common/$asm_filename\n"
179 $cc_s $build_dir/src/amd/common/$cpp_filename -o $build_dir/src/amd/common/$asm_filename &
180 done
181 #------------------------------------------------------------------------------
182 wait
183 #------------------------------------------------------------------------------
185 for src_pathname in $libamd_common_c_pathnames
187 asm_filename=$(basename $src_pathname .c).cpp.c.s
188 o_filename=$(basename $src_pathname .c).cpp.c.s.o
189 os="$os $build_dir/src/amd/common/$o_filename"
190 printf "AS $build_dir/src/amd/common/$asm_filename --> $build_dir/src/amd/common/$o_filename\n"
191 $as $build_dir/src/amd/common/$asm_filename -o $build_dir/src/amd/common/$o_filename &
192 done
193 #------------------------------------------------------------------------------
194 wait
195 #------------------------------------------------------------------------------
196 printf "AR RCS $build_dir/libamd_common.a $os\n"
197 $ar_rcs $build_dir/libamd_common.a $os
198 #===============================================================================
199 echo "<--AMD GPU related common components built"