From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7715 Path: news.gmane.org!not-for-mail From: Raphael Cohn Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: [PATCH] Build process uses script to add CFI directives to x86 asm Date: Wed, 20 May 2015 12:57:59 +0530 Message-ID: References: <20150519162224.GA6317@alex-ThinkPad-L530> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113d58acd32fb805167e5d85 X-Trace: ger.gmane.org 1432106895 17356 80.91.229.3 (20 May 2015 07:28:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 May 2015 07:28:15 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7727-gllmg-musl=m.gmane.org@lists.openwall.com Wed May 20 09:28:15 2015 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 1YuyQI-0006OX-DB for gllmg-musl@m.gmane.org; Wed, 20 May 2015 09:28:14 +0200 Original-Received: (qmail 32308 invoked by uid 550); 20 May 2015 07:28:12 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32285 invoked from network); 20 May 2015 07:28:11 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=3txb6ZTnB2FRRlMEbBsma2/FVuqHE7tjHc90Qjs50Ao=; b=RFPpBgNjTjERjnlYOU3WIv8F6NE4nhrJarNL8mg3TLB5wtap820s69Ckg85ZskwFsY YqTc/2EVZlfgktEYTc2SVORLUmmYcC6j47HqpDmGPPBxG0Vsdly5wUsy9OGKt1gVuwtU BLOzvqlETi5r9lkzm09f5CFR/2WF08gK+rH8hWCX3yTmcyPHkA3ahDKPsSrVkKTNRaYH hfZmH+e4QypwuNIt9Eazl48rTrHgBsBB1uZ0Dc3t4i5it32+4yZnCITQ4CF22eKxkEaF BlUwZTiwbNbPsuOvzZMXu0BitIwFw8CclbneNLfM4GxnK9C3n8I6UmhTNom2L0TbLQw3 oOZA== X-Gm-Message-State: ALoCoQmmGnFsPcaKkXsDUNg4s8Q0K7ZPIXCK2jMVu1nU7Jtb2E2YV7NETafGfaz3MKmjssPgdXtX X-Received: by 10.202.215.5 with SMTP id o5mr3983296oig.4.1432106879357; Wed, 20 May 2015 00:27:59 -0700 (PDT) X-Originating-IP: [117.223.140.34] In-Reply-To: <20150519162224.GA6317@alex-ThinkPad-L530> Xref: news.gmane.org gmane.linux.lib.musl.general:7715 Archived-At: --001a113d58acd32fb805167e5d85 Content-Type: text/plain; charset=UTF-8 Writing portable shell script is a little hard, but I've found a good approach is to make something ancient like pdksh a symlink for /bin/sh and even /bin/bash - typically in a small VM. This makes it much more likely that your code will work without big changes on AIX, BSDs, etc. The other way is to use dash, not BusyBox ash, as BusyBox ash includes a few bashisms depending on the configure options at build time. If you're looking for cross-script ways of solving problems, then feel free to nab implementations from my shellfire repo ( https://github.com/shellfire-dev/shellfire et al). On 19 May 2015 at 21:52, Alex Dowad wrote: > > configure already uses its own echo definition > > > so ash's echo should not be used > > > how did the config script end up calling ash's echo? > > OK, thanks for pointing this out. I shouldn't have said that the problem > was > with ash's echo. > > The original configure script worked when I ran it on Linux Mint + bash, > and didn't > work on Alpine Linux + BusyBox ash. I didn't notice echo() in the > configure script, > did some experimentation with bash's echo and ash's, found a difference > which seemed > to explain the observed problem, and worked around it. > > Now it looks like the issue was something else. I can't seem to duplicate > the problem > right this moment; however, the configure script as it is right now works > on both > platforms. > > Mysteries, mysteries... > > AD > --001a113d58acd32fb805167e5d85 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Writing portable shell script is a little hard, but I= 've found a good approach is to make something ancient like pdksh a sym= link for /bin/sh and even /bin/bash - typically in a small VM. This makes i= t much more likely that your code will work without big changes on AIX, BSD= s, etc. The other way is to use dash, not BusyBox ash, as BusyBox ash inclu= des a few bashisms depending on the configure options at build time.
If you're looking for cross-script ways of solving problems, the= n feel free to nab implementations from my shellfire repo (https://github.com/shellfire-dev/she= llfire et al).


On 19 May 2015 at 21:52, Alex Dowad &l= t;alexinbeijin= g@gmail.com> wrote:
> configure already uses its own echo definition

> so ash's echo should not be used

> how did the config script end up calling ash's echo?

OK, thanks for pointing this out. I shouldn't have said that the= problem was
with ash's echo.

The original configure script worked when I ran it on Linux Mint + bash, an= d didn't
work on Alpine Linux + BusyBox ash. I didn't notice echo() in the confi= gure script,
did some experimentation with bash's echo and ash's, found a differ= ence which seemed
to explain the observed problem, and worked around it.

Now it looks like the issue was something else. I can't seem to duplica= te the problem
right this moment; however, the configure script as it is right now works o= n both
platforms.

Mysteries, mysteries...

AD

--001a113d58acd32fb805167e5d85--