Bug#862927: gnat (GCC 7) fails to build on m68k

2017-07-26 Thread John Paul Adrian Glaubitz
Control: reopen -1

On 07/17/2017 10:55 AM, John Paul Adrian Glaubitz wrote:
> On Fri, Jul 14, 2017 at 06:00:04PM +0200, John Paul Adrian Glaubitz wrote:
>> I had a go at this and came up with the attached patch which
>> fixes the problem for me.  With the patch applied, I can build
>> a gnat cross-compiler for m68k.
> 
> The patch has already been merged upstream, both on trunk [1] and in
> the gcc-7-branch [2], so carrying the patch is not necessary when
> including the next slew of SVN updates.

The current version of gcc-7 in unstable is missing the patch from [1]:

s-maccod.ads:36:15: violation of No_Elaboration_Code_All at line 37
s-maccod.ads:36:15: unit "System" does not have No_Elaboration_Code_All
../gcc-interface/Makefile:299: recipe for target 's-maccod.o' failed

I'll reopen this.

> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81446

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Bug#862927: gnat (GCC 7) fails to build on m68k

2017-07-17 Thread John Paul Adrian Glaubitz
On Fri, Jul 14, 2017 at 06:00:04PM +0200, John Paul Adrian Glaubitz wrote:
> I had a go at this and came up with the attached patch which
> fixes the problem for me.  With the patch applied, I can build
> a gnat cross-compiler for m68k.

The patch has already been merged upstream, both on trunk [1] and in
the gcc-7-branch [2], so carrying the patch is not necessary when
including the next slew of SVN updates.

Adrian

> [1] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=250224
> [2] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=250225

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Bug#862927: gnat (GCC 7) fails to build on m68k

2017-07-14 Thread John Paul Adrian Glaubitz
Package: src:gcc-7-cross-ports
Followup-For: Bug #862927
User: debian-...@lists.debian.org
Usertags: m68k

Hello!

I had a go at this and came up with the attached patch which
fixes the problem for me.  With the patch applied, I can build
a gnat cross-compiler for m68k.

Cheers,
Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
--- a/src/gcc/ada/system-linux-m68k.ads.orig	2016-12-05 12:27:55.0 +0100
+++ b/src/gcc/ada/system-linux-m68k.ads	2017-07-14 16:07:32.442768480 +0200
@@ -40,6 +40,9 @@
--  this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
--  2005, this is Pure in any case (AI-362).
 
+   pragma No_Elaboration_Code_All;
+   --  Allow the use of that restriction in units that WITH this unit
+
type Name is (SYSTEM_NAME_GNAT);
System_Name : constant Name := SYSTEM_NAME_GNAT;
 
@@ -126,7 +129,7 @@
--  of the individual switch values.
 
Backend_Divide_Checks : constant Boolean := False;
-   Backend_Overflow_Checks   : constant Boolean := False;
+   Backend_Overflow_Checks   : constant Boolean := True;
Command_Line_Args : constant Boolean := True;
Configurable_Run_Time : constant Boolean := False;
Denorm: constant Boolean := True;


Bug#862927: gnat (GCC 7) fails to build on m68k

2017-05-18 Thread Matthias Klose
Package: src:gcc-7-cross-ports
Version: 1

Trying to build a gnat m68k cross compiler fails with:

/home/packages/cross/7/p/gcc-7-cross-ports-1/gcc/build/./gcc/xgcc
-B/home/packages/cross/7/p/gcc-7-cross-ports-1/
gcc/build/./gcc/ -B/usr/m68k-linux-gnu/bin/ -B/usr/m68k-linux-gnu/lib/ -isystem
/usr/m68k-linux-gnu/include -isys
tem /usr/m68k-linux-gnu/sys-include -isystem
/home/packages/cross/7/p/gcc-7-cross-ports-1/gcc/build/sys-include
  -c -g -O2   -W -Wall -gnatpg -nostdinc   s-maccod.ads -o s-maccod.o
s-maccod.ads:36:15: violation of No_Elaboration_Code_All at line 37
s-maccod.ads:36:15: unit "System" does not have No_Elaboration_Code_All
../gcc-interface/Makefile:311: recipe for target 's-maccod.o' failed
make[9]: *** [s-maccod.o] Error 1
make[9]: Leaving directory
'/home/packages/cross/7/p/gcc-7-cross-ports-1/gcc/build/gcc/ada/rts'
gcc-interface/Makefile:2748: recipe for target 'gnatlib' failed
make[8]: *** [gnatlib] Error 2
make[8]: Leaving directory
'/home/packages/cross/7/p/gcc-7-cross-ports-1/gcc/build/gcc/ada'
gcc-interface/Makefile:2836: recipe for target 'gnatlib-shared-dual' failed
make[7]: *** [gnatlib-shared-dual] Error 2
make[7]: Leaving directory
'/home/packages/cross/7/p/gcc-7-cross-ports-1/gcc/build/gcc/ada'
gcc-interface/Makefile:2932: recipe for target 'gnatlib-shared' failed
make[6]: *** [gnatlib-shared] Error 2
make[6]: Leaving directory
'/home/packages/cross/7/p/gcc-7-cross-ports-1/gcc/build/gcc/ada'
Makefile:113: recipe for target 'gnatlib-shared' failed
make[5]: *** [gnatlib-shared] Error 2
make[5]: Leaving directory
'/home/packages/cross/7/p/gcc-7-cross-ports-1/gcc/build/m68k-linux-gnu/libada'
Makefile:14110: recipe for target 'all-target-libada' failed
make[4]: *** [all-target-libada] Error 2