[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-09-11 Thread rai...@emrich-ebersheim.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

--- Comment #20 from Rainer Emrich  ---
(In reply to İsmail Dönmez from comment #18)
> (In reply to John David Anglin from comment #17)
> > Fixed on hppa*-*-hpux*.
> 
> Also fixes mingw-w64, thank you!

Confirmed, bootstraps on native x84_64-w64-mingw32 again.

[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-09-11 Thread rai...@emrich-ebersheim.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

Rainer Emrich  changed:

   What|Removed |Added

 CC||rai...@emrich-ebersheim.de

--- Comment #19 from Rainer Emrich  ---
*** Bug 67546 has been marked as a duplicate of this bug. ***


[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-09-10 Thread sebastian.hu...@embedded-brains.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

Sebastian Huber  changed:

   What|Removed |Added

 CC||sebastian.huber@embedded-br
   ||ains.de

--- Comment #11 from Sebastian Huber  ---
Yes, the mingw build is still broken.

Git has compatibility functions for setenv() and unsetenv():

https://github.com/git/git/blob/master/compat/setenv.c
https://github.com/git/git/blob/master/compat/unsetenv.c

Maybe something like this can be used in GCC as well.


[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-09-10 Thread ismail at i10z dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

--- Comment #13 from İsmail Dönmez  ---
(In reply to John David Anglin from comment #12)
> Created attachment 36321 [details]
> Patch
> 
> I sent this change this morning to gcc-patches but it seems to have
> disappeared.

The patch declares the functions but those functions do not exist on mingw-w64,
seems to be this will just fail with an undefined symbol error.

[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-09-10 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

--- Comment #12 from John David Anglin  ---
Created attachment 36321
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36321=edit
Patch

I sent this change this morning to gcc-patches but it seems to have
disappeared.


[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-09-10 Thread dave.anglin at bell dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

--- Comment #14 from dave.anglin at bell dot net ---
On 2015-09-10 1:01 PM, ismail at i10z dot com wrote:
> The patch declares the functions but those functions do not exist on 
> mingw-w64,
> seems to be this will just fail with an undefined symbol error.
The routines are in liberty and the patch assumes that that they are 
built.  If that's not the
case on mingw-w64, then they will have to be provided by some other means.

Dave


[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-09-10 Thread ismail at i10z dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

--- Comment #15 from İsmail Dönmez  ---
(In reply to dave.anglin from comment #14)
> On 2015-09-10 1:01 PM, ismail at i10z dot com wrote:
> > The patch declares the functions but those functions do not exist on 
> > mingw-w64,
> > seems to be this will just fail with an undefined symbol error.
> The routines are in liberty and the patch assumes that that they are 
> built.  If that's not the
> case on mingw-w64, then they will have to be provided by some other means.

Ah that makes sense, thanks!

[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-09-10 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

--- Comment #16 from John David Anglin  ---
Author: danglin
Date: Thu Sep 10 22:52:08 2015
New Revision: 227666

URL: https://gcc.gnu.org/viewcvs?rev=227666=gcc=rev
Log:
PR bootstrap/67363
* configure.ac: Check if setenv and unsetenv are declared.
* configure: Rebuild.
* config.in: Rebuild.
* system.h: Declare setenv and unsetenv if not declared.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config.in
trunk/gcc/configure
trunk/gcc/configure.ac
trunk/gcc/system.h


[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-09-10 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

--- Comment #17 from John David Anglin  ---
Fixed on hppa*-*-hpux*.


[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-09-10 Thread ismail at i10z dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

İsmail Dönmez  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #18 from İsmail Dönmez  ---
(In reply to John David Anglin from comment #17)
> Fixed on hppa*-*-hpux*.

Also fixes mingw-w64, thank you!

[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-09-04 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

John David Anglin  changed:

   What|Removed |Added

 CC||danglin at gcc dot gnu.org

--- Comment #10 from John David Anglin  ---
The setenv and unsetenv issue also affects hppa*-*-hpux*.


[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-08-31 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

Rainer Orth  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Rainer Orth  ---
Fixed for gcc 6.


[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-08-31 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

Rainer Orth  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-08-31
 CC||ro at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #4 from Rainer Orth  ---
Right: using xstrndup instead of strndup is the right fix and matches other
parts
of the gcc directory.  This patch also broke Solaris 10 bootstrap.

I'll later commit that fix as obvious.

  Rainer


[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-08-31 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

--- Comment #6 from Rainer Orth  ---
Author: ro
Date: Mon Aug 31 11:19:42 2015
New Revision: 227337

URL: https://gcc.gnu.org/viewcvs?rev=227337=gcc=rev
Log:
Avoid strndup in gcc.c (PR bootstrap/67363)

PR bootstrap/67363
* gcc.c (env_manager::xput): Replace strndup by xstrndup.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/gcc.c


[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-08-31 Thread ismail at i10z dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

İsmail Dönmez  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #8 from İsmail Dönmez  ---
(In reply to Rainer Orth from comment #7)
> Fixed for gcc 6.

Your patch didnt fix the mingw part. Reopening.

[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-08-31 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

Rainer Orth  changed:

   What|Removed |Added

   Assignee|dmalcolm at redhat dot com |ro at gcc dot gnu.org

--- Comment #5 from Rainer Orth  ---
Mine.


[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-08-31 Thread ismail at i10z dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

--- Comment #9 from İsmail Dönmez  ---
Looks like on MinGW putenv has to be used instead of setenv/unsetenv, dmalcolm
can you please have a look? I know MinGW is a Tier-NotSupported platform but it
was at least compiling before this change.

[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-08-30 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

--- Comment #3 from Eric Gallager egall at gwmail dot gwu.edu ---
Or actually, an even simpler solution to the strndup part of the bug would be
to just use xstrndup instead of strndup; then there's no worrying about which
header to add a declaration to, or anything related to that...


[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-08-30 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

--- Comment #2 from Eric Gallager egall at gwmail dot gwu.edu ---
Actually on further investigation, libiberty should already provide a strndup
implementation, the issue is just that it's not getting picked up here... I'm
not sure whether it would be better to put a declaration for it in
include/libiberty.h or in gcc/system.h though? Or both? The former seems like
the more correct location, but the latter was the one that actually worked,
so... I guess I should attach a patch for the latter then? Along with the
proper configure changes required for the ifdefs to work properly, that is...

(anyways, that's just the strndup part of the issue; I have no clue about the
setenv/unsetenv part in the original bug...)


[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-08-28 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

Eric Gallager egall at gwmail dot gwu.edu changed:

   What|Removed |Added

 CC||egall at gwmail dot gwu.edu

--- Comment #1 from Eric Gallager egall at gwmail dot gwu.edu ---
It also breaks building on darwin versions before 11. (I'm on darwin 9
currently, but I'm sure it would happen on darwin 10, too; strndup() wasn't
added to the darwin Libc till Lion...)


[Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64

2015-08-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |6.0
Summary|r227188 breaks build for|[6 Regression] r227188
   |mingw-w64   |breaks build for mingw-w64