From c14f1b04861c08d1030e076c586e84c99e92cec5 Mon Sep 17 00:00:00 2001 From: Balazs Kezes Date: Sat, 15 Feb 2014 22:21:23 +0000 Subject: [PATCH 1/2] Build glibc with unwind tables Without debug symbols or this you cannot have reliable backtraces in gdb. For instance this is on a Raspberry Pi without the unwind tables: $ gcc -x c <(echo 'void abort(); int main() { abort(); }') $ gdb ./a.out <<< $'r\nbt' ... #1 0xb6eb2e44 in abort () from /usr/lib/libc.so.6 #2 0x00000020 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) ... Here's with the unwind tables enabled: $ gcc -x c <(echo 'void abort(); int main() { abort(); }') $ gdb ./a.out <<< $'r\nbt' ... #1 0xb6eade44 in abort () from /usr/lib/libc.so.6 #2 0x000084e0 in main () ... The upside of the unwind tables compared to the debug symbols is that they don't take up a lot of space. --- core/glibc/PKGBUILD | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/glibc/PKGBUILD b/core/glibc/PKGBUILD index 8b0d20a5b..84b46255a 100644 --- a/core/glibc/PKGBUILD +++ b/core/glibc/PKGBUILD @@ -71,6 +71,9 @@ build() { CFLAGS=${CFLAGS/-fstack-protector/} CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/} + # enable unwinding tables so that gdb can unwind the standard functions + CFLAGS+=" -funwind-tables" + ${srcdir}/${pkgname}-${pkgver}/configure --prefix=/usr \ --libdir=/usr/lib --libexecdir=/usr/lib \ --with-headers=/usr/include \ From 432fce648ed9dfdbdeac42cf5037daa6c2164ae7 Mon Sep 17 00:00:00 2001 From: Evan Teitelman Date: Sat, 15 Feb 2014 19:50:17 -0500 Subject: [PATCH 2/2] alarm/devtools-alarm: Add `devtools` to `conflicts` and `provides`. This - Prevents file conflict errors if `devtools` is installed while `devtools-alarm` is installed and vice versa. - Allows `devtools-alarm` to act as a substitute for `devtools` in the dependency lists of other packages. --- alarm/devtools-alarm/PKGBUILD | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/alarm/devtools-alarm/PKGBUILD b/alarm/devtools-alarm/PKGBUILD index c2bfb4150..3548215b2 100644 --- a/alarm/devtools-alarm/PKGBUILD +++ b/alarm/devtools-alarm/PKGBUILD @@ -7,11 +7,13 @@ pkgname=devtools-alarm _pkgname=devtools pkgver=20131107 -pkgrel=1 +pkgrel=2 pkgdesc='Tools for Arch Linux ARM package maintainers' arch=('any') license=('GPL') url='http://projects.archlinux.org/devtools.git/' +conflicts=('devtools') +provides=('devtools') depends=('namcap' 'openssh' 'subversion' 'rsync' 'arch-install-scripts') source=("ftp://ftp.archlinux.org/other/${_pkgname}/${_pkgname}-${pkgver}.tar.gz" "ftp://ftp.archlinux.org/other/${_pkgname}/${_pkgname}-${pkgver}.tar.gz.sig"