summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/libraries/static/link-time-optimization
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/link-time-optimization
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/link-time-optimization')
-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
16 files changed, 140 insertions, 0 deletions
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]