From owner-freebsd-ports@freebsd.org Wed Jun 29 04:00:15 2016 Return-Path: Delivered-To: freebsd-ports@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 3831BB855EE for ; Wed, 29 Jun 2016 04:00:15 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 2622D2516 for ; Wed, 29 Jun 2016 04:00:15 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: by mailman.ysv.freebsd.org (Postfix) id 25746B855ED; Wed, 29 Jun 2016 04:00:15 +0000 (UTC) Delivered-To: ports@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 22C6FB855EC for ; Wed, 29 Jun 2016 04:00:15 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (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 C0D272514; Wed, 29 Jun 2016 04:00:13 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.14.9/8.14.9) with ESMTP id u5T4138u092653; Tue, 28 Jun 2016 21:01:10 -0700 (PDT) (envelope-from bsd-lists@bsdforge.com) To: "ports@FreeBSD.org" , Julian Elischer In-Reply-To: <7d454696-f910-7533-5757-74eb624f9315@freebsd.org> References: <7d454696-f910-7533-5757-74eb624f9315@freebsd.org> From: "Chris H" Subject: Re: best way to tune ports to add a CLFAGS entry Date: Tue, 28 Jun 2016 21:01:10 -0700 Content-Type: text/plain; charset=UTF-8; format=fixed MIME-Version: 1.0 Message-id: <4965d81328da090eb4f0a555af67ea77@ultimatedns.net> Content-Transfer-Encoding: 8bit X-Milter: Spamilter (Reciever: udns.ultimatedns.net; Sender-ip: 127.0.0.1; Sender-helo: ultimatedns.net; ) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2016 04:00:15 -0000 On Wed, 29 Jun 2016 00:52:51 +0800 Julian Elischer wrote > At work I am doing various cross compiles in order to make a product > under freebsd that actually will run under a modified FreeBSD that > runs on an appliance. We want to get away from hand rolling everything > to leverage all teh work in getting ports working well on FreeBSD. > > We have some extra syscalls and some structures have different sizes, > so we need to compile/link agains an alternate set of > includes/libraries and not those in /usr/include or /usr/lib. > > Ideally I want to use the "--sysroot" and "-isystem" options to the > compiler/linker or failing that, add a -I or -L entries to make it > look at the correct includes and libraries, not those in the base system. > > > In many ports CFLAGS etc. are sent in via the arguments to ./configure > or environment vars, but there are many other ports that have other > ways to specify these. > > Does the ports framework have any standard way to do this? > LDEXTRA_ARGS or EXTRA_CFLAGS or similar? > > I've looked around and can't really see anything. Best would be a > single file to which I could add these things but adding them to the > environment would also work. > > yours in ports ignorance.. > Hi Julian. While I can't answer your question directly. Maybe a USES=FAKE_INCLUDE, USES=FAKE_LIB? No. I haven't implemented it. Just throwing it out there, while it occurs to me. If someone doesn't beat me to it. I'd like to look into the feasibility of something like this, to accommodate something along the lines of what you're asking about. I often shy away from tasks I'd like to undertake, because it seems like too much work to cobble up just the right environment to accomplish it. But if I could make a universal convenience knob like I mention above. It'd be perfect. Tho I haven't thought it completely through. I like the sound of it. :-) Apologies, for stepping on your thread. Hope you don't mind. > > Julian > > --Chris