GCC 4.8.0 does not compile for DJGPP

2013-03-23 Thread Fabrizio Gennari
I am trying to build a cross-compiler for DJGPP running on my Ubuntu 
12.10 box.


#../gcc-4.8.0/configure --prefix= --target=i586-pc-msdosdjgpp
#make

[...]

g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions 
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings 
-DHAVE_CONFIG_H -I. -I. -I../../gcc-4.8.0/gcc -I../../gcc-4.8.0/gcc/. 
-I../../gcc-4.8.0/gcc/../include -I../../gcc-4.8.0/gcc/../libcpp/include 
-I../../gcc-4.8.0/gcc/../libdecnumber 
-I../../gcc-4.8.0/gcc/../libdecnumber/dpd -I../libdecnumber 
-I../../gcc-4.8.0/gcc/../libbacktrace \

../../gcc-4.8.0/gcc/config/i386/i386.c -o i386.o
../../gcc-4.8.0/gcc/config/i386/i386.c: In function ‘void ix86_code_end()’:
../../gcc-4.8.0/gcc/config/i386/i386.c:8650:55: error: 
‘ASM_DECLARE_FUNCTION_NAME’ was not declared in this scope


When doing the same with older versions of GCC, it was just a warning

warning: implicit declaration of function ‘ASM_DECLARE_FUNCTION_NAME’ 
[-Wimplicit-function-declaration]


Note that older versions of GCC used gcc instead of g++

Is there something wrong in GCC, or in what I am doing?

Regards,
Fabrizio


Re: GCC 4.8.0 does not compile for DJGPP

2013-03-24 Thread Fabrizio Gennari

Il 23/03/2013 18:07, DJ Delorie ha scritto:

The DJGPP build of gcc 4.8.0 was just uploaded, it might have some
patches that haven't been committed upstream yet.
Thank you DJ. I downloaded beta/v2gnu/gcc480s.zip from a mirror, and 
that compiles. And, indeed, the file gcc/config/i386/djgpp.h is 
different from the one in the official gcc-4.8.0.tar.bz2, meaning that 
some DJGPP patches are not present upstream.


Re: GCC 4.8.0 does not compile for DJGPP

2013-03-24 Thread Fabrizio Gennari

Il 24/03/2013 18:48, Fabrizio Gennari ha scritto:

Il 23/03/2013 18:07, DJ Delorie ha scritto:

The DJGPP build of gcc 4.8.0 was just uploaded, it might have some
patches that haven't been committed upstream yet.
Thank you DJ. I downloaded beta/v2gnu/gcc480s.zip from a mirror, and 
that compiles. And, indeed, the file gcc/config/i386/djgpp.h is 
different from the one in the official gcc-4.8.0.tar.bz2, meaning that 
some DJGPP patches are not present upstream.

Forgot to say that I also had to apply this patch

--- ../gcc-4.8.0/libbacktrace/alloc.c2013-01-14 19:17:30.0 +0100
+++ ../gcc-4.80/libbacktrace/alloc.c2013-03-24 18:07:11.995891959 +0100
@@ -34,6 +34,7 @@

 #include 
 #include 
+#include 

 #include "backtrace.h"
 #include "internal.h"



Re: GCC 4.8.0 does not compile for DJGPP

2013-03-25 Thread Fabrizio Gennari

Il 25/03/2013 00:00, Ian Lance Taylor ha scritto:

On Sun, Mar 24, 2013 at 10:51 AM, Fabrizio Gennari
 wrote:

Il 24/03/2013 18:48, Fabrizio Gennari ha scritto:


Il 23/03/2013 18:07, DJ Delorie ha scritto:

The DJGPP build of gcc 4.8.0 was just uploaded, it might have some
patches that haven't been committed upstream yet.

Thank you DJ. I downloaded beta/v2gnu/gcc480s.zip from a mirror, and that
compiles. And, indeed, the file gcc/config/i386/djgpp.h is different from
the one in the official gcc-4.8.0.tar.bz2, meaning that some DJGPP patches
are not present upstream.

Forgot to say that I also had to apply this patch

--- ../gcc-4.8.0/libbacktrace/alloc.c2013-01-14 19:17:30.0 +0100
+++ ../gcc-4.80/libbacktrace/alloc.c2013-03-24 18:07:11.995891959 +0100
@@ -34,6 +34,7 @@

  #include 
  #include 
+#include 

  #include "backtrace.h"
  #include "internal.h"


What failed without that patch?

Ian
libtool: compile: /home/fabrizio/dev/djgpp/cross/gcc2/./gcc/xgcc 
-B/home/fabrizio/dev/djgpp/cross/gcc2/./gcc/ 
-B/home/fabrizio/dev/djgpp/i586-pc-msdosdjgpp/bin/ 
-B/home/fabrizio/dev/djgpp/i586-pc-msdosdjgpp/lib/ -isystem 
/home/fabrizio/dev/djgpp/i586-pc-msdosdjgpp/include -isystem 
/home/fabrizio/dev/djgpp/i586-pc-msdosdjgpp/sys-include -DHAVE_CONFIG_H 
-I. -I../../../gcc-4.80/libbacktrace -I 
../../../gcc-4.80/libbacktrace/../include -I 
../../../gcc-4.80/libbacktrace/../libgcc -I ../libgcc -funwind-tables 
-frandom-seed=alloc.lo -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute 
-Wcast-qual -Werror -fPIC -g -O2 -c 
../../../gcc-4.80/libbacktrace/alloc.c -o alloc.o

-fPIC ignored (not supported for DJGPP)
In file included from ../../../gcc-4.80/libbacktrace/alloc.c:39:0:
../../../gcc-4.80/libbacktrace/internal.h:141:11: error: unknown type 
name ‘off_t’

off_t offset, size_t size,
^
make[3]: *** [alloc.lo] Errore 1
make[3]: uscita dalla directory 
"/home/fabrizio/dev/djgpp/cross/gcc2/i586-pc-msdosdjgpp/libbacktrace"


internal.h (included by libbacktrace/alloc.c) uses off_t, which is not 
declared unless sys/types.h is included


BTW, I am using beta/v2/djcrx204.zip for basic DJGPP headers and 
libraries, so no version 2.03 involved


Fabrizio