diff options
author | B. Watson <urchlay@slackware.uk> | 2023-05-14 15:34:01 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2023-05-14 15:34:01 -0400 |
commit | 270860f9cee0d1285776031dfa6c9739b36c3367 (patch) | |
tree | 05d4725bd71561efb88ea113aa888b32a0743aad /sbolint | |
parent | 94beea1d7eb82ac125eccd2da9e5772ddd73fd9a (diff) | |
download | sbo-maintainer-tools-270860f9cee0d1285776031dfa6c9739b36c3367.tar.gz |
sbolint: check for outdated ARCH and SLKCFLAGS.
Diffstat (limited to 'sbolint')
-rwxr-xr-x | sbolint | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -1148,6 +1148,7 @@ sub check_script { my $lineno = 0; my ($prgnam, $version, $build, $tag, $need_doinst, $slackdesc, $makepkg, $install); my ($cdpkg, $codestart, $lint_enabled, $print_pkg_name, $pkg_type, $arch_lineno); + my ($old_arch, $old_flags); $lint_enabled = 1; for(@lines) { @@ -1280,6 +1281,14 @@ sub check_script { if((not defined $arch_lineno) && (/\bARCH:?=/)) { $arch_lineno = $lineno; } + + if(/^[^#]*\bARCH=['"]?i[34]86/) { + $old_arch = $lineno; + } + + if(/-march=['"]?i[34]86/) { + $old_flags = $lineno; + } } if(not defined($prgnam)) { @@ -1343,6 +1352,19 @@ sub check_script { } elsif($have_doinst && !$need_doinst) { log_error("$file: doinst.sh exists, but the script doesn't install it"); } + + if($old_arch) { + # checking for the flags is supposed to let us tell the difference between + # source builds and binary repacks. since we have 30 or so old binary repack + # builds that use ARCH=i386 or ARCH=i486, we make it a warning, not an error. + if($old_flags) { + log_error("$file:$old_arch: compiling for i386 or i486 is no longer supported"); + } else { + log_warning("$file:$old_arch: outdated ARCH, please update to i586"); + } + } elsif($old_flags) { + log_error("$file:$old_flags: archaic -march= compiler flag (we support i586 and up)"); + } } sub findem { |