mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-a0a453e43f6efec864267a20a555a5c1ffe7eabc / contrib / amd.sh
blob81c3da8e8f7b8152ae7781e6b421761e188570b1
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/addrobject.cpp \
15 $src_dir/src/amd/addrlib/src/core/coord.cpp \
16 $src_dir/src/amd/addrlib/src/gfx11/gfx11addrlib.cpp \
17 $src_dir/src/amd/addrlib/src/gfx10/gfx10addrlib.cpp \
18 $src_dir/src/amd/addrlib/src/gfx9/gfx9addrlib.cpp \
19 $src_dir/src/amd/addrlib/src/r800/ciaddrlib.cpp \
20 $src_dir/src/amd/addrlib/src/r800/egbaddrlib.cpp \
21 $src_dir/src/amd/addrlib/src/r800/siaddrlib.cpp \
23 for src_pathname in $libaddrlib_cxx_pathnames
25 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
26 printf "CXXPP $src_pathname --> $build_dir/src/amd/addrlib/$cxxpp_filename\n"
27 $cxxpp $src_pathname -o $build_dir/src/amd/addrlib/$cxxpp_filename \
28 -I$cc_internal_fixed_incdir \
29 -I$cc_internal_incdir \
30 -I$cxx_internal_incdir \
31 -I$linux_incdir \
32 -I$syslib_incdir \
34 -DLITTLEENDIAN_CPU \
35 -I$build_dir/src/amd/addrlib/src/chip/r800 \
36 -I$src_dir/src/amd/addrlib/src/chip/r800 \
37 -I$build_dir/src/amd/addrlib/src/chip/gfx9 \
38 -I$src_dir/src/amd/addrlib/src/chip/gfx9 \
39 -I$build_dir/src/amd/addrlib/src/chip/gfx10 \
40 -I$src_dir/src/amd/addrlib/src/chip/gfx10 \
41 -I$build_dir/src/amd/addrlib/src/chip/gfx11 \
42 -I$src_dir/src/amd/addrlib/src/chip/gfx11 \
43 -I$build_dir/src/amd/addrlib/src/core \
44 -I$src_dir/src/amd/addrlib/src/core \
45 -I$build_dir/src/amd/addrlib/src \
46 -I$src_dir/src/amd/addrlib/src \
47 -I$build_dir/src/amd/addrlib/inc \
48 -I$src_dir/src/amd/addrlib/inc \
49 -I$build_dir/src \
50 -I$src_dir/src \
51 -I$build_dir/include \
52 -I$src_dir/include &
53 done
54 #------------------------------------------------------------------------------
55 wait
56 #------------------------------------------------------------------------------
57 for src_pathname in $libaddrlib_cxx_pathnames
59 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
60 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
61 printf "CXX_S $build_dir/src/amd/addrlib/$cxxpp_filename --> $build_dir/src/amd/addrlib/$asm_filename\n"
62 $cxx_s $build_dir/src/amd/addrlib/$cxxpp_filename -o $build_dir/src/amd/addrlib/$asm_filename &
63 done
64 #------------------------------------------------------------------------------
65 wait
66 #------------------------------------------------------------------------------
67 os=
68 for src_pathname in $libaddrlib_cxx_pathnames
70 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
71 o_filename=$(basename $src_pathname .cpp).cpp.cxx.s.o
72 os="$os $build_dir/src/amd/addrlib/$o_filename"
73 printf "AS $build_dir/src/amd/addrlib/$asm_filename --> $build_dir/src/amd/addrlib/$o_filename\n"
74 $as $build_dir/src/amd/addrlib/$asm_filename -o $build_dir/src/amd/addrlib/$o_filename &
75 done
76 #------------------------------------------------------------------------------
77 wait
78 #------------------------------------------------------------------------------
79 printf "AR RCS $build_dir/libaddrlib.a $os\n"
80 $ar_rcs $build_dir/libaddrlib.a $os
81 #===============================================================================
82 # amd/common
83 #------------------------------------------------------------------------------
84 mkdir -p $build_dir/src/amd/common
85 #------------------------------------------------------------------------------
86 libamd_common_c_pathnames="\
87 $src_dir/src/amd/common/amd_family.c \
88 $src_dir/src/amd/common/ac_binary.c \
89 $src_dir/src/amd/common/ac_debug.c \
90 $src_dir/src/amd/common/ac_ib_parser.c \
91 $src_dir/src/amd/common/ac_nir.c \
92 $src_dir/src/amd/common/ac_nir_cull.c \
93 $src_dir/src/amd/common/ac_nir_lower_esgs_io_to_mem.c \
94 $src_dir/src/amd/common/ac_nir_lower_global_access.c \
95 $src_dir/src/amd/common/ac_nir_lower_image_opcodes_cdna.c \
96 $src_dir/src/amd/common/ac_nir_lower_ngg.c \
97 $src_dir/src/amd/common/ac_nir_lower_ps.c \
98 $src_dir/src/amd/common/ac_nir_lower_resinfo.c \
99 $src_dir/src/amd/common/ac_nir_lower_subdword_loads.c \
100 $src_dir/src/amd/common/ac_nir_lower_taskmesh_io_to_mem.c \
101 $src_dir/src/amd/common/ac_nir_lower_tess_io_to_mem.c \
102 $src_dir/src/amd/common/ac_nir_lower_tex.c \
103 $src_dir/src/amd/common/ac_nir_opt_outputs.c \
104 $src_dir/src/amd/common/ac_parse_ib.c \
105 $src_dir/src/amd/common/ac_perfcounter.c \
106 $src_dir/src/amd/common/ac_shader_util.c \
107 $src_dir/src/amd/common/ac_shader_args.c \
108 $src_dir/src/amd/common/ac_shadowed_regs.c \
109 $src_dir/src/amd/common/ac_gather_context_rolls.c \
110 $src_dir/src/amd/common/ac_gpu_info.c \
111 $src_dir/src/amd/common/ac_surface.c \
112 $src_dir/src/amd/common/ac_surface_meta_address_test.c \
113 $src_dir/src/amd/common/ac_msgpack.c \
114 $src_dir/src/amd/common/ac_rtld.c \
115 $src_dir/src/amd/common/ac_rgp.c \
116 $src_dir/src/amd/common/ac_rgp_elf_object_pack.c \
117 $src_dir/src/amd/common/ac_spm.c \
118 $src_dir/src/amd/common/ac_sqtt.c \
119 $src_dir/src/amd/common/ac_surface_modifier_test.c \
121 for src_pathname in $libamd_common_c_pathnames
123 cpp_filename=$(basename $src_pathname .c).cpp.c
124 printf "CPP $src_pathname --> $build_dir/src/amd/common/$cpp_filename\n"
125 $cpp $src_pathname -o $build_dir/src/amd/common/$cpp_filename \
126 -I$cc_internal_fixed_incdir \
127 -I$cc_internal_incdir \
128 -I$linux_incdir \
129 -I$syslib_incdir \
131 -I$build_dir/src/gallium/auxiliary \
132 -I$src_dir/src/gallium/auxiliary \
133 -I$build_dir/src/gallium/include \
134 -I$src_dir/src/gallium/include \
135 -I$build_dir/src/util \
136 -I$src_dir/src/util \
137 -I$build_dir/src/mesa \
138 -I$src_dir/src/mesa \
139 -I$build_dir/src/amd/common \
140 -I$src_dir/src/amd/common \
141 -I$build_dir/src/amd \
142 -I$src_dir/src/amd \
143 -I$build_dir/src/compiler/nir \
144 -I$src_dir/src/compiler/nir \
145 -I$build_dir/src/compiler \
146 -I$src_dir/src/compiler \
147 -I$build_dir/src \
148 -I$src_dir/src \
149 -I$build_dir/include \
150 -I$src_dir/include \
152 $syslib_cpp_flags_defs \
153 $linux_cpp_flags_defs \
154 $cc_builtins_cpp_flags_defs \
155 $cc_attributes_cpp_flags_defs \
156 $mesa_cpp_flags_defs \
158 $external_deps_cpp_flags &
159 done
160 #-------------------------------------------------------------------------------
161 wait
162 #------------------------------------------------------------------------------
163 for src_pathname in $libamd_common_c_pathnames
165 cpp_filename=$(basename $src_pathname .c).cpp.c
166 asm_filename=$(basename $src_pathname .c).cpp.c.s
167 printf "CC_S $build_dir/src/amd/common/$cpp_filename --> $build_dir/src/amd/common/$asm_filename\n"
168 $cc_s $build_dir/src/amd/common/$cpp_filename -o $build_dir/src/amd/common/$asm_filename &
169 done
170 #------------------------------------------------------------------------------
171 wait
172 #------------------------------------------------------------------------------
174 for src_pathname in $libamd_common_c_pathnames
176 asm_filename=$(basename $src_pathname .c).cpp.c.s
177 o_filename=$(basename $src_pathname .c).cpp.c.s.o
178 os="$os $build_dir/src/amd/common/$o_filename"
179 printf "AS $build_dir/src/amd/common/$asm_filename --> $build_dir/src/amd/common/$o_filename\n"
180 $as $build_dir/src/amd/common/$asm_filename -o $build_dir/src/amd/common/$o_filename &
181 done
182 #------------------------------------------------------------------------------
183 wait
184 #------------------------------------------------------------------------------
185 printf "AR RCS $build_dir/libamd_common.a $os\n"
186 $ar_rcs $build_dir/libamd_common.a $os
187 #===============================================================================
188 echo "<--AMD GPU related common components built"