From owner-freebsd-ports@freebsd.org Tue Jun 28 16:53:03 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 0B448B85C62 for ; Tue, 28 Jun 2016 16:53:03 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id ECE1023E3 for ; Tue, 28 Jun 2016 16:53:02 +0000 (UTC) (envelope-from julian@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id EC17CB85C61; Tue, 28 Jun 2016 16:53:02 +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 EBC1CB85C60 for ; Tue, 28 Jun 2016 16:53:02 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B274823E1 for ; Tue, 28 Jun 2016 16:53:02 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-236-103.lns20.per1.internode.on.net [121.45.236.103]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id u5SGquEQ025556 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Tue, 28 Jun 2016 09:53:00 -0700 (PDT) (envelope-from julian@freebsd.org) To: "ports@FreeBSD.org" From: Julian Elischer Subject: best way to tune ports to add a CLFAGS entry Message-ID: <7d454696-f910-7533-5757-74eb624f9315@freebsd.org> Date: Wed, 29 Jun 2016 00:52:51 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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: Tue, 28 Jun 2016 16:53:03 -0000 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.. Julian