public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/14760] New: A bug in configure{,.in} prevents using both --program-suffix and --program-prefix
@ 2004-03-28 14:58 yoush at cs dot msu dot su
  2004-04-04  6:09 ` [Bug bootstrap/14760] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: yoush at cs dot msu dot su @ 2004-03-28 14:58 UTC (permalink / raw)
  To: gcc-bugs

Hello. 
 
When options like --program-suffix and --program-prefix are passed to configure 
script, they are normally converted to a sed program and then discarded, so 
when configure is called to subdirs, these options are not passed. 
 
This logic is implemented by the following code from configure.in: 
 
cat <<\EOF_SED > conftestsed 
s/ --no[[^ ]]* / / 
s/ --c[[a-z-]]*[[= ]][[^ ]]* / / 
s/ --sr[[a-z-]]*[[= ]][[^ ]]* / / 
s/ --ho[[a-z-]]*[[= ]][[^ ]]* / / 
s/ --bu[[a-z-]]*[[= ]][[^ ]]* / / 
s/ --t[[a-z-]]*[[= ]][[^ ]]* / / 
s/ --program-[[pst]][[a-z-]]*[[= ]][[^ ]]* / / 
s/ -cache-file[[= ]][[^ ]]* / / 
s/ -srcdir[[= ]][[^ ]]* / / 
s/ -host[[= ]][[^ ]]* / / 
s/ -build[[= ]][[^ ]]* / / 
s/ -target[[= ]][[^ ]]* / / 
s/ -program-prefix[[= ]][[^ ]]* / / 
s/ -program-suffix[[= ]][[^ ]]* / / 
s/ -program-transform-name[[= ]][[^ ]]* / / 
s/ [[^' -][^ ]*] / / 
s/^ *//;s/ *$// 
s,\$,$$,g 
EOF_SED 
sed -f conftestsed <<EOF_SED > conftestsed.out 
 ${ac_configure_args} 
EOF_SED 
baseargs=`cat conftestsed.out` 
rm -f conftestsed conftestsed.out 
 
If both --program-prefix and --program-suffix will be given, the corresponding 
regilar expression ' --program-[[pst]][[a-z-]]*[[= ]][[^ ]]* ' will catch only 
first of two, not touching the second. Since not-discarded option is already 
converted to a sed program, lated this will result in either prefix of suffix 
(what happens to be second) added twice to program names. 
 
This could be fixed trivially - just add 'g' modifier to corresponding line of 
the above sed program: 
 
--- configure.in.orig   2004-02-06 10:03:08.000000000 +0300 
+++ configure.in        2004-03-10 00:39:05.000000000 +0300 
@@ -1778,7 +1778,7 @@ 
 s/ --ho[[a-z-]]*[[= ]][[^ ]]* / / 
 s/ --bu[[a-z-]]*[[= ]][[^ ]]* / / 
 s/ --t[[a-z-]]*[[= ]][[^ ]]* / / 
-s/ --program-[[pst]][[a-z-]]*[[= ]][[^ ]]* / / 
+s/ --program-[[pst]][[a-z-]]*[[= ]][[^ ]]* / /g 
 s/ -cache-file[[= ]][[^ ]]* / / 
 s/ -srcdir[[= ]][[^ ]]* / / 
 s/ -host[[= ]][[^ ]]* / / 
 
I faced this problem when I worked with Debian gcc-3.4 source package to make 
it build cross-compilers. So I am reporting this against 3.4. However, most 
likely the same buglet is also there in other gcc branches.

-- 
           Summary: A bug in configure{,.in} prevents using both --program-
                    suffix and --program-prefix
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: yoush at cs dot msu dot su
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug bootstrap/14760] A bug in configure{,.in} prevents using both --program-suffix and --program-prefix
  2004-03-28 14:58 [Bug bootstrap/14760] New: A bug in configure{,.in} prevents using both --program-suffix and --program-prefix yoush at cs dot msu dot su
@ 2004-04-04  6:09 ` pinskia at gcc dot gnu dot org
  2004-04-07  1:41 ` cvs-commit at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-04  6:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-04 06:09 -------
Confirmed, patches should be sent to gcc-patches@gcc.gnu.org ___after___ reading <
http://gcc.gnu.org/contribute.html>.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-04-04 06:09:35
               date|                            |


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


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

* [Bug bootstrap/14760] A bug in configure{,.in} prevents using both --program-suffix and --program-prefix
  2004-03-28 14:58 [Bug bootstrap/14760] New: A bug in configure{,.in} prevents using both --program-suffix and --program-prefix yoush at cs dot msu dot su
  2004-04-04  6:09 ` [Bug bootstrap/14760] " pinskia at gcc dot gnu dot org
@ 2004-04-07  1:41 ` cvs-commit at gcc dot gnu dot org
  2004-04-07  1:43 ` neroden at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-04-07  1:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-04-07 01:40 -------
Subject: Bug 14760

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	neroden@gcc.gnu.org	2004-04-07 01:40:24

Modified files:
	.              : configure configure.in ChangeLog 

Log message:
	PR bootstrap/14760
	* configure.in: When computing baseargs, strip *all* copies of
	offending options.  Also, don't match/substitute the trailing space,
	so that this actually works when two similar options are separated by
	only one space.
	* configure: Regenerate.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/configure.diff?cvsroot=gcc&r1=1.141&r2=1.142
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/configure.in.diff?cvsroot=gcc&r1=1.281&r2=1.282
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.904&r2=1.905



-- 


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


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

* [Bug bootstrap/14760] A bug in configure{,.in} prevents using both --program-suffix and --program-prefix
  2004-03-28 14:58 [Bug bootstrap/14760] New: A bug in configure{,.in} prevents using both --program-suffix and --program-prefix yoush at cs dot msu dot su
  2004-04-04  6:09 ` [Bug bootstrap/14760] " pinskia at gcc dot gnu dot org
  2004-04-07  1:41 ` cvs-commit at gcc dot gnu dot org
@ 2004-04-07  1:43 ` neroden at gcc dot gnu dot org
  2004-04-07  1:50 ` [Bug bootstrap/14760] [3.4 regression]A " neroden at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: neroden at gcc dot gnu dot org @ 2004-04-07  1:43 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |neroden at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Target Milestone|---                         |3.4.1


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


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

* [Bug bootstrap/14760] [3.4 regression]A bug in configure{,.in} prevents using both --program-suffix and --program-prefix
  2004-03-28 14:58 [Bug bootstrap/14760] New: A bug in configure{,.in} prevents using both --program-suffix and --program-prefix yoush at cs dot msu dot su
                   ` (2 preceding siblings ...)
  2004-04-07  1:43 ` neroden at gcc dot gnu dot org
@ 2004-04-07  1:50 ` neroden at gcc dot gnu dot org
  2004-06-12 22:54 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: neroden at gcc dot gnu dot org @ 2004-04-07  1:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From neroden at gcc dot gnu dot org  2004-04-07 01:50 -------
I would like to add the same patch I added to mainline to 3.4 branch, after it 
reopens (the state of mainline and 3.4 branch was identical for this code).  
If this got in before 3.4, of course, that would be cool. 
 
This does not affect 3.3 branch. 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at codesourcery dot com
            Summary|A bug in configure{,.in}    |[3.4 regression]A bug in
                   |prevents using both --      |configure{,.in} prevents
                   |program-suffix and --       |using both --program-suffix
                   |program-prefix              |and --program-prefix


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


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

* [Bug bootstrap/14760] [3.4 regression]A bug in configure{,.in} prevents using both --program-suffix and --program-prefix
  2004-03-28 14:58 [Bug bootstrap/14760] New: A bug in configure{,.in} prevents using both --program-suffix and --program-prefix yoush at cs dot msu dot su
                   ` (3 preceding siblings ...)
  2004-04-07  1:50 ` [Bug bootstrap/14760] [3.4 regression]A " neroden at gcc dot gnu dot org
@ 2004-06-12 22:54 ` mmitchel at gcc dot gnu dot org
  2004-06-19  0:03 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-12 22:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-06-12 22:54 -------
Nathanael, this is fine for 3.4.1.

-- 


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


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

* [Bug bootstrap/14760] [3.4 regression]A bug in configure{,.in} prevents using both --program-suffix and --program-prefix
  2004-03-28 14:58 [Bug bootstrap/14760] New: A bug in configure{,.in} prevents using both --program-suffix and --program-prefix yoush at cs dot msu dot su
                   ` (4 preceding siblings ...)
  2004-06-12 22:54 ` mmitchel at gcc dot gnu dot org
@ 2004-06-19  0:03 ` mmitchel at gcc dot gnu dot org
  2004-06-25 21:34 ` cvs-commit at gcc dot gnu dot org
  2004-06-25 21:37 ` mmitchel at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-19  0:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-06-19 00:03 -------
Nathanel, would you please apply this patch ASAP?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |neroden at gcc dot gnu dot
                   |                            |org


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


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

* [Bug bootstrap/14760] [3.4 regression]A bug in configure{,.in} prevents using both --program-suffix and --program-prefix
  2004-03-28 14:58 [Bug bootstrap/14760] New: A bug in configure{,.in} prevents using both --program-suffix and --program-prefix yoush at cs dot msu dot su
                   ` (5 preceding siblings ...)
  2004-06-19  0:03 ` mmitchel at gcc dot gnu dot org
@ 2004-06-25 21:34 ` cvs-commit at gcc dot gnu dot org
  2004-06-25 21:37 ` mmitchel at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-25 21:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-25 21:33 -------
Subject: Bug 14760

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2004-06-25 21:33:21

Modified files:
	.              : ChangeLog configure.in configure 

Log message:
	PR bootstrap/14760
	* configure.in: When computing baseargs, strip *all* copies of
	offending options.  Also, don't match/substitute the trailing space,
	so that this actually works when two similar options are separated by
	only one space.
	* configure: Regenerate.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.856.2.14&r2=1.856.2.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/configure.in.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.266.4.2&r2=1.266.4.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/configure.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.126.4.2&r2=1.126.4.3



-- 


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


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

* [Bug bootstrap/14760] [3.4 regression]A bug in configure{,.in} prevents using both --program-suffix and --program-prefix
  2004-03-28 14:58 [Bug bootstrap/14760] New: A bug in configure{,.in} prevents using both --program-suffix and --program-prefix yoush at cs dot msu dot su
                   ` (6 preceding siblings ...)
  2004-06-25 21:34 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-25 21:37 ` mmitchel at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-25 21:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-06-25 21:33 -------
I applied this patch.

Fixed in GCC 3.4.1.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2004-06-25 21:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-28 14:58 [Bug bootstrap/14760] New: A bug in configure{,.in} prevents using both --program-suffix and --program-prefix yoush at cs dot msu dot su
2004-04-04  6:09 ` [Bug bootstrap/14760] " pinskia at gcc dot gnu dot org
2004-04-07  1:41 ` cvs-commit at gcc dot gnu dot org
2004-04-07  1:43 ` neroden at gcc dot gnu dot org
2004-04-07  1:50 ` [Bug bootstrap/14760] [3.4 regression]A " neroden at gcc dot gnu dot org
2004-06-12 22:54 ` mmitchel at gcc dot gnu dot org
2004-06-19  0:03 ` mmitchel at gcc dot gnu dot org
2004-06-25 21:34 ` cvs-commit at gcc dot gnu dot org
2004-06-25 21:37 ` mmitchel at gcc dot gnu dot 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).