This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: glibc 2.18 rt/tst-mqueue4.c compilation error
- From: Olivier Langlois <olivier at olivierlanglois dot net>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 08 Oct 2013 02:16:48 -0400
- Subject: Re: glibc 2.18 rt/tst-mqueue4.c compilation error
- Authentication-results: sourceware.org; auth=none
- References: <1379390986 dot 1849 dot 33 dot camel at Wailaba2> <20130924231954 dot 663692C099 at topped-with-meat dot com> <1380864720 dot 875 dot 1 dot camel at Wailaba2> <20131007222915 dot 4FD632C081 at topped-with-meat dot com>
On Mon, 2013-10-07 at 15:29 -0700, Roland McGrath wrote:
> So you went out of your way to compile libc itself with -D_FORTIFY_SOURCE=2.
> If this is the only problem you had, I'm surprised. We explicitly do not
> support building that way.
Roland,
I have used glibc ArchLinux PKGBUILD script written by Allan McRae. To
be more accurate only programs are built with -D_FORTIFY_SOURCE=2. I
have personalized a bit the configure switches like enabling syscalls
from 3.10 and up so I have something that is slightly different than the
official release. but sometimes, I feel like a rare beast that care
about unit tests output.
Here is a small snippet of the scripts:
# remove hardening options for building libraries
CFLAGS=${CFLAGS/-fstack-protector/}
CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/}
${srcdir}/${pkgname}-${pkgver}/configure --prefix=/usr \
--libdir=/usr/lib --libexecdir=/usr/lib \
--with-headers=/usr/include \
--with-bugurl=https://bugs.archlinux.org/ \
--enable-add-ons=nptl,libidn \
--enable-obsolete-rpc \
--enable-kernel=2.6.32 \
--enable-bind-now --disable-profile \
--enable-stackguard-randomization \
--enable-lock-elision \
--enable-multi-arch
# build libraries with hardening disabled
echo "build-programs=no" >> configparms
make
# re-enable hardening for programs
sed -i "/build-programs=/s#no#yes#" configparms
echo "CC += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
echo "CXX += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
make