From 526d0bf97b286b7e780587db20bed331e672d497 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 19 Aug 2021 06:56:03 +0200 Subject: [PATCH] Use perl from PATH, not from absolute shebang (#2304) --- bin/hipcc | 3 ++- bin/hipconfig | 3 ++- bin/hipify-cmakefile | 3 ++- bin/hipify-perl | 3 ++- bin/hipvars.pm | 3 ++- tests/hit/parser | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bin/hipcc b/bin/hipcc index a619da8815..85ced41420 100755 --- a/bin/hipcc +++ b/bin/hipcc @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # Copyright (c) 2015 - 2021 Advanced Micro Devices, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -21,6 +21,7 @@ # Need perl > 5.10 to use logic-defined or use 5.006; use v5.10.1; +use warnings; use File::Basename; use File::Temp qw/ :mktemp /; use Cwd; diff --git a/bin/hipconfig b/bin/hipconfig index d67efe2ae3..b1b699446f 100755 --- a/bin/hipconfig +++ b/bin/hipconfig @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # Copyright (c) 2015 - 2021 Advanced Micro Devices, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -21,6 +21,7 @@ # Need perl > 5.10 to use logic-defined or use 5.006; use v5.10.1; +use warnings; use Getopt::Long; use Cwd; diff --git a/bin/hipify-cmakefile b/bin/hipify-cmakefile index bc600033a5..6f70aba364 100755 --- a/bin/hipify-cmakefile +++ b/bin/hipify-cmakefile @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl ## # Copyright (c) 2015 - 2021 Advanced Micro Devices, Inc. All rights reserved. # @@ -22,6 +22,7 @@ ## #usage hipify-cmakefile [OPTIONS] INPUT_FILE use Getopt::Long; +use warnings; GetOptions( "print-stats" => \$print_stats # print the command-line, like a header. diff --git a/bin/hipify-perl b/bin/hipify-perl index cace9f60fb..cbf957939a 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl ## # Copyright (c) 2015 - 2021 Advanced Micro Devices, Inc. All rights reserved. @@ -26,6 +26,7 @@ #usage hipify-perl [OPTIONS] INPUT_FILE +use warnings; use Getopt::Long; my $whitelist = ""; my $fileName = ""; diff --git a/bin/hipvars.pm b/bin/hipvars.pm index 5de732b6d8..2a6304b0c6 100644 --- a/bin/hipvars.pm +++ b/bin/hipvars.pm @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # Copyright (c) 2020 - 2021 Advanced Micro Devices, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -20,6 +20,7 @@ # THE SOFTWARE. package hipvars; +use warnings; use Getopt::Long; use Cwd; use File::Basename; diff --git a/tests/hit/parser b/tests/hit/parser index 6c744af936..bad5e62311 100755 --- a/tests/hit/parser +++ b/tests/hit/parser @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # Copyright (c) 2016 - 2021 Advanced Micro Devices, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -20,6 +20,7 @@ # THE SOFTWARE. use 5.006; use v5.10.1; +use warnings; use File::Basename; use File::Spec;