Opened on 03/09/18 at 16:59:21
Closed on 03/09/18 at 19:26:18
#3328 closed defect (fixed)
bootstrap uses non-POSIX compliant echo -e
Reported by: | Amaan Cheval | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 5.1 |
Component: | build | Version: | 5 |
Severity: | normal | Keywords: | |
Cc: | Joel Sherrill | Blocked By: | |
Blocking: |
Description (last modified by Joel Sherrill)
On certain shells, the "-e" option is not supported, and causes echo to output the flag along with the quoted text.
-> % sh $ echo -e "foo bar" -e foo bar $
This varies by shell, and is not even consistent between sh or bash.
It was introduced while removing the make preinstall stage here, and may still work on most shells, though it didn't for me on sh on Ubuntu 16.04 LTS (4.4.0-78-generic x86_64 GNU/Linux) - as far as I can tell, this bug hasn't made it to any releases yet, so just fixing it on master should be enough.
A patch is attached.
Reference to the POSIX standard which confirms that -n is the only argument supported.
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html
Link to POSIX for printf(1):
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html
Attachments (1)
Change History (3)
Changed on 03/09/18 at 17:00:08 by Amaan Cheval
Attachment: | 0001-bootstrap-Use-printf-instead-of-echo-e-for-POSIX-she.patch added |
---|
comment:1 Changed on 03/09/18 at 19:10:16 by Joel Sherrill
Description: | modified (diff) |
---|
comment:2 Changed on 03/09/18 at 19:26:18 by Joel Sherrill
Milestone: | → 5.1 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Version: | → 5 |
This didn't close automatically on the commit.
http://git.rtems.org/rtems/commit/?id=4dfeba3a0e53d4b697b07f9c10783c411e43ccdf
Patch to use printf instead of echo -e