From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94780 invoked by alias); 18 Nov 2016 17:24:21 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 94562 invoked by uid 89); 18 Nov 2016 17:24:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*UA:Zimbra, H*x:Zimbra, H*x:ZimbraWebClient, H*UA:ZimbraWebClient X-HELO: mx3-phx2.redhat.com Received: from mx3-phx2.redhat.com (HELO mx3-phx2.redhat.com) (209.132.183.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Nov 2016 17:24:07 +0000 Received: from zmail13.collab.prod.int.phx2.redhat.com (zmail13.collab.prod.int.phx2.redhat.com [10.5.83.15]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id uAIHO5KU023377; Fri, 18 Nov 2016 12:24:05 -0500 Date: Fri, 18 Nov 2016 17:24:00 -0000 From: Jeff Johnston To: Kai Yu Cc: newlib@sourceware.org Message-ID: <1764889052.454913.1479489845136.JavaMail.zimbra@redhat.com> In-Reply-To: References: Subject: Re: Can I compile newlib as a shared library on x86_64 linux-gnu? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016/txt/msg01106.txt.bz2 The shared library version of newlib has only been set up for ix86 linux, but not for x86_64 linux. There hasn't been much feedback regarding it so I am not sure many people are/were using it. It should be relatively straight-forward to make an x86_64 version if you want to give it a try. Basically, you need to create an x86_64 directory in each of the machine directories under libc/sys/linux. You can base files on the x86 versions. That said, the x86 code hasn't been modified for a while and will likely need some patching as it includes local system glibc header files which will have been updated and may cause build issues. -- Jeff J. ----- Original Message ----- > In newlib README file, it says that: > > Shared newlib > ============= > > newlib uses libtool when it is being compiled natively (with > --target=i[34567]86-pc-linux-gnu) on an i[34567]86-pc-linux-gnu > host. This allows newlib to be compiled as a shared library. > > To configure newlib, do the following from your build directory: > > $(source_dir)/src/configure --with-newlib --prefix=$(install_dir) > > configure will recognize that host == target == > i[34567]86-pc-linux-gnu, so it will tell newlib to compile itself using > libtool. By default, libtool will build shared and static versions of > newlib. > > Does it mean that we can build newlib shared library only on > i[34567]86-pc-linux-gnu host? > I tried to build newlib on x86_64-unknown-linux-gun just the way > above, but the Makefile generated > did nothing for newlib target. I also tried x86_64-unknown-linux-gun > as --target with cross-compiling > on i686-pc-linux-gnu, the Makefile still did nothing. > So please tell me can't we build newlib on x86_64 linux-gnu?? > > Thanks > Yu Kai >