summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndrzej Hajda <andrzej.hajda@intel.com>2024-12-12 13:45:39 +0100
committerKamil Konieczny <kamil.konieczny@linux.intel.com>2024-12-12 20:12:18 +0100
commit8603734a61b57f766ee60f24e63d18f88232a3c6 (patch)
treedd00fba5ab59fa0add91cebd88733f599cea450d /scripts
parentb1ffaf53580b084511c71a099ea47b594714b5a5 (diff)
scripts/generate_iga64_codes: fix path of iga64_macros.h
The build process fails if the build dir is not a subdir of the project. Fixes: cba1773fd01d ("scripts/generate_iga64_codes: add iga64_macros.h to checksum calculation") Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate_iga64_codes6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/generate_iga64_codes b/scripts/generate_iga64_codes
index 652bf01a0..3f207e9ff 100755
--- a/scripts/generate_iga64_codes
+++ b/scripts/generate_iga64_codes
@@ -22,6 +22,8 @@ die() {
exit 1
}
+: ${IGT_SRCDIR:=..}
+
# parse args
while getopts ':i:o:' opt; do
case $opt in
@@ -40,7 +42,7 @@ while read -d $'\0' asm; do
done < <(for f in $LIBS; do objcopy --dump-section .iga64_assembly=/dev/stdout $f.p/*.o /dev/null; done)
# check if we need to recompile - checksum difference and compiler present
-MD5_ASMS="$(md5sum <<< "$(< ../lib/iga64_macros.h) ${ASMS[@]}" | cut -b1-32)"
+MD5_ASMS="$(md5sum <<< "$(< $IGT_SRCDIR/lib/iga64_macros.h) ${ASMS[@]}" | cut -b1-32)"
MD5_PRE="$(grep -Po '(?<=^#define MD5_SUM_IGA64_ASMS )\S{32,32}' $INPUT 2>/dev/null)"
if [ "$MD5_ASMS" = "$MD5_PRE" ]; then
@@ -90,7 +92,7 @@ EOF
# Compiles assembly to binary representation sent to stdout.
compile_iga64() {
cmd="cpp -P - -o $WD/$asm_name.$gen_name.asm"
- cmd+=" -DGEN_VER=$gen_ver -D'ARG(n)=($IGA64_ARG0 + (n))' -imacros ../lib/iga64_macros.h"
+ cmd+=" -DGEN_VER=$gen_ver -D'ARG(n)=($IGA64_ARG0 + (n))' -imacros $IGT_SRCDIR/lib/iga64_macros.h"
eval "$cmd" <<<"$asm_body" || die "cpp error for $asm_name.$gen_name\ncmd: $cmd"
cmd="iga64 -Xauto-deps -Wall -p=$gen_name"
cmd+=" $WD/$asm_name.$gen_name.asm"