From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10124 Path: news.gmane.org!not-for-mail From: "Zhao, Weiming" Newsgroups: gmane.linux.lib.musl.general Subject: Re: build musl for armv7m Date: Tue, 14 Jun 2016 09:12:17 -0700 Message-ID: <4858c023-2689-cec7-5335-15c33b8c8b92@codeaurora.org> References: <805971fb5f9b1ee12edab9b7f3e86114@codeaurora.org> <20160614130036.GD10893@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1465921558 18880 80.91.229.3 (14 Jun 2016 16:25:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jun 2016 16:25:58 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10137-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jun 14 18:25:43 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1bCqx8-000768-2U for gllmg-musl@m.gmane.org; Tue, 14 Jun 2016 18:12:34 +0200 Original-Received: (qmail 23891 invoked by uid 550); 14 Jun 2016 16:12:31 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 23870 invoked from network); 14 Jun 2016 16:12:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 In-Reply-To: <20160614130036.GD10893@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:10124 Archived-At: I haven't did a full test as the functions I modified are not actually being used. It is a bare-metal environment, using clang to compile. Main flags are -mcpu=cortex-m3 -Os -fdata-sections -ffunction-sections -mno-unaligned-access Could you please let me know the gas option? Thanks, Weiing On 6/14/2016 6:00 AM, Rich Felker wrote: > On Tue, Jun 14, 2016 at 01:49:40AM -0700, weimingz@codeaurora.org wrote: >> Hi, >> >> I'm building MUSL with -mcpu=cortex-m3. There are a few .s files >> that cannot be assembled because: (1) use predicated instructions >> without IT instr (2) use sp inside reg list in ldmia/stmia. >> >> Please help to review the attached patch. > Did you test anything? These patches do not result in working code; > they just make it assemble without errors. There's already a gas > option to automatically add IT instructions where needed for > thumb-only targets, but that's not the only thing needed to support > thumb-only/cortex-m. I'd be interested in knowing more about the setup > you're trying to target. Is it Linux or bare-metal? If Linux, are you > going to use the ARM/FDPIC toolchain & kernel mods? I'm about to leave > at the moment but I'll follow up with a more detailed review of your > patch later. > >> Also, is there any easy way of disabling string/arm/memcpy_le.S ? >> For baremetal, unaligned access may be unavailable. > That file does not perform any unaligned access. It should work on any > EABI-supported version of the arm instruction set. > > Rich -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation