Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions scripts/update-tables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ fi

KVER=$(make -C ${KERNELSRC} kernelversion -s)
TEMP=$(mktemp -d)
FAILED=0

grab_syscall_names_from_tables()
{
Expand Down Expand Up @@ -84,6 +85,7 @@ generate_table()
./list-syscalls > "${DATADIR}/tables/syscalls-$arch"
else
echo -e "\n\nFailed to compile list-syscalls for $arch\n"
FAILED=1
fi
}

Expand Down Expand Up @@ -149,7 +151,14 @@ do_all_tables()
;;
esac

export_headers
# Without the headers, list-syscalls would be compiled against
# the headers of the previous architecture, or the host system
# ones, generating bogus tables.
if ! export_headers; then
echo -e "\n\nFailed to install headers for $arch\n"
FAILED=1
continue
fi

case ${arch} in
arm)
Expand Down Expand Up @@ -196,7 +205,11 @@ do_all_tables()
arch=x86_64 extraflags=-D__LP64__ generate_table
bits=32
arch=i386 generate_table
arch=x32 extraflags=-D__ILP32__ generate_table
# x32 was added in Linux 3.4; for older kernels asm/unistd.h
# provides the x86_64 system calls instead
if [ -e headers/usr/include/asm/unistd_x32.h ]; then
arch=x32 extraflags=-D__ILP32__ generate_table
fi
;;
arc|csky|hexagon|m68k|microblaze|nios2|openrisc|sh|xtensa)
bits=32 generate_table
Expand Down Expand Up @@ -249,3 +262,5 @@ do_all_tables
create_tables_for_python

rm -rf $TEMP

exit $FAILED
Loading