From owner-freebsd-toolchain@FreeBSD.ORG Fri Jul 27 12:42:53 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 245F3106566C for ; Fri, 27 Jul 2012 12:42:53 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp2.one.com (csmtp2.one.com [91.198.169.22]) by mx1.freebsd.org (Postfix) with ESMTP id D6DF28FC12 for ; Fri, 27 Jul 2012 12:42:52 +0000 (UTC) Received: from [192.168.1.18] (unknown [217.157.7.221]) by csmtp2.one.com (Postfix) with ESMTPA id 0D2D53076470 for ; Fri, 27 Jul 2012 12:42:46 +0000 (UTC) From: Erik Cederstrand Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Fri, 27 Jul 2012 14:42:45 +0200 Message-Id: <5E31BD9E-2911-49D1-9B42-C3FFCA6B889C@cederstrand.dk> To: freebsd-toolchain@freebsd.org Mime-Version: 1.0 (Apple Message framework v1278) X-Mailer: Apple Mail (2.1278) Subject: Linker flags used by buildworld/kernel X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2012 12:42:53 -0000 Hi guys, I want to know which linker flags are used when building FreeBSD, i.e. = which flags a system linker must support. I created a wrapper for = /usr/bin/ld that simply dumps the arguments to a file before calling = /usr/bin/ld. I then added "LD=3D/path/to/wrapper" to /etc/make.conf and = ran "make buildworld && make buildkernel". This results in the appended = list (for CURRENT). Is this a comprehensive list? I also tried gripping the source, but = neither LD nor LDFLAGS are used consistently, and some uses of LDFLAGS = are reserved for building other OS'es. I considered replacing = /usr/bin/ld with my wrapper, but a new ld is built in the very beginning = as part of the new toolchain, AFAIK. Thanks, Erik --gc-sections --no-warn-mismatch --whole-archive -Bdynamic -N -T -Tfoo -Ttext -X -Y -ashared -b -c,text -d -dynamic-linker -export-dynamic -m -nostdlib -o -r -static -warn-common=