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 = <UNISTD>) ) {
chomp $line;
die "$0: $file: $!\n";
}
+print "syscall-objs := ";
+
while ( defined($line = <FILE>) ) {
chomp $line;
$line =~ s/\s*(|[\#;].*)$//; # Strip comments and trailing blanks
@args = split(/\s*\,\s*/, $argv);
print HAVESYS "#define _KLIBC_HAVE_SYSCALL_${fname} ${sname}\n";
- make_sysstub($fname, $type, $sname, $stype, @args);
+ print " \\\n\tsyscalls/${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);