summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/libraries/static
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
commit75808db17caf8b960b351e3408e74142f4c85aac (patch)
tree7989e9c09a4240248bf4658a22208a0a52d991c4 /t/recipes/checks/libraries/static
parentInitial commit. (diff)
downloadlintian-75808db17caf8b960b351e3408e74142f4c85aac.tar.xz
lintian-75808db17caf8b960b351e3408e74142f4c85aac.zip
Adding upstream version 2.117.0.upstream/2.117.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/recipes/checks/libraries/static')
-rw-r--r--t/recipes/checks/libraries/static/binaries-static-lib/build-spec/debian/control.in16
-rw-r--r--t/recipes/checks/libraries/static/binaries-static-lib/build-spec/debian/rules7
-rw-r--r--t/recipes/checks/libraries/static/binaries-static-lib/build-spec/fill-values4
-rw-r--r--t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/Makefile31
-rw-r--r--t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/code.c13
-rw-r--r--t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/code.h8
-rw-r--r--t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/other.c6
-rw-r--r--t/recipes/checks/libraries/static/binaries-static-lib/eval/desc2
-rw-r--r--t/recipes/checks/libraries/static/binaries-static-lib/eval/hints2
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/debian/control.in16
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/debian/rules7
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/fill-values4
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/orig/Makefile17
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/orig/code.c13
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/orig/code.h8
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/eval/desc4
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/eval/hints1
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/debian/control.in16
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/debian/rules7
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/fill-values4
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/orig/Makefile17
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/orig/code.c13
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/orig/code.h8
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/eval/desc4
-rw-r--r--t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/eval/hints1
-rw-r--r--t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/fill-values4
-rw-r--r--t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/Makefile17
-rw-r--r--t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/code.c13
-rw-r--r--t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/code.h8
-rw-r--r--t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/other.c6
-rw-r--r--t/recipes/checks/libraries/static/name/underscore-s-suffix/eval/desc4
-rw-r--r--t/recipes/checks/libraries/static/name/underscore-s-suffix/eval/hints1
-rw-r--r--t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/debian/control.in16
-rw-r--r--t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/debian/rules7
-rw-r--r--t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/fill-values4
-rw-r--r--t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/orig/Makefile17
-rw-r--r--t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/orig/code.c13
-rw-r--r--t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/orig/code.h8
-rw-r--r--t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/eval/desc6
-rw-r--r--t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/eval/hints1
-rw-r--r--t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/debian/control.in16
-rw-r--r--t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/debian/rules7
-rw-r--r--t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/fill-values4
-rw-r--r--t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/orig/Makefile17
-rw-r--r--t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/orig/code.c13
-rw-r--r--t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/orig/code.h8
-rw-r--r--t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/eval/desc4
-rw-r--r--t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/eval/hints1
48 files changed, 424 insertions, 0 deletions
diff --git a/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/debian/control.in b/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/debian/control.in
new file mode 100644
index 0000000..b4e0958
--- /dev/null
+++ b/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/debian/control.in
@@ -0,0 +1,16 @@
+Source: [% $source %]
+Priority: optional
+Section: libs
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+Build-Depends: [% $build_depends %]
+Rules-Requires-Root: no
+
+Package: libfoo-dev
+Architecture: [% $package_architecture %]
+Section: libdevel
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %]
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package.
diff --git a/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/debian/rules b/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/debian/rules
new file mode 100644
index 0000000..3a30bc0
--- /dev/null
+++ b/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/debian/rules
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
+
+override_dh_strip:
+ # Don't strip :)
diff --git a/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/fill-values b/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/fill-values
new file mode 100644
index 0000000..0968380
--- /dev/null
+++ b/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: binaries-static-lib
+Package-Architecture: any
+Skeleton: upload-non-native
+Description: Test checks related to static libs
diff --git a/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/Makefile b/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/Makefile
new file mode 100644
index 0000000..c6d2401
--- /dev/null
+++ b/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/Makefile
@@ -0,0 +1,31 @@
+CC=gcc
+CFLAGS+= -g
+LIBFILES:= libfoo.a libbar.a
+
+all: $(LIBFILES)
+
+libfoo.a: code.o other.o
+ ar rcs -o $@ $^
+
+pstripped.o: other.o
+ cp other.o pstripped.o
+ strip --strip-unneeded pstripped.o
+
+fstripped.o: other.o
+ cp other.o fstripped.o
+ strip --strip-unneeded --remove-section=.comment \
+ --remove-section=.note fstripped.o
+
+libbar.a: fstripped.o pstripped.o
+ ar rcs -o $@ $^
+
+clean:
+ rm -f *.a *.o
+
+install: all
+ install -m 0755 -d $(DESTDIR)/usr/lib
+ install -m 0755 -d $(DESTDIR)/usr/include
+ install -m 0644 *.a $(DESTDIR)/usr/lib
+ install -m 0644 code.h $(DESTDIR)/usr/include
+
+.PHONY: install clean
diff --git a/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/code.c b/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/code.c
new file mode 100644
index 0000000..7bba112
--- /dev/null
+++ b/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/code.c
@@ -0,0 +1,13 @@
+#include <stdlib.h>
+#include <math.h>
+#include "code.h"
+
+double e(void (*f)(char *)){
+ char tmp[10];
+ double x;
+ f(tmp);
+ x = atof(tmp);
+ return exp(x);
+}
+
+
diff --git a/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/code.h b/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/code.h
new file mode 100644
index 0000000..570beae
--- /dev/null
+++ b/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/code.h
@@ -0,0 +1,8 @@
+#ifndef CODE_H_
+#define CODE_H_
+
+double e(void (*f)(char *));
+
+double energy(double mass);
+
+#endif
diff --git a/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/other.c b/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/other.c
new file mode 100644
index 0000000..153aace
--- /dev/null
+++ b/t/recipes/checks/libraries/static/binaries-static-lib/build-spec/orig/other.c
@@ -0,0 +1,6 @@
+#include "code.h"
+#include <math.h>
+
+double energy(double mass){
+ return pow(10.0, 8.0) * pow(3.0, 2.0) * mass;
+}
diff --git a/t/recipes/checks/libraries/static/binaries-static-lib/eval/desc b/t/recipes/checks/libraries/static/binaries-static-lib/eval/desc
new file mode 100644
index 0000000..4fa1456
--- /dev/null
+++ b/t/recipes/checks/libraries/static/binaries-static-lib/eval/desc
@@ -0,0 +1,2 @@
+Testname: binaries-static-lib
+Check: libraries/static
diff --git a/t/recipes/checks/libraries/static/binaries-static-lib/eval/hints b/t/recipes/checks/libraries/static/binaries-static-lib/eval/hints
new file mode 100644
index 0000000..62dfcf3
--- /dev/null
+++ b/t/recipes/checks/libraries/static/binaries-static-lib/eval/hints
@@ -0,0 +1,2 @@
+libfoo-dev (binary): unstripped-static-library (code.o other.o) [usr/lib/libfoo.a]
+libfoo-dev (binary): static-library-has-unneeded-sections (pstripped.o) .comment [usr/lib/libbar.a]
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/debian/control.in b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/debian/control.in
new file mode 100644
index 0000000..b4e0958
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/debian/control.in
@@ -0,0 +1,16 @@
+Source: [% $source %]
+Priority: optional
+Section: libs
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+Build-Depends: [% $build_depends %]
+Rules-Requires-Root: no
+
+Package: libfoo-dev
+Architecture: [% $package_architecture %]
+Section: libdevel
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %]
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package.
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/debian/rules b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/debian/rules
new file mode 100644
index 0000000..3a30bc0
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/debian/rules
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
+
+override_dh_strip:
+ # Don't strip :)
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/fill-values b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/fill-values
new file mode 100644
index 0000000..7dad5a8
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: with-fat-lto-objects
+Package-Architecture: any
+Skeleton: upload-non-native
+Description: Static library built with -flto=auto and with -ffat-lto-objects
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/orig/Makefile b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/orig/Makefile
new file mode 100644
index 0000000..61335ab
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/orig/Makefile
@@ -0,0 +1,17 @@
+CC=gcc
+CFLAGS+= -g -flto=auto -ffat-lto-objects
+LIBFILES:= libcodeless.a
+
+all: $(LIBFILES)
+
+libcodeless.a: code.o
+ ar rcs -o $@ $^
+
+clean:
+ rm -f *.a *.o
+
+install: all
+ install -m 0755 -d $(DESTDIR)/usr/lib
+ install -m 0644 *.a $(DESTDIR)/usr/lib
+
+.PHONY: install clean
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/orig/code.c b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/orig/code.c
new file mode 100644
index 0000000..7bba112
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/orig/code.c
@@ -0,0 +1,13 @@
+#include <stdlib.h>
+#include <math.h>
+#include "code.h"
+
+double e(void (*f)(char *)){
+ char tmp[10];
+ double x;
+ f(tmp);
+ x = atof(tmp);
+ return exp(x);
+}
+
+
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/orig/code.h b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/orig/code.h
new file mode 100644
index 0000000..570beae
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/build-spec/orig/code.h
@@ -0,0 +1,8 @@
+#ifndef CODE_H_
+#define CODE_H_
+
+double e(void (*f)(char *));
+
+double energy(double mass);
+
+#endif
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/eval/desc b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/eval/desc
new file mode 100644
index 0000000..5a20d7f
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/eval/desc
@@ -0,0 +1,4 @@
+Testname: with-fat-lto-objects
+Check: libraries/static/link-time-optimization
+See-Also:
+ Bug#963057
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/eval/hints b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/eval/hints
new file mode 100644
index 0000000..33c3dd9
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/with-fat-lto-objects/eval/hints
@@ -0,0 +1 @@
+libfoo-dev (binary): static-link-time-optimization code.o [usr/lib/libcodeless.a]
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/debian/control.in b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/debian/control.in
new file mode 100644
index 0000000..b4e0958
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/debian/control.in
@@ -0,0 +1,16 @@
+Source: [% $source %]
+Priority: optional
+Section: libs
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+Build-Depends: [% $build_depends %]
+Rules-Requires-Root: no
+
+Package: libfoo-dev
+Architecture: [% $package_architecture %]
+Section: libdevel
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %]
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package.
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/debian/rules b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/debian/rules
new file mode 100644
index 0000000..3a30bc0
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/debian/rules
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
+
+override_dh_strip:
+ # Don't strip :)
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/fill-values b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/fill-values
new file mode 100644
index 0000000..ff04e62
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: without-fat-lto-objects
+Package-Architecture: any
+Skeleton: upload-non-native
+Description: Static library built with -flto=auto, but without -ffat-lto-objects
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/orig/Makefile b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/orig/Makefile
new file mode 100644
index 0000000..6b1fa78
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/orig/Makefile
@@ -0,0 +1,17 @@
+CC=gcc
+CFLAGS+= -g -flto=auto
+LIBFILES:= libcodeless.a
+
+all: $(LIBFILES)
+
+libcodeless.a: code.o
+ ar rcs -o $@ $^
+
+clean:
+ rm -f *.a *.o
+
+install: all
+ install -m 0755 -d $(DESTDIR)/usr/lib
+ install -m 0644 *.a $(DESTDIR)/usr/lib
+
+.PHONY: install clean
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/orig/code.c b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/orig/code.c
new file mode 100644
index 0000000..7bba112
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/orig/code.c
@@ -0,0 +1,13 @@
+#include <stdlib.h>
+#include <math.h>
+#include "code.h"
+
+double e(void (*f)(char *)){
+ char tmp[10];
+ double x;
+ f(tmp);
+ x = atof(tmp);
+ return exp(x);
+}
+
+
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/orig/code.h b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/orig/code.h
new file mode 100644
index 0000000..570beae
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/build-spec/orig/code.h
@@ -0,0 +1,8 @@
+#ifndef CODE_H_
+#define CODE_H_
+
+double e(void (*f)(char *));
+
+double energy(double mass);
+
+#endif
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/eval/desc b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/eval/desc
new file mode 100644
index 0000000..a71a4f2
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/eval/desc
@@ -0,0 +1,4 @@
+Testname: without-fat-lto-objects
+Check: libraries/static/link-time-optimization
+See-Also:
+ Bug#963057
diff --git a/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/eval/hints b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/eval/hints
new file mode 100644
index 0000000..33c3dd9
--- /dev/null
+++ b/t/recipes/checks/libraries/static/link-time-optimization/without-fat-lto-objects/eval/hints
@@ -0,0 +1 @@
+libfoo-dev (binary): static-link-time-optimization code.o [usr/lib/libcodeless.a]
diff --git a/t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/fill-values b/t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/fill-values
new file mode 100644
index 0000000..0284acb
--- /dev/null
+++ b/t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: underscore-s-suffix
+Package-Architecture: any
+Skeleton: upload-non-native
+Description: Static library installed with _s.a suffix
diff --git a/t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/Makefile b/t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/Makefile
new file mode 100644
index 0000000..6545dde
--- /dev/null
+++ b/t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/Makefile
@@ -0,0 +1,17 @@
+CC=gcc
+CFLAGS+= -g
+LIBFILES:= librealname_s.a
+
+all: $(LIBFILES)
+
+librealname_s.a: code.o
+ ar rcs -o $@ $^
+
+clean:
+ rm -f *.a *.o
+
+install: all
+ install -m 0755 -d $(DESTDIR)/usr/lib
+ install -m 0644 *.a $(DESTDIR)/usr/lib
+
+.PHONY: install clean
diff --git a/t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/code.c b/t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/code.c
new file mode 100644
index 0000000..7bba112
--- /dev/null
+++ b/t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/code.c
@@ -0,0 +1,13 @@
+#include <stdlib.h>
+#include <math.h>
+#include "code.h"
+
+double e(void (*f)(char *)){
+ char tmp[10];
+ double x;
+ f(tmp);
+ x = atof(tmp);
+ return exp(x);
+}
+
+
diff --git a/t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/code.h b/t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/code.h
new file mode 100644
index 0000000..570beae
--- /dev/null
+++ b/t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/code.h
@@ -0,0 +1,8 @@
+#ifndef CODE_H_
+#define CODE_H_
+
+double e(void (*f)(char *));
+
+double energy(double mass);
+
+#endif
diff --git a/t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/other.c b/t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/other.c
new file mode 100644
index 0000000..153aace
--- /dev/null
+++ b/t/recipes/checks/libraries/static/name/underscore-s-suffix/build-spec/orig/other.c
@@ -0,0 +1,6 @@
+#include "code.h"
+#include <math.h>
+
+double energy(double mass){
+ return pow(10.0, 8.0) * pow(3.0, 2.0) * mass;
+}
diff --git a/t/recipes/checks/libraries/static/name/underscore-s-suffix/eval/desc b/t/recipes/checks/libraries/static/name/underscore-s-suffix/eval/desc
new file mode 100644
index 0000000..8bb948f
--- /dev/null
+++ b/t/recipes/checks/libraries/static/name/underscore-s-suffix/eval/desc
@@ -0,0 +1,4 @@
+Testname: underscore-s-suffix
+Check: libraries/static/name
+See-Also:
+ Debian Bug#698398
diff --git a/t/recipes/checks/libraries/static/name/underscore-s-suffix/eval/hints b/t/recipes/checks/libraries/static/name/underscore-s-suffix/eval/hints
new file mode 100644
index 0000000..61ad390
--- /dev/null
+++ b/t/recipes/checks/libraries/static/name/underscore-s-suffix/eval/hints
@@ -0,0 +1 @@
+underscore-s-suffix (binary): odd-static-library-name [usr/lib/librealname_s.a]
diff --git a/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/debian/control.in b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/debian/control.in
new file mode 100644
index 0000000..b4e0958
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/debian/control.in
@@ -0,0 +1,16 @@
+Source: [% $source %]
+Priority: optional
+Section: libs
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+Build-Depends: [% $build_depends %]
+Rules-Requires-Root: no
+
+Package: libfoo-dev
+Architecture: [% $package_architecture %]
+Section: libdevel
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %]
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package.
diff --git a/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/debian/rules b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/debian/rules
new file mode 100644
index 0000000..3a30bc0
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/debian/rules
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
+
+override_dh_strip:
+ # Don't strip :)
diff --git a/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/fill-values b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/fill-values
new file mode 100644
index 0000000..7dad5a8
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: with-fat-lto-objects
+Package-Architecture: any
+Skeleton: upload-non-native
+Description: Static library built with -flto=auto and with -ffat-lto-objects
diff --git a/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/orig/Makefile b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/orig/Makefile
new file mode 100644
index 0000000..61335ab
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/orig/Makefile
@@ -0,0 +1,17 @@
+CC=gcc
+CFLAGS+= -g -flto=auto -ffat-lto-objects
+LIBFILES:= libcodeless.a
+
+all: $(LIBFILES)
+
+libcodeless.a: code.o
+ ar rcs -o $@ $^
+
+clean:
+ rm -f *.a *.o
+
+install: all
+ install -m 0755 -d $(DESTDIR)/usr/lib
+ install -m 0644 *.a $(DESTDIR)/usr/lib
+
+.PHONY: install clean
diff --git a/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/orig/code.c b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/orig/code.c
new file mode 100644
index 0000000..7bba112
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/orig/code.c
@@ -0,0 +1,13 @@
+#include <stdlib.h>
+#include <math.h>
+#include "code.h"
+
+double e(void (*f)(char *)){
+ char tmp[10];
+ double x;
+ f(tmp);
+ x = atof(tmp);
+ return exp(x);
+}
+
+
diff --git a/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/orig/code.h b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/orig/code.h
new file mode 100644
index 0000000..570beae
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/build-spec/orig/code.h
@@ -0,0 +1,8 @@
+#ifndef CODE_H_
+#define CODE_H_
+
+double e(void (*f)(char *));
+
+double energy(double mass);
+
+#endif
diff --git a/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/eval/desc b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/eval/desc
new file mode 100644
index 0000000..23eef5e
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/eval/desc
@@ -0,0 +1,6 @@
+Testname: with-fat-lto-objects
+Check: libraries/static/no-code
+Test-Against:
+ no-code-sections
+See-Also:
+ Bug#977596
diff --git a/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/eval/hints b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/eval/hints
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/with-fat-lto-objects/eval/hints
@@ -0,0 +1 @@
+
diff --git a/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/debian/control.in b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/debian/control.in
new file mode 100644
index 0000000..b4e0958
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/debian/control.in
@@ -0,0 +1,16 @@
+Source: [% $source %]
+Priority: optional
+Section: libs
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+Build-Depends: [% $build_depends %]
+Rules-Requires-Root: no
+
+Package: libfoo-dev
+Architecture: [% $package_architecture %]
+Section: libdevel
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %]
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package.
diff --git a/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/debian/rules b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/debian/rules
new file mode 100644
index 0000000..3a30bc0
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/debian/rules
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
+
+override_dh_strip:
+ # Don't strip :)
diff --git a/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/fill-values b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/fill-values
new file mode 100644
index 0000000..ff04e62
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: without-fat-lto-objects
+Package-Architecture: any
+Skeleton: upload-non-native
+Description: Static library built with -flto=auto, but without -ffat-lto-objects
diff --git a/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/orig/Makefile b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/orig/Makefile
new file mode 100644
index 0000000..6b1fa78
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/orig/Makefile
@@ -0,0 +1,17 @@
+CC=gcc
+CFLAGS+= -g -flto=auto
+LIBFILES:= libcodeless.a
+
+all: $(LIBFILES)
+
+libcodeless.a: code.o
+ ar rcs -o $@ $^
+
+clean:
+ rm -f *.a *.o
+
+install: all
+ install -m 0755 -d $(DESTDIR)/usr/lib
+ install -m 0644 *.a $(DESTDIR)/usr/lib
+
+.PHONY: install clean
diff --git a/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/orig/code.c b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/orig/code.c
new file mode 100644
index 0000000..7bba112
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/orig/code.c
@@ -0,0 +1,13 @@
+#include <stdlib.h>
+#include <math.h>
+#include "code.h"
+
+double e(void (*f)(char *)){
+ char tmp[10];
+ double x;
+ f(tmp);
+ x = atof(tmp);
+ return exp(x);
+}
+
+
diff --git a/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/orig/code.h b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/orig/code.h
new file mode 100644
index 0000000..570beae
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/build-spec/orig/code.h
@@ -0,0 +1,8 @@
+#ifndef CODE_H_
+#define CODE_H_
+
+double e(void (*f)(char *));
+
+double energy(double mass);
+
+#endif
diff --git a/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/eval/desc b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/eval/desc
new file mode 100644
index 0000000..3bc8ecb
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/eval/desc
@@ -0,0 +1,4 @@
+Testname: without-fat-lto-objects
+Check: libraries/static/no-code
+See-Also:
+ Bug#977596
diff --git a/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/eval/hints b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/eval/hints
new file mode 100644
index 0000000..19a13e1
--- /dev/null
+++ b/t/recipes/checks/libraries/static/no-code/without-fat-lto-objects/eval/hints
@@ -0,0 +1 @@
+libfoo-dev (binary): no-code-sections [usr/lib/libcodeless.a]