From owner-svn-src-all@freebsd.org Thu Dec 3 13:00:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6ABF8A3EA94 for ; Thu, 3 Dec 2015 13:00:47 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.smtp.rzone.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 08D7014BA for ; Thu, 3 Dec 2015 13:00:46 +0000 (UTC) (envelope-from joerg@britannica.bec.de) X-RZG-AUTH: :JiIXek6mfvEEUpFQdo7Fj1/zg48CFjWjQuEfXeSt/nWoxdY2dvuAIbsw5PvjGQjhWhuV+jPrsk4RQSkbXXm+20XbQAzoKw== X-RZG-CLASS-ID: mo00 Received: from britannica.bec.de (p20030057E21B0F0045F17A0CE9168729.dip0.t-ipconnect.de [IPv6:2003:57:e21b:f00:45f1:7a0c:e916:8729]) by smtp.strato.de (RZmta 37.14 AUTH) with ESMTPSA id u0393drB3D0fHJd (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Thu, 3 Dec 2015 14:00:41 +0100 (CET) Date: Thu, 3 Dec 2015 14:00:40 +0100 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Subject: Re: svn commit: r291666 - head/libexec/rtld-elf Message-ID: <20151203130040.GA8786@britannica.bec.de> References: <201512030006.tB306xTa074887@repo.freebsd.org> <20151203085028.GH2405@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151203085028.GH2405@kib.kiev.ua> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 13:00:47 -0000 On Thu, Dec 03, 2015 at 10:50:28AM +0200, Konstantin Belousov wrote: > > Modified: head/libexec/rtld-elf/Makefile > > ============================================================================== > > --- head/libexec/rtld-elf/Makefile Thu Dec 3 00:02:01 2015 (r291665) > > +++ head/libexec/rtld-elf/Makefile Thu Dec 3 00:06:59 2015 (r291666) > > @@ -13,7 +13,7 @@ SRCS= rtld_start.S \ > > malloc.c xmalloc.c debug.c libmap.c > > MAN= rtld.1 > > CSTD?= gnu99 > > -CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD > > +CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -fno-builtin > > CFLAGS+= -I${SRCTOP}/lib/csu/common > > .if exists(${.CURDIR}/${MACHINE_ARCH}) > > RTLD_ARCH= ${MACHINE_ARCH} > > @@ -22,7 +22,6 @@ RTLD_ARCH= ${MACHINE_CPUARCH} > > .endif > > CFLAGS+= -I${.CURDIR}/${RTLD_ARCH} -I${.CURDIR} > > .if ${MACHINE_ARCH} == "powerpc64" > > -CFLAGS+= -mcall-aixdesc > I wanted to set -ffreestanding for rtld compilation, but considered it only > a minor issue. Could you test this instead of -fno-builtin, please ? I don't tthink either should be used -- -fno-builtin is certainly a very blunt hammer. Are you sure that doesn't disable all kinds of useful things like optimisations of the string functions etc? A more selective approach would to add something like: void *real_malloc(size_t) __asm__("malloc"); and call that. I would call it a bug that -fno-builtin-calloc does not work. Joerg