Merge ~dbungert/casper:frame-pointer into casper:main

Proposed by Dan Bungert
Status: Merged
Merged at revision: ceeae71bbcddf2f3a4a142b6a09a47b46c15880f
Proposed branch: ~dbungert/casper:frame-pointer
Merge into: casper:main
Diff against target: 48 lines (+15/-1)
3 files modified
casper-md5check/Makefile (+4/-1)
debian/changelog (+6/-0)
debian/rules (+5/-0)
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Review via email: mp+469427@code.launchpad.net

Commit message

md5check: use dpkg buildflags.mk

The driving force on this change is to pick up frame pointer support.
Using dpkg-buildflags to automatically pick up future interesting
changes.

Also intentionally drops -g -O2, as we should be getting reasonable
values there from buildflags.

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) :
review: Needs Fixing
Revision history for this message
Dan Bungert (dbungert) :
Revision history for this message
Steve Langasek (vorlon) wrote :

Ok yes, sorry, some of the variables being set here are things like 'CFLAGS', which would not be exported by dpkg-buildpackage but are expected to be picked up in a manner specific to the upstream build system in use by dh (or debian/rules more generally).

So there's probably another way to do this by permuting dh to know what build system to use that would cause it to automatically export the flags variables, rather than having to list them explicitly in debian/rules; but this is enough to be getting on with.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/casper-md5check/Makefile b/casper-md5check/Makefile
2index be0e8a8..97ad474 100644
3--- a/casper-md5check/Makefile
4+++ b/casper-md5check/Makefile
5@@ -1,9 +1,12 @@
6 CC=gcc
7 PKG_CONFIG=pkg-config
8-CFLAGS := $(shell getconf LFS_CFLAGS) -Wall -Wno-unused-result -O2 -g $(shell $(PKG_CONFIG) --cflags ply-boot-client)
9+CFLAGS+=$(shell getconf LFS_CFLAGS)
10+CFLAGS+=$(shell $(PKG_CONFIG) --cflags ply-boot-client)
11+CFLAGS+=-Wall -Wno-unused-result
12 LDLIBS=$(shell $(PKG_CONFIG) --libs ply-boot-client)
13
14 casper-md5check: casper-md5check.c md5.c
15+ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS)
16
17 clean:
18 rm -f *.o casper-md5check
19diff --git a/debian/changelog b/debian/changelog
20index 4fd6a94..19cc57d 100644
21--- a/debian/changelog
22+++ b/debian/changelog
23@@ -1,3 +1,9 @@
24+casper (1.501) oracular; urgency=medium
25+
26+ * Enable frame pointers
27+
28+ -- Dan Bungert <daniel.bungert@canonical.com> Mon, 15 Jul 2024 13:14:18 -0600
29+
30 casper (1.500) oracular; urgency=medium
31
32 * Use wayland for the desktop live session
33diff --git a/debian/rules b/debian/rules
34index 23269a0..d4ab525 100755
35--- a/debian/rules
36+++ b/debian/rules
37@@ -2,6 +2,11 @@
38
39 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
40 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
41+export CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
42+export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
43+export DEB_VERSION := $(shell dpkg-parsechangelog -SVersion)
44+export DEB_SOURCE := $(shell dpkg-parsechangelog -SSource)
45+export DEB_BUILD_OS_RELEASE_ID := $(shell . /usr/lib/os-release && echo $$ID)
46
47 %:
48 dh $@ --with systemd

Subscribers

People subscribed via source and target branches