aboutsummaryrefslogtreecommitdiff
path: root/sbolint
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-05-14 15:34:01 -0400
committerB. Watson <urchlay@slackware.uk>2023-05-14 15:34:01 -0400
commit270860f9cee0d1285776031dfa6c9739b36c3367 (patch)
tree05d4725bd71561efb88ea113aa888b32a0743aad /sbolint
parent94beea1d7eb82ac125eccd2da9e5772ddd73fd9a (diff)
downloadsbo-maintainer-tools-270860f9cee0d1285776031dfa6c9739b36c3367.tar.gz
sbolint: check for outdated ARCH and SLKCFLAGS.
Diffstat (limited to 'sbolint')
-rwxr-xr-xsbolint22
1 files changed, 22 insertions, 0 deletions
diff --git a/sbolint b/sbolint
index 4d445f5..24fd8eb 100755
--- a/sbolint
+++ b/sbolint
@@ -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 {