From owner-svn-src-stable-12@freebsd.org Tue Jan 7 16:47:26 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3DFFD1EC989; Tue, 7 Jan 2020 16:47:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47sdb20y5Yz4KfR; Tue, 7 Jan 2020 16:47:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 015831D9A; Tue, 7 Jan 2020 16:47:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 007GlPSX080521; Tue, 7 Jan 2020 16:47:25 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 007GlPHa080518; Tue, 7 Jan 2020 16:47:25 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202001071647.007GlPHa080518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 7 Jan 2020 16:47:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356447 - stable/12/usr.bin/gprof X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/usr.bin/gprof X-SVN-Commit-Revision: 356447 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jan 2020 16:47:26 -0000 Author: bz Date: Tue Jan 7 16:47:25 2020 New Revision: 356447 URL: https://svnweb.freebsd.org/changeset/base/356447 Log: MFC r351329: gprof: disable building of a.out components On arm64, riscv, and s390x disable building of aout components. This allows gprof to build on these architectures which never supported the legacy a.out binary format. Note: there might be more work needed for arm64 or risv and the MACHINE_ checks are based on what was use elsewhere in the tree at that time. Other will fix these parts with follow-up work. Modified: stable/12/usr.bin/gprof/Makefile stable/12/usr.bin/gprof/gprof.c stable/12/usr.bin/gprof/gprof.h Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/gprof/Makefile ============================================================================== --- stable/12/usr.bin/gprof/Makefile Tue Jan 7 16:44:19 2020 (r356446) +++ stable/12/usr.bin/gprof/Makefile Tue Jan 7 16:47:25 2020 (r356447) @@ -2,8 +2,14 @@ # $FreeBSD$ PROG= gprof -SRCS= gprof.c aout.c arcs.c dfn.c elf.c lookup.c hertz.c \ +SRCS= gprof.c arcs.c dfn.c elf.c lookup.c hertz.c \ printgprof.c printlist.c kernel.c + +.if ${MACHINE_ARCH} != "aarch64" && ${MACHINE_ARCH} != "riscv" && \ + ${MACHINE_ARCH} != "s390x" +SRCS+= aout.c +CFLAGS+= -DWITH_AOUT +.endif FILES= gprof.flat gprof.callg FILESDIR= ${SHAREDIR}/misc Modified: stable/12/usr.bin/gprof/gprof.c ============================================================================== --- stable/12/usr.bin/gprof/gprof.c Tue Jan 7 16:44:19 2020 (r356446) +++ stable/12/usr.bin/gprof/gprof.c Tue Jan 7 16:47:25 2020 (r356447) @@ -160,8 +160,11 @@ main(int argc, char **argv) * get information from the executable file. */ if ((Kflag && kernel_getnfile(a_outname, &defaultEs) == -1) || - (!Kflag && elf_getnfile(a_outname, &defaultEs) == -1 && - aout_getnfile(a_outname, &defaultEs) == -1)) + (!Kflag && elf_getnfile(a_outname, &defaultEs) == -1 +#ifdef WITH_AOUT + && aout_getnfile(a_outname, &defaultEs) == -1 +#endif + )) errx(1, "%s: bad format", a_outname); /* * sort symbol table. Modified: stable/12/usr.bin/gprof/gprof.h ============================================================================== --- stable/12/usr.bin/gprof/gprof.h Tue Jan 7 16:44:19 2020 (r356446) +++ stable/12/usr.bin/gprof/gprof.h Tue Jan 7 16:47:25 2020 (r356447) @@ -256,7 +256,9 @@ void addarc(nltype *, nltype *, long); bool addcycle(arctype **, arctype **); void addlist(struct stringlist *, char *); void alignentries(void); +#ifdef WITH_AOUT int aout_getnfile(const char *, char ***); +#endif int arccmp(arctype *, arctype *); arctype *arclookup(nltype *, nltype *); void asgnsamples(void);