aboutsummaryrefslogtreecommitdiff
path: root/sbolint
diff options
context:
space:
mode:
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 {