From owner-freebsd-arm@FreeBSD.ORG Tue Dec 23 22:38:04 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E87F9452 for ; Tue, 23 Dec 2014 22:38:03 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A68641D6B for ; Tue, 23 Dec 2014 22:38:03 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Y3Y5Y-000ChM-Qw; Tue, 23 Dec 2014 22:38:01 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id sBNMbxCd007064; Tue, 23 Dec 2014 15:37:59 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/0RaLgeLAG0A9QbMGzVBGA Message-ID: <1419374279.1018.144.camel@freebsd.org> Subject: Re: lsof on FreeBSD/arm From: Ian Lepore To: Larry Rosenman Date: Tue, 23 Dec 2014 15:37:59 -0700 In-Reply-To: <48ad36516ffbabbecf6ab3c53031bfb3@thebighonker.lerctr.org> References: <1419362189.1018.138.camel@freebsd.org> <1419367656.1018.142.camel@freebsd.org> <48ad36516ffbabbecf6ab3c53031bfb3@thebighonker.lerctr.org> X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 22:38:04 -0000 On Tue, 2014-12-23 at 16:29 -0600, Larry Rosenman wrote: > On 2014-12-23 14:47, Ian Lepore wrote: > > On Tue, 2014-12-23 at 14:02 -0600, Larry Rosenman wrote: > >> On 2014-12-23 13:16, Ian Lepore wrote: > >> > On Tue, 2014-12-23 at 11:29 -0600, Larry Rosenman wrote: > >> >> Greetings, > >> >> I'm the maintainer of the sysutils/lsof port for FreeBSD. It's > >> >> been > >> >> reported to me that the port doesn't compile on arm. In investigating > >> >> that, I found that some of the includes that lsof includes need a cpu > >> >> type defined in order to compile (machine/cpuconf.h). > >> >> > >> >> Is there a reason that there is no "default" cpu defined either by the > >> >> compiler or environment? > >> >> > >> >> Playing in a armv6 poudriere jail, I found I can get it to compile > >> >> via: > >> >> borg.lerctr.org /usr/local/etc/poudriere.d $ cat p110armv6-make.conf > >> >> CFLAGS += -DCPU_ARM1136=1 > >> >> borg.lerctr.org /usr/local/etc/poudriere.d $ > >> >> > >> >> However, I'm not sure if that's kosher for a port to just define. > >> >> > >> >> Can any of the arm experts help here? > >> >> > >> >> > >> >> > >> > > >> > See if the attached patch helps. The specific type of cpu shouldn't > >> > really matter outside the kernel (or even inside it except in a couple > >> > places), what usually matters is the architecture, which we've > >> > simplified to v4 versus v6 for most purposes. > >> > > >> > The attached patch will use the compiler's predefined values for arch > >> > to > >> > set our old-school symbols, which we really need to do a big cleanup > >> > pass on, but hopefully this little hack will get you going until that > >> > gets done. Let me know if this works and I'll commit it. > >> > > >> > -- Ian > >> Thanks. I'm having a hard time convincing poudriere to apply this > >> patch > >> to the environment > >> > >> Any ideas? > > > > Hrm, I seem to have fumbled the cpuconf.h attachment on the last try. > > > > -- Ian > still get: > --- dproc.o --- > In file included from ./dlsof.h:90: > In file included from /usr/src/sys/sys/conf.h:44: > In file included from /usr/src/sys/sys/eventhandler.h:34: > In file included from /usr/src/sys/sys/mutex.h:40: > In file included from /usr/src/sys/sys/pcpu.h:48: > In file included from /usr/include/machine/pcpu.h:35: > /usr/include/machine/cpuconf.h:180:2: error: ARM_NMMUS is 0 > > so we still need some more help here. > > Urk, there were even more cpu-specific tests were lurking further down in the file. See if this fixes it... -- Ian