public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/52847] New: "case" shell quoting problem in top-level makefile
@ 2012-04-03 17:58 skunk at iskunk dot org
  2012-04-24  4:01 ` [Bug bootstrap/52847] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: skunk at iskunk dot org @ 2012-04-03 17:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52847

             Bug #: 52847
           Summary: "case" shell quoting problem in top-level makefile
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: skunk@iskunk.org


[Configured on AIX with CC="gcc -mminimal-toc"]

$ gmake bootstrap-lean
echo stage3 > stage_final
/opt/freeware/bin/bash: command substitution: line 1: syntax error near
unexpected token `-mminimal-toc'
/opt/freeware/bin/bash: command substitution: line 1: `case gcc -mminimal-toc
in *gcc*) echo -Wl,-bbigtoc ;; esac;'
gmake[1]: Entering directory `/tmp/gcc-4.7.0-build'
gmake[2]: Entering directory `/tmp/gcc-4.7.0-build'
gmake[2]: Leaving directory `/tmp/gcc-4.7.0-build'
gmake[2]: Entering directory `/tmp/gcc-4.7.0-build'
Configuring stage 1 in ./intl
configure: creating cache ./config.cache
checking whether gmake sets $(MAKE)... yes
[...]

The above warning comes from the below line in the top-level makefile, under
the "host and target specific makefile fragments come in here" header:

    LDFLAGS = `case $(CC) in *gcc*) echo -Wl,-bbigtoc ;; esac;`

I believe this needs to be written as

    LDFLAGS = `case "$(CC)" in *gcc*) echo -Wl,-bbigtoc ;; esac;`

in order to accommodate values of $(CC) which contain spaces.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bootstrap/52847] "case" shell quoting problem in top-level makefile
  2012-04-03 17:58 [Bug other/52847] New: "case" shell quoting problem in top-level makefile skunk at iskunk dot org
@ 2012-04-24  4:01 ` pinskia at gcc dot gnu.org
  2012-04-24  4:02 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-04-24  4:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52847

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |powerpc-*-aix*
          Component|other                       |bootstrap

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-04-24 04:00:41 UTC ---
>CC="gcc -mminimal-toc"

You should not need -mminimal-toc because of this toplevel makefile part.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bootstrap/52847] "case" shell quoting problem in top-level makefile
  2012-04-03 17:58 [Bug other/52847] New: "case" shell quoting problem in top-level makefile skunk at iskunk dot org
  2012-04-24  4:01 ` [Bug bootstrap/52847] " pinskia at gcc dot gnu.org
@ 2012-04-24  4:02 ` pinskia at gcc dot gnu.org
  2012-05-01 23:02 ` skunk at iskunk dot org
  2021-09-01  0:31 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-04-24  4:02 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52847

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-04-24
     Ever Confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-04-24 04:01:49 UTC ---
Index: config/mh-ppc-aix
===================================================================
--- config/mh-ppc-aix    (revision 186738)
+++ config/mh-ppc-aix    (working copy)
@@ -5,4 +5,4 @@
 # don't do it any more.
 BOOT_ADAFLAGS = -gnatapg
 BOOT_LDFLAGS = -Wl,-bbigtoc
-LDFLAGS = `case $(CC) in *gcc*) echo -Wl,-bbigtoc ;; esac;`
+LDFLAGS = `case "$(CC)" in *gcc*) echo -Wl,-bbigtoc ;; esac;`


Is the full patch.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bootstrap/52847] "case" shell quoting problem in top-level makefile
  2012-04-03 17:58 [Bug other/52847] New: "case" shell quoting problem in top-level makefile skunk at iskunk dot org
  2012-04-24  4:01 ` [Bug bootstrap/52847] " pinskia at gcc dot gnu.org
  2012-04-24  4:02 ` pinskia at gcc dot gnu.org
@ 2012-05-01 23:02 ` skunk at iskunk dot org
  2021-09-01  0:31 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: skunk at iskunk dot org @ 2012-05-01 23:02 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52847

--- Comment #3 from Daniel Richard G. <skunk at iskunk dot org> 2012-05-01 23:01:28 UTC ---
(In reply to comment #1)
> You should not need -mminimal-toc because of this toplevel makefile part.

Ah, good to know. If I don't set -mminimal-toc in CC, I see this when larger
executables are being linked...

    ld: 0711-783 WARNING: TOC overflow. TOC size: 474420    Maximum size: 65536
            Extra instructions are being generated for each reference to a TOC
            symbol if the symbol is in the TOC overflow area.

...but the warning is non-fatal, and bootstrapping is otherwise unaffected.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bootstrap/52847] "case" shell quoting problem in top-level makefile
  2012-04-03 17:58 [Bug other/52847] New: "case" shell quoting problem in top-level makefile skunk at iskunk dot org
                   ` (2 preceding siblings ...)
  2012-05-01 23:02 ` skunk at iskunk dot org
@ 2021-09-01  0:31 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-01  0:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52847

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.8.0

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed by r0-116582 which was 2 days after the last comment here (for GCC
4.8.0).

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-01  0:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-03 17:58 [Bug other/52847] New: "case" shell quoting problem in top-level makefile skunk at iskunk dot org
2012-04-24  4:01 ` [Bug bootstrap/52847] " pinskia at gcc dot gnu.org
2012-04-24  4:02 ` pinskia at gcc dot gnu.org
2012-05-01 23:02 ` skunk at iskunk dot org
2021-09-01  0:31 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).