Subject: Re: [vserver] util-vserver install fails on new gentoo box
From: Paul Gärtner <pud@subnet666.de>
Date: Thu, 14 Nov 2013 20:02:07 +0100
Thu, 14 Nov 2013 20:02:07 +0100
On Thu, 14 Nov 2013, Tor Rune Skoglund wrote:

> src/secure-mount src/secure-mount.o  lib/libvserver.a
> src/secure-mount.o: In function `mountSingle':
> secure-mount.c:(.text+0x7d0): warning: warning: your code still has
> assertions enabled!
> /usr/diet/lib-x86_64/libc.a(assert_fail.o): In function `__assert_fail':
> (.text+0x19a): undefined reference to `stpcpy'

i still don't know, what exactly is breaking here, but it
used to work before i upgraded gcc to 4.8...

but this is fixed in dietlibc-cvs, so either use the
attached cvs ebuild for dietlibc or report this issue again
on bugs.gentoo.org, ask for a newer dietlibs snapshot and
wait until it's done ;)


cheers!

-- 
gpg-key: #DF307339


# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5
inherit cvs eutils flag-o-matic toolchain-funcs

DESCRIPTION="A libc optimized for small size"
HOMEPAGE="http://www.fefe.de/dietlibc/"
ECVS_SERVER="cvs.fefe.de:/cvs"
ECVS_USER="cvs"
ECVS_MODULE="dietlibc"
ECVS_LOCALNAME="dietlibc"
ECVS_TOP_DIR="${DISTDIR}/cvs-src/${PN}" 
S="${WORKDIR}/dietlibc"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm -hppa ~ia64 ~mips ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE=""

DEPEND=""
RDEPEND=""

DIETHOME=/usr/diet

src_prepare() {
	# Replace sparc64 related C[XX]FLAGS (see bug #45716)
	use sparc && replace-sparc64-flags

	# gcc-hppa suffers support for SSP, compilation will fail
	use hppa && strip-unsupported-flags

	# Makefile does not append CFLAGS
	append-flags -nostdinc -W -Wall -Wextra -Wchar-subscripts \
		-Wmissing-prototypes -Wmissing-declarations -Wno-switch \
		-Wno-unused -Wredundant-decls -fno-strict-aliasing

	# only use -nopie on archs that support it
	gcc-specs-pie && append-flags -nopie

	sed -i -e 's:strip::' Makefile || die
	append-flags -Wa,--noexecstack
}

src_unpack() {
	cvs_src_unpack
}

src_compile() {
	emake prefix="${EPREFIX}"${DIETHOME} \
		CC="$(tc-getCC)" \
		CFLAGS="${CFLAGS}" \
		STRIP=":"
}

src_install() {
	emake prefix="${EPREFIX}"${DIETHOME} \
		DESTDIR="${D}" \
		install-bin \
		install-headers

	dobin "${ED}"${DIETHOME}/bin/*
	doman "${ED}"${DIETHOME}/man/*/*
	rm -r "${ED}"${DIETHOME}/{man,bin} || die

	dodoc AUTHOR BUGS CAVEAT CHANGES README THANKS TODO PORTING
}