Commit 50551364 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Juerg Haefliger

UBUNTU: [Packaging] buildinfo -- add compiler information to the flavour ABI

In getabis we extract the compiler information from an arbitrary .ko.
As we will not have those when only using buildinfo ABI information we
need to collect the compiler information during the build.

BugLink: http://bugs.launchpad.net/bugs/1806380Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
Acked-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarKamal Mostafa <kamal@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 2f5dda5c
......@@ -412,6 +412,17 @@ endif
/sbin/modinfo $$ko | grep ^firmware || true; \
done | sort -u >$(abidir)/$*.fwinfo
# Build the final ABI compiler information.
ko=$$(find $(pkgdir_bin) $(pkgdir) $(pkgdir_ex) -name \*.ko | head -1); \
readelf -p .comment "$$ko" | gawk ' \
($$1 == "[") { \
printf("%s", $$3); \
for (n=4; n<=NF; n++) { \
printf(" %s", $$n); \
} \
print "" \
}' | sort -u >$(abidir)/$*.compiler
# Build the final ABI retpoline information.
if grep -q CONFIG_RETPOLINE=y $(builddir)/build-$*/.config; then \
echo "# retpoline v1.0" >$(abidir)/$*.retpoline; \
......@@ -433,6 +444,8 @@ endif
$(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/fwinfo
install -m644 $(abidir)/$*.retpoline \
$(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/retpoline
install -m644 $(abidir)/$*.compiler \
$(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/compiler
headers_tmp := $(CURDIR)/debian/tmp-headers
headers_dir := $(CURDIR)/debian/linux-libc-dev
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment