Commit 14f98abf authored by Alexander Kolesen's avatar Alexander Kolesen Committed by Pavel Emelyanov

Make gen-syscalls.pl compatible with perl < 5.13.2

An error occurs when trying to build crtools on ARM systems
with perl versions earlier than 5.13.2 due to lack of /r modifier.

% make
...
  GEN      arch/arm/syscalls.S
Bareword found where operator expected at arch/arm/gen-syscalls.pl line 8, near "s/.*include\///gr"
Bareword found where operator expected at arch/arm/gen-syscalls.pl line 10, near "s/.*include\///gr"
Bareword found where operator expected at arch/arm/gen-syscalls.pl line 13, near "s/.*include\///gr"
Bareword found where operator expected at arch/arm/gen-syscalls.pl line 16, near "tr/.-/_/r"
Bareword found where operator expected at arch/arm/gen-syscalls.pl line 17, near "tr/.-/_/r"
syntax error at arch/arm/gen-syscalls.pl line 8, near "s/.*include\///gr"
syntax error at arch/arm/gen-syscalls.pl line 10, near "s/.*include\///gr"
syntax error at arch/arm/gen-syscalls.pl line 13, near "s/.*include\///gr"
syntax error at arch/arm/gen-syscalls.pl line 16, near "tr/.-/_/r"
syntax error at arch/arm/gen-syscalls.pl line 17, near "tr/.-/_/r"
BEGIN not safe after errors--compilation aborted at arch/arm/gen-syscalls.pl line 60.
make[1]: *** No rule to make target `arch/arm/syscalls.S', needed by `arch/arm/syscalls.o'.  Stop.
Signed-off-by: 's avatarAlexander Kolesen <kolesen.a@gmail.com>
Acked-by: 's avatarAlexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 44faa25d
...@@ -5,16 +5,21 @@ use warnings; ...@@ -5,16 +5,21 @@ use warnings;
my $in = $ARGV[0]; my $in = $ARGV[0];
my $codesout = $ARGV[1]; my $codesout = $ARGV[1];
my $codes = $ARGV[1] =~ s/.*include\///gr; my $codes = $ARGV[1];
$codes =~ s/.*include\///g;
my $protosout = $ARGV[2]; my $protosout = $ARGV[2];
my $protos = $ARGV[2] =~ s/.*include\///gr; my $protos = $ARGV[2];
$protos =~ s/.*include\///g;
my $asmout = $ARGV[3]; my $asmout = $ARGV[3];
my $asmcommon = $ARGV[4]; my $asmcommon = $ARGV[4];
my $prototypes = $ARGV[5] =~ s/.*include\///gr; my $prototypes = $ARGV[5];
$prototypes =~ s/.*include\///g;
my $bits = $ARGV[6]; my $bits = $ARGV[6];
my $codesdef = $codes =~ tr/.-/_/r; my $codesdef = $codes;
my $protosdef = $protos =~ tr/.-/_/r; $codesdef =~ tr/.-/_/;
my $protosdef = $protos;
$protosdef =~ tr/.-/_/;
my $code = "code$bits"; my $code = "code$bits";
my $need_aux = 0; my $need_aux = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment