diff mbox

[ada] : Fix PR/50942

Message ID CAEwic4Y2gnqVfe6POopR7fqEaXg7r2iRfHxuMJYZ5DrW0j+uzw@mail.gmail.com
State New
Headers show

Commit Message

Kai Tietz Feb. 9, 2012, 4:25 p.m. UTC
Hi,

this fix ada bootstrap issue for stage 3 for windows native builds

ChangeLog

2012-02-09  Kai Tietz  <ktietz@redhat.com>

	PR ada/50942
	* gcc-interface/Makefile.in (LN_S): Add r-option.

Tested for i686-w64-mingw32.  Ok for apply?

Regards,
Kai

Comments

Tristan Gingold Feb. 9, 2012, 4:30 p.m. UTC | #1
On Feb 9, 2012, at 5:25 PM, Kai Tietz wrote:

> Hi,
> 
> this fix ada bootstrap issue for stage 3 for windows native builds
> 
> ChangeLog
> 
> 2012-02-09  Kai Tietz  <ktietz@redhat.com>
> 
> 	PR ada/50942
> 	* gcc-interface/Makefile.in (LN_S): Add r-option.
> 
> Tested for i686-w64-mingw32.  Ok for apply?

Puzzling.  Aren't these variables only defined on VMS hosts, due to the ifeq just before ?

Tristan.

> 
> Regards,
> Kai
> 
> Index: gcc/gcc/ada/gcc-interface/Makefile.in
> ===================================================================
> --- gcc.orig/gcc/ada/gcc-interface/Makefile.in
> +++ gcc/gcc/ada/gcc-interface/Makefile.in
> @@ -1485,7 +1485,7 @@ ifeq ($(strip $(filter-out alpha64 ia64
> soext  = .exe
> hyphen = _
> LN = cp -p
> -LN_S = cp -p
> +LN_S = cp -pr
> 
> .SUFFIXES: .sym
Arnaud Charlet Feb. 9, 2012, 4:36 p.m. UTC | #2
> this fix ada bootstrap issue for stage 3 for windows native builds
> 
> ChangeLog
> 
> 2012-02-09  Kai Tietz  <ktietz@redhat.com>
> 
> 	PR ada/50942
> 	* gcc-interface/Makefile.in (LN_S): Add r-option.
> 
> Tested for i686-w64-mingw32.  Ok for apply?

No, this chunk is only relevant for VMS so cannot possibly fix
anything on Windows.

Can you give the exact error message you are getting?

AFAIK, LN_S is/should only be used for files, not directories BTW,
so your change would be wrong even if in a Windows section.

Arno
Kai Tietz Feb. 9, 2012, 6:55 p.m. UTC | #3
2012/2/9 Arnaud Charlet <charlet@adacore.com>:
>> this fix ada bootstrap issue for stage 3 for windows native builds
>>
>> ChangeLog
>>
>> 2012-02-09  Kai Tietz  <ktietz@redhat.com>
>>
>>       PR ada/50942
>>       * gcc-interface/Makefile.in (LN_S): Add r-option.
>>
>> Tested for i686-w64-mingw32.  Ok for apply?
>
> No, this chunk is only relevant for VMS so cannot possibly fix
> anything on Windows.
>
> Can you give the exact error message you are getting?
>
> AFAIK, LN_S is/should only be used for files, not directories BTW,
> so your change would be wrong even if in a Windows section.
>
> Arno

Hmm, I interpret 'ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms%
openvms% alphavms%,$(host))),)' as anthing not mentioned here.

The bug is as described in the bug-report:

Failure on Stage 3 when a make script try to execute following command:

cp -p ../.././gcc/ada/rts adainclude

Error messgage:

cp: omitting directory '../.././gcc/ada/rts'

Regards,
Kai
Dave Korn Feb. 9, 2012, 7:14 p.m. UTC | #4
On 09/02/2012 18:55, Kai Tietz wrote:
> Hmm, I interpret 'ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms%
> openvms% alphavms%,$(host))),)' as anthing not mentioned here.

  "If, after removing alpha64 ia64 dec hp vms% openvms% alphavms% (and stray
whitespace) from the host, what remains is equal to nothing" -> "If host
consists only of things in alpha64 ia64 dec hp vms% openvms% alphavms%".

  It's a slightly confusing construct I agree.  Watch out for the difference
between filter vs. filter-out and ifeq vs. ifneq, and note that that final
comma indicates there's an empty string as arg2 of the if condition.

    cheers,
      DaveK
Arnaud Charlet Feb. 9, 2012, 7:59 p.m. UTC | #5
> Hmm, I interpret 'ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms%
> openvms% alphavms%,$(host))),)' as anthing not mentioned here.

That's a misunderstanding as explained by Dave Korn.

> The bug is as described in the bug-report:
> 
> Failure on Stage 3 when a make script try to execute following command:
> 
> cp -p ../.././gcc/ada/rts adainclude

We should never have such a command emitted by make, so the error is
elsewhere/earlier. I suspect some variable didn't get expanded properly.

It's possibly a bug in the version/port of make that you are using.

Arno
Iain Sandoe Feb. 9, 2012, 8:09 p.m. UTC | #6
On 9 Feb 2012, at 19:59, Arnaud Charlet wrote:

>> The bug is as described in the bug-report:
>>
>> Failure on Stage 3 when a make script try to execute following  
>> command:
>>
>> cp -p ../.././gcc/ada/rts adainclude
>
> We should never have such a command emitted by make, so the error is
> elsewhere/earlier. I suspect some variable didn't get expanded  
> properly.

nevertheless on Darwin (with GNU make 3.81) we get ..

rm -rf adalib
ln -s ../.././gcc/ada/rts adainclude
ln -s ../.././gcc/ada/rts adalib

> It's possibly a bug in the version/port of make that you are using.

maybe .. but it appears to be wider than just windows.

Iain
Arnaud Charlet Feb. 9, 2012, 9:09 p.m. UTC | #7
> nevertheless on Darwin (with GNU make 3.81) we get ..
> 
> rm -rf adalib
> ln -s ../.././gcc/ada/rts adainclude
> ln -s ../.././gcc/ada/rts adalib

Ah, this comes from libada/Makefile.in and is actually "expected",
even though it's a bit kludgy IMO. This was introduced by revision 145622
to handle multilibs, I complete forgot about this special handling.

In any case, the fix if any belongs either in configure
or in libada/Makefile.in, not in gcc-interface.

Arno
diff mbox

Patch

Index: gcc/gcc/ada/gcc-interface/Makefile.in
===================================================================
--- gcc.orig/gcc/ada/gcc-interface/Makefile.in
+++ gcc/gcc/ada/gcc-interface/Makefile.in
@@ -1485,7 +1485,7 @@  ifeq ($(strip $(filter-out alpha64 ia64
 soext  = .exe
 hyphen = _
 LN = cp -p
-LN_S = cp -p
+LN_S = cp -pr

 .SUFFIXES: .sym