From owner-freebsd-toolchain@FreeBSD.ORG Tue Jul 24 09:02:48 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 350F4106564A for ; Tue, 24 Jul 2012 09:02:48 +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 EB3988FC15 for ; Tue, 24 Jul 2012 09:02:47 +0000 (UTC) Received: from [192.168.1.18] (unknown [217.157.7.221]) by csmtp2.one.com (Postfix) with ESMTPA id 7EC2D3019E7F for ; Tue, 24 Jul 2012 09:02:41 +0000 (UTC) From: Erik Cederstrand Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Tue, 24 Jul 2012 11:02:41 +0200 Message-Id: <88204636-7665-4B06-B781-174C24A384FE@cederstrand.dk> To: freebsd-toolchain@freebsd.org Mime-Version: 1.0 (Apple Message framework v1278) X-Mailer: Apple Mail (2.1278) Subject: MCLinker and llvm-config 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: Tue, 24 Jul 2012 09:02:48 -0000 Hi list, I'm creating a FreeBSD port for MCLinker = (http://code.google.com/p/mclinker/) in preparation of MCLinker working = without patching LLVM, and testing MCLinker as a system linker when it = gets far enough. In the configure stage, MCLinker needs to run llvm-config, which is not = installed by default in FreeBSD, even when WITH_CLANG_EXTRAS is set. = What is the best option to get llvm-config on my system? Can I just run = make && make install somewhere in /usr/src? Thanks, Erik Cederstrand= From owner-freebsd-toolchain@FreeBSD.ORG Tue Jul 24 09:15:07 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9CADE106564A for ; Tue, 24 Jul 2012 09:15:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4AE3F8FC0A for ; Tue, 24 Jul 2012 09:15:07 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:7c0f:9efb:3fb5:5912] (unknown [IPv6:2001:7b8:3a7:0:7c0f:9efb:3fb5:5912]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 743905C37; Tue, 24 Jul 2012 11:15:06 +0200 (CEST) Message-ID: <500E6798.9040104@FreeBSD.org> Date: Tue, 24 Jul 2012 11:15:04 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Erik Cederstrand References: <88204636-7665-4B06-B781-174C24A384FE@cederstrand.dk> In-Reply-To: <88204636-7665-4B06-B781-174C24A384FE@cederstrand.dk> X-Enigmail-Version: 1.5a1pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-toolchain@freebsd.org Subject: Re: MCLinker and llvm-config 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: Tue, 24 Jul 2012 09:15:07 -0000 On 2012-07-24 11:02, Erik Cederstrand wrote: > I'm creating a FreeBSD port for MCLinker (http://code.google.com/p/mclinker/) in preparation of MCLinker working without patching LLVM, and testing MCLinker as a system linker when it gets far enough. > > In the configure stage, MCLinker needs to run llvm-config, which is not installed by default in FreeBSD, even when WITH_CLANG_EXTRAS is set. What is the best option to get llvm-config on my system? Can I just run make && make install somewhere in /usr/src? I never added the tool to the tree, because I simply didn't think anybody would need to ever run this (IMO not very useful) tool. (Since the configuration is totally static, there's no need to dynamically run a tool such as this to get at the configuration details.) It isn't too hard to re-add it to the tree though, and add it to the WITH_CLANG_EXTRAS case. Another possibility is to just install the lang/clang or lang/clang-devel port. Btw, does MCLinker want to use LLVM as a shared library, by any chance? If that is the case, you should definitely use the port, as adding the shared library to the system is something I still need to implement. From owner-freebsd-toolchain@FreeBSD.ORG Tue Jul 24 09:39:54 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 482E7106564A; Tue, 24 Jul 2012 09:39:54 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp3.one.com (csmtp3.one.com [91.198.169.23]) by mx1.freebsd.org (Postfix) with ESMTP id 046F38FC0C; Tue, 24 Jul 2012 09:39:54 +0000 (UTC) Received: from [192.168.1.18] (unknown [217.157.7.221]) by csmtp3.one.com (Postfix) with ESMTPA id D78B32406C96; Tue, 24 Jul 2012 09:39:46 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: Erik Cederstrand In-Reply-To: <500E6798.9040104@FreeBSD.org> Date: Tue, 24 Jul 2012 11:39:46 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <88204636-7665-4B06-B781-174C24A384FE@cederstrand.dk> <500E6798.9040104@FreeBSD.org> To: Dimitry Andric X-Mailer: Apple Mail (2.1278) Cc: freebsd-toolchain@freebsd.org Subject: Re: MCLinker and llvm-config 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: Tue, 24 Jul 2012 09:39:54 -0000 Hi Dimitry, Den 24/07/2012 kl. 11.15 skrev Dimitry Andric: > On 2012-07-24 11:02, Erik Cederstrand wrote: >> I'm creating a FreeBSD port for MCLinker = (http://code.google.com/p/mclinker/) in preparation of MCLinker working = without patching LLVM, and testing MCLinker as a system linker when it = gets far enough. >>=20 >> In the configure stage, MCLinker needs to run llvm-config, which is = not installed by default in FreeBSD, even when WITH_CLANG_EXTRAS is set. = What is the best option to get llvm-config on my system? Can I just run = make && make install somewhere in /usr/src? >=20 > I never added the tool to the tree, because I simply didn't think > anybody would need to ever run this (IMO not very useful) tool. = (Since > the configuration is totally static, there's no need to dynamically = run > a tool such as this to get at the configuration details.) Ok. I might be able to hard-code this in the configure script. It just = needs the output of the --version, --cflags and --cxxflags options. > It isn't too hard to re-add it to the tree though, and add it to the > WITH_CLANG_EXTRAS case. Another possibility is to just install the > lang/clang or lang/clang-devel port. I'll try this first. Thanks. > Btw, does MCLinker want to use LLVM as a shared library, by any = chance? > If that is the case, you should definitely use the port, as adding the > shared library to the system is something I still need to implement. I'm not sure. I've never actually used MCLinker. First step is to create = the port so I can easily install it :-) Btw, do you guys have any plans for a GNU ld replacement? Progress on = the more "official" lld (http://lld.llvm.org/) seems slow, and MCLinker = more promising. Hence my feeble attempts :-) Thanks, Erik= From owner-freebsd-toolchain@FreeBSD.ORG Tue Jul 24 11:48:36 2012 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F2AA1106566C; Tue, 24 Jul 2012 11:48:36 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id BDBEB8FC0A; Tue, 24 Jul 2012 11:48:33 +0000 (UTC) Received: from c120.sec.cl.cam.ac.uk (c120.sec.cl.cam.ac.uk [128.232.18.120]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q6OBmSU9029174 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 24 Jul 2012 11:48:30 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: David Chisnall In-Reply-To: Date: Tue, 24 Jul 2012 12:48:27 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <282B3A4F-4196-4506-ABC0-E8DB9B991649@FreeBSD.org> References: <88204636-7665-4B06-B781-174C24A384FE@cederstrand.dk> <500E6798.9040104@FreeBSD.org> To: Erik Cederstrand X-Mailer: Apple Mail (2.1278) Cc: freebsd-toolchain@FreeBSD.org, Dimitry Andric Subject: Re: MCLinker and llvm-config 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: Tue, 24 Jul 2012 11:48:37 -0000 On 24 Jul 2012, at 10:39, Erik Cederstrand wrote: > Btw, do you guys have any plans for a GNU ld replacement? Progress on = the more "official" lld (http://lld.llvm.org/) seems slow, and MCLinker = more promising. Hence my feeble attempts :-) Most of the progress in lld is not in lld itself, but in the underlying = frameworks. The tool is expected to be a fairly thin wrapper. The = Object code in the main llvm repository is where the real work happens. MCLinker is likely a dead end. It was intended as a quick-and-dirty = hack to get a working linker for a small subset of the problem, with no = thought as to how to solve the general case. David= From owner-freebsd-toolchain@FreeBSD.ORG Wed Jul 25 09:23:00 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 4EBDA106566B for ; Wed, 25 Jul 2012 09:23:00 +0000 (UTC) (envelope-from lubatang@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id D35A08FC16 for ; Wed, 25 Jul 2012 09:22:59 +0000 (UTC) Received: by weyx56 with SMTP id x56so432844wey.13 for ; Wed, 25 Jul 2012 02:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=MJIud5/Zw0NVQnQSOivhJRGpINbfvXjBeo2lJRKnMPk=; b=njRrGHGrhYSP9BepS8KwVKSp9I9ssEQ09BmzPmXk6DNndR13xOq5FKDEBALJDG5v3D 8atTqdfAvJwZ/ig+OQ13bEcorR8h1ItiiI5UQiJaImszl3Wffj5cX/WLSkWJ+KIC4oCe Lvwjay7U7m++9LT9+Koc1PJEQ8y8Se11GgwrAwJrrPPRZXCmPIVZbZfUmeFKGKm6Oyy5 ie+ntRJY4OktT0qmF6L3OtySgNTGwNJVIGxabrHg1EwyB+AufZ/1CBqdr3ry7h1utngS 4iyfTiaENgYiAIyLxOYZmjaDRuItHuG9ukXSZto3//lOgt82mXVTM/WyFZmGtPnI2BS2 SDAw== MIME-Version: 1.0 Received: by 10.180.97.33 with SMTP id dx1mr2843359wib.18.1343208178017; Wed, 25 Jul 2012 02:22:58 -0700 (PDT) Received: by 10.216.48.5 with HTTP; Wed, 25 Jul 2012 02:22:57 -0700 (PDT) Date: Wed, 25 Jul 2012 17:22:58 +0800 Message-ID: From: Luba Tang To: freebsd-toolchain@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: MCLinker and llvm-config 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: Wed, 25 Jul 2012 09:23:00 -0000 > On 24 Jul 2012, at 10:39, Erik Cederstrand wrote: >> Btw, do you guys have any plans for a GNU ld replacement? Progress on the more "official" lld (http://lld.llvm.org/) seems slow, and MCLinker more promising. Hence my feeble attempts :-) > Most of the progress in lld is not in lld itself, but in the underlying frameworks. The tool is expected to be a fairly thin wrapper. The Object code in the main llvm repository is where the real work happens. > > MCLinker is likely a dead end. It was intended as a quick-and-dirty hack to get a working linker for a small subset of the problem, with no thought as to how to solve the general case. > > David Dears, Let me explain the status of MCLinker. MCLinker now is one of the standard system linkers in Android system. https://android.googlesource.com/platform/frameworks/compile/mclinker Since there are many practical issues in ELF system (some of them are undocumented :'( ), I think MCLinker could be said as a linker who is robust enough to handle with wrapped symbols, segments, .group section, exception, DWRAF, and many many ELF unique features. :) In our plan, we will get rid of LLVM in this September. At that time, MCLinker wil be able to handle archives, and has some basic support for link script. We have promised BSD systems have higher priority than Linux systems, and we will keep our promise. BTW, I think llvm-config is necessary for every LLVM-based project. If it will not be in BSD system, I think we can negotiate an approach to get rid of it. Just like what Android did. Best regards, Luba From owner-freebsd-toolchain@FreeBSD.ORG Wed Jul 25 09:48:32 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 30F00106566B for ; Wed, 25 Jul 2012 09:48:32 +0000 (UTC) (envelope-from theraven@theravensnest.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id F22E18FC08 for ; Wed, 25 Jul 2012 09:48:31 +0000 (UTC) Received: from c120.sec.cl.cam.ac.uk (c120.sec.cl.cam.ac.uk [128.232.18.120]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q6P9mS4t034215 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Wed, 25 Jul 2012 09:48:30 GMT (envelope-from theraven@theravensnest.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: David Chisnall In-Reply-To: Date: Wed, 25 Jul 2012 10:48:27 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <0FD17AD0-AD5B-4B06-A966-849699AA4A1D@theravensnest.org> References: To: Luba Tang X-Mailer: Apple Mail (2.1278) Cc: freebsd-toolchain@freebsd.org Subject: Re: MCLinker and llvm-config 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: Wed, 25 Jul 2012 09:48:32 -0000 On 25 Jul 2012, at 10:22, Luba Tang wrote: > Let me explain the status of MCLinker. > MCLinker now is one of the standard system linkers in Android system. > https://android.googlesource.com/platform/frameworks/compile/mclinker It looks like MCLinker has made a lot of progress since I last checked.=20= > Since there are many practical issues in ELF system (some of them are > undocumented :'( ), I think MCLinker could be said as a linker who is > robust enough to handle with wrapped symbols, segments, .group = section, > exception, DWRAF, and many many ELF unique features. :) Indeed. How do you plan on integrating modern features like LTO into = MCLinker? Can you deal with an atom-based model for efficient code = locality? > In our plan, we will get rid of LLVM in this September. At that time, > MCLinker wil be able to handle archives, and has some basic support = for > link script. What does 'get rid of LLVM' mean in this context? > We have promised BSD systems have higher priority than Linux systems, = and > we will keep our promise. That's also great. The FreeBSD Foundation has some funding set aside = for linker work, but currently nothing concrete to spend it on, so I'd = strongly invite people to submit project proposals in this area. > BTW, I think llvm-config is necessary for every LLVM-based project. If = it > will not be in BSD system, I think we can negotiate an approach to get = rid > of it. > Just like what Android did. I think the rationale for not having it in the base system is sensible: = we don't want things from outside the base system to link against the = LLVM from the base system. When other things are imported, we will most = likely replace their own build system (as we do with LLVM itself) and so = can hard code the location of the LLVM that they link against. David= From owner-freebsd-toolchain@FreeBSD.ORG Wed Jul 25 10:06:27 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 31F3F106566B for ; Wed, 25 Jul 2012 10:06:27 +0000 (UTC) (envelope-from lubatang@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id B52588FC1A for ; Wed, 25 Jul 2012 10:06:26 +0000 (UTC) Received: by weyx56 with SMTP id x56so466168wey.13 for ; Wed, 25 Jul 2012 03:06:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=LG/7rHEsnPbyTNmQB86ZiNAEDkA1OeNJ4dS5xmyXFPI=; b=caMqpRPfpskbfv8aln2sIky5J5m/zI9jFEFCT8iH6H0rV/ZYrHFzSWD99+AyDDlOic ddN/6tw6hsmV8bLym8GebWAYHvsuk4hQdur15yUhqFryF9XDnCCnsClwGq0cwnxjhsei jfbJ4SeGosABAntx0ucfdRMVVlVYpZlJRts7mkxIy1fnCdIwqhJkfrhf6zu1IB/e2MFn NbB6HkHKipQQJB8EuiUPZSBEbMrIiOLgXhlERTwRkf36RtN1hTkpg/sL8ANkx3Ft280d vBDAUP6gu2Txgeos/38Z677NpSYnJtf+g4AMbx5mXQYBGC1OU69LSxmP5A8iMIf9LCzx YYzw== MIME-Version: 1.0 Received: by 10.216.182.195 with SMTP id o45mr12482074wem.185.1343210785845; Wed, 25 Jul 2012 03:06:25 -0700 (PDT) Received: by 10.216.48.5 with HTTP; Wed, 25 Jul 2012 03:06:25 -0700 (PDT) In-Reply-To: <0FD17AD0-AD5B-4B06-A966-849699AA4A1D@theravensnest.org> References: <0FD17AD0-AD5B-4B06-A966-849699AA4A1D@theravensnest.org> Date: Wed, 25 Jul 2012 18:06:25 +0800 Message-ID: From: Luba Tang To: David Chisnall Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-toolchain@freebsd.org Subject: Re: MCLinker and llvm-config 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: Wed, 25 Jul 2012 10:06:27 -0000 2012/7/25 David Chisnall > On 25 Jul 2012, at 10:22, Luba Tang wrote: > > > Let me explain the status of MCLinker. > > MCLinker now is one of the standard system linkers in Android system. > > https://android.googlesource.com/platform/frameworks/compile/mclinker > > It looks like MCLinker has made a lot of progress since I last checked. > > > Since there are many practical issues in ELF system (some of them are > > undocumented :'( ), I think MCLinker could be said as a linker who is > > robust enough to handle with wrapped symbols, segments, .group section, > > exception, DWRAF, and many many ELF unique features. :) > > Indeed. How do you plan on integrating modern features like LTO into > MCLinker? Can you deal with an atom-based model for efficient code > locality? > We will introduce a new linking algorithm, we call it "fragment-based model". Atom-based model is one special case (finest) of "fragment-based model". This help MCLinker find the best trade-off between linking time and output quality. The trade-off is important for modern virtual machines. > > In our plan, we will get rid of LLVM in this September. At that time, > > MCLinker wil be able to handle archives, and has some basic support for > > link script. > > What does 'get rid of LLVM' mean in this context? > Since some friends have helped us to change llvm/Support/ELF.h, the next step is to get rid of the data structures in MC layer. Thanks for LLVM community's work, LLVM 3.1 paves a road to change every components we want. We do not need some straightforward patches for LLVM. > > > We have promised BSD systems have higher priority than Linux systems, and > > we will keep our promise. > > That's also great. The FreeBSD Foundation has some funding set aside for > linker work, but currently nothing concrete to spend it on, so I'd strongly > invite people to submit project proposals in this area. > > > BTW, I think llvm-config is necessary for every LLVM-based project. If it > > will not be in BSD system, I think we can negotiate an approach to get > rid > > of it. > > Just like what Android did. > > I think the rationale for not having it in the base system is sensible: we > don't want things from outside the base system to link against the LLVM > from the base system. When other things are imported, we will most likely > replace their own build system (as we do with LLVM itself) and so can hard > code the location of the LLVM that they link against. > > David From owner-freebsd-toolchain@FreeBSD.ORG Wed Jul 25 13:41:41 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C131106566C for ; Wed, 25 Jul 2012 13:41:41 +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 DC2E68FC15 for ; Wed, 25 Jul 2012 13:41:40 +0000 (UTC) Received: from [192.168.1.12] (unknown [176.222.238.90]) by csmtp2.one.com (Postfix) with ESMTPA id F12D3307BE1A; Wed, 25 Jul 2012 13:41:33 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: Erik Cederstrand In-Reply-To: Date: Wed, 25 Jul 2012 15:41:33 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <0048212B-ABA7-4CA1-983D-6B6A6DF66D35@cederstrand.dk> References: To: Luba Tang X-Mailer: Apple Mail (2.1278) Cc: freebsd-toolchain@freebsd.org Subject: Re: MCLinker and llvm-config 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: Wed, 25 Jul 2012 13:41:41 -0000 Luba, Thanks for the update. Den 25/07/2012 kl. 11.22 skrev Luba Tang: > BTW, I think llvm-config is necessary for every LLVM-based project. If = it > will not be in BSD system, I think we can negotiate an approach to get = rid > of it. I created a FreeBSD port for llvm-config for testing MCLinker, so this = is not a problem now. If MCLinker is imported into FreeBSD, I expect the = build system to be replaced, as David explained. As soon as your patches are committed to LLVM and backported to FreeBSD, = I'll see if I can submit a FreeBSD port for MCLinker for easier testing. Thanks, Erik 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= From owner-freebsd-toolchain@FreeBSD.ORG Sat Jul 28 14:15:56 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69162106566B for ; Sat, 28 Jul 2012 14:15:56 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm15-vm0.bullet.mail.sp2.yahoo.com (nm15-vm0.bullet.mail.sp2.yahoo.com [98.139.91.208]) by mx1.freebsd.org (Postfix) with SMTP id 3D7638FC12 for ; Sat, 28 Jul 2012 14:15:56 +0000 (UTC) Received: from [72.30.22.77] by nm15.bullet.mail.sp2.yahoo.com with NNFMP; 28 Jul 2012 14:15:50 -0000 Received: from [98.139.91.40] by tm11.bullet.mail.sp2.yahoo.com with NNFMP; 28 Jul 2012 14:15:50 -0000 Received: from [127.0.0.1] by omp1040.mail.sp2.yahoo.com with NNFMP; 28 Jul 2012 14:15:50 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 953974.71994.bm@omp1040.mail.sp2.yahoo.com Received: (qmail 39510 invoked by uid 60001); 28 Jul 2012 14:15:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1343484950; bh=Vc0J3+rXiQS1DVHfW59CwGaRq0ichY4iG8swghngfCE=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=WGoCPfKxNR9LDD6dvEWiwe2YlsHpvO/RG2L5iAypviGgv6qBbXePfWnSItQVihZcyhWlyOfs8kXFihI7/bE1hTe49Gg6eyUu27kPDrLUIXAa0oHnR2tMbvXRiBlZAWU6K4ALfAhjJjK9avEEJEn1A5nSNsdHRIcqh11+Eouh6IE= X-YMail-OSG: oqm5N6sVM1l2bAkOFI9Uab.h.NZ.wjWK57qnXLw5ZQVEnk. GSoSnCZgIF7u8NL.NhpBlf0ZtVoOnGhQ0UplgzRa._UjrOY3ER3Hf2zw0wmr NEdiPtA429lS5K22Zcy1fydcV5Fu6ALp5cjcaFmIRFauKY1pAWzox3f2GMgS OeA2LW35j3ipbCrQWiBGz3ef6UVgwr7QVuB5mytAfuR4YcDxIZPAFJqrda3Y 1_4aQqAv79YTYrbLBzBECqKLJgClJ5zPEJYOn0hWpzrHSv6UxUDXZrUWZnkr U3ylzna.TOAOvQOXl7WLEjvUfVvKte7LuWos9LPCY4zAEi.bebwPAYotnP7N 8DEou.M3S3pCqmmsRfhDrIRtSnwMJj2V_shXJECfx_Wt_kAAjgt5qBPuFCIs olhuv0WWdMCEdYoKWueEsZ1P_UNFO5X_V6TRXO2ElJ2_GCnHyjPtSv65XInV rsgzWLLFtTkku.cF1T43EmWsUJEcibw0whQ_P0objrabqA6NTEZSBmnoL6wG vji5h5Pttf9sUGX6MyxWdWwIjc7nnOWm4lHhSoLlt5en6r5eC57SigIgTC_r d Received: from [200.118.157.7] by web113506.mail.gq1.yahoo.com via HTTP; Sat, 28 Jul 2012 07:15:50 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailWebService/0.8.120.356233 Message-ID: <1343484950.37325.YahooMailNeo@web113506.mail.gq1.yahoo.com> Date: Sat, 28 Jul 2012 07:15:50 -0700 (PDT) From: Pedro Giffuni To: Erik Cederstrand , "freebsd-toolchain@freebsd.org" MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: BSD ld (was Re: MCLinker and llvm-config) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Pedro Giffuni List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jul 2012 14:15:56 -0000 Hello;=0A=0AThe Elftoolchain project has been developing a BSD ld:=0A=0Ahtt= p://sourceforge.net/apps/trac/elftoolchain/=A0=0A=0A=0Ahttp://sourceforge.n= et/apps/trac/elftoolchain/browser/trunk/ld=A0=0A=0A=0AI thought that would = be the official FreeBSD implementation.=0A=0Acheers,=0A=0APedro. From owner-freebsd-toolchain@FreeBSD.ORG Sat Jul 28 16:15:25 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 AA517106564A; Sat, 28 Jul 2012 16:15:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 62B8A8FC0A; Sat, 28 Jul 2012 16:15:25 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:2ddc:c530:4913:4fc8] (unknown [IPv6:2001:7b8:3a7:0:2ddc:c530:4913:4fc8]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 46F855C37; Sat, 28 Jul 2012 18:15:24 +0200 (CEST) Message-ID: <50141021.8040700@FreeBSD.org> Date: Sat, 28 Jul 2012 18:15:29 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Pedro Giffuni References: <1343484950.37325.YahooMailNeo@web113506.mail.gq1.yahoo.com> In-Reply-To: <1343484950.37325.YahooMailNeo@web113506.mail.gq1.yahoo.com> X-Enigmail-Version: 1.5a1pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "freebsd-toolchain@freebsd.org" Subject: Re: BSD ld (was Re: MCLinker and llvm-config) 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: Sat, 28 Jul 2012 16:15:25 -0000 On 2012-07-28 16:15, Pedro Giffuni wrote: > The Elftoolchain project has been developing a BSD ld: > > http://sourceforge.net/apps/trac/elftoolchain/ > > > http://sourceforge.net/apps/trac/elftoolchain/browser/trunk/ld > > > I thought that would be the official FreeBSD implementation. Let's just say there really isn't any consensus yet, except that GNU ld should be binned. :) At EuroBSDCon 2011 there was a toolchain WG, where a few ideas and requirements for a good system linker were shuffled around. See Brooks' report here: http://wiki.freebsd.org/201110DevSummit/Toolchain?action=AttachFile&do=view&target=toolchain-wg-report.pdf From owner-freebsd-toolchain@FreeBSD.ORG Sat Jul 28 16:36:31 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B46D5106566B; Sat, 28 Jul 2012 16:36:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 2EC6B8FC14; Sat, 28 Jul 2012 16:36:30 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q6SGadZa031493; Sat, 28 Jul 2012 19:36:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q6SGaRcc026089; Sat, 28 Jul 2012 19:36:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q6SGaRME026088; Sat, 28 Jul 2012 19:36:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 28 Jul 2012 19:36:27 +0300 From: Konstantin Belousov To: Dimitry Andric Message-ID: <20120728163627.GJ2676@deviant.kiev.zoral.com.ua> References: <1343484950.37325.YahooMailNeo@web113506.mail.gq1.yahoo.com> <50141021.8040700@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BcdBrJ7VxrpNMUFN" Content-Disposition: inline In-Reply-To: <50141021.8040700@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Pedro Giffuni , "freebsd-toolchain@freebsd.org" Subject: Re: BSD ld (was Re: MCLinker and llvm-config) 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: Sat, 28 Jul 2012 16:36:31 -0000 --BcdBrJ7VxrpNMUFN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 28, 2012 at 06:15:29PM +0200, Dimitry Andric wrote: > On 2012-07-28 16:15, Pedro Giffuni wrote: > > The Elftoolchain project has been developing a BSD ld: > >=20 > > http://sourceforge.net/apps/trac/elftoolchain/=20 > >=20 > >=20 > > http://sourceforge.net/apps/trac/elftoolchain/browser/trunk/ld=20 > >=20 > >=20 > > I thought that would be the official FreeBSD implementation. >=20 > Let's just say there really isn't any consensus yet, except that GNU ld > should be binned. :)=20 >=20 > At EuroBSDCon 2011 there was a toolchain WG, where a few ideas and > requirements for a good system linker were shuffled around. See > Brooks' report here: >=20 > http://wiki.freebsd.org/201110DevSummit/Toolchain?action=3DAttachFile&do= =3Dview&target=3Dtoolchain-wg-report.pdf This looks very futile and disorganized. When I tried to overlook only the basic features of modern linker required to build base, I ended up with approximately twenty-pages document, consisting mostly of enumerations of features. Consider this fully consumed by 'GNU ld compAtibility" in the referenced document. Other items looks mis-placed, e.g. multiple hash tables support is very technical and mundane, comparing with LTO/IR/incremental support, which ties the linker to compiler. And, the list of architectures provided shall be exploded since many architectures listed support different ABIs, which has direct impact on the linker functionality. My impression is that the list provided has no relation to 'good system linker requirements'. --BcdBrJ7VxrpNMUFN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlAUFQoACgkQC3+MBN1Mb4hMuQCgg6tdqyawheBufM620nUlHS1g JcsAnjvh3tEBxmeg7NfLBNDUhCfvydO8 =izMQ -----END PGP SIGNATURE----- --BcdBrJ7VxrpNMUFN--