X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=klibc%2Fklibc%2Fsyscalls.pl;h=0575fa6648104a9537d0762abff7f2382eb62e6e;hp=1c48ce58ff623856d484ef66144fa948a3fb99e3;hb=54eb6a122fc6d2d765b9f71f9b47d529c1acf30f;hpb=a0622777688ad84ef3d789e0171cfb0ca3dc21d2 diff --git a/klibc/klibc/syscalls.pl b/klibc/klibc/syscalls.pl index 1c48ce58f..0575fa664 100644 --- a/klibc/klibc/syscalls.pl +++ b/klibc/klibc/syscalls.pl @@ -18,13 +18,14 @@ for $arg ( @ARGV ) { push(@args, $arg); } } -($file, $arch, $bits, $unistd, $havesyscall) = @args; +($file, $sysstub, $arch, $bits, $unistd, $outputdir, $havesyscall) = @args; -require "arch/$arch/sysstub.ph"; +require "$sysstub"; if (!open(UNISTD, '<', $unistd)) { die "$0: $unistd: $!\n"; } + while ( defined($line = ) ) { chomp $line; @@ -46,6 +47,8 @@ if (!open(FILE, '<', $file)) { die "$0: $file: $!\n"; } +print "syscall-objs := "; + while ( defined($line = ) ) { chomp $line; $line =~ s/\s*(|[\#;].*)$//; # Strip comments and trailing blanks @@ -104,11 +107,14 @@ while ( defined($line = ) ) { @args = split(/\s*\,\s*/, $argv); print HAVESYS "#define _KLIBC_HAVE_SYSCALL_${fname} ${sname}\n"; - make_sysstub($fname, $type, $sname, $stype, @args); + print " \\\n\t${fname}.o"; + make_sysstub($outputdir, $fname, $type, $sname, $stype, @args); } else { die "$file:$.: Could not parse input: \"$line\"\n"; } } +print "\n"; + print HAVESYS "\n#endif\n"; close(HAVESYS);