This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/72859] New: Building GCC Cross-Compiler on cygwin for PowerPC


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72859

            Bug ID: 72859
           Summary: Building GCC Cross-Compiler on cygwin for PowerPC
           Product: gcc
           Version: 5.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 993870b5 at opayq dot com
  Target Milestone: ---

Following the instructions on http://wiki.osdev.org/GCC_Cross-Compiler I have
been trying to build a GCC C language cross-compiler for Powerpc-eabi
architecture using Cygwin on Windows 7 32bit.

I downloaded following software
Cygwin 2.5.2
GCC version 5.4.0
binutils 2.26

I have successfully bulit and installed binutils-2.26

I have executed following configure command:
../gcc-5.4.0/configure --target=powerpc-eabi --prefix=/home/user/opt/cross
--disable-nls --enable-languages=c --without-headers

when I execute the command: make all-gcc

after a while, the following error is generated.

...
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 -Woverloaded-virtual -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H 
-DGENERATOR_FILE -I. -Ibuild -I../../gcc-5.4.0/gcc 
-I../../gcc-5.4.0/gcc/build -I../../gcc-5.4.0/gcc/../include  
-I../../gcc-5.4.0/gcc/../libcpp/include
-o build/genpreds.o ../../gcc-5.4.0/gcc/genpreds.c
In file included from ../../gcc-5.4.0/gcc/rtl.h:26:0,
                 from ../../gcc-5.4.0/gcc/genpreds.c:27:
../../gcc-5.4.0/gcc/real.h:43:35: warning: division by zero [-Wdiv-by-zero]
 #define SIGSZ   (SIGNIFICAND_BITS / HOST_BITS_PER_LONG)
                                   ^
../../gcc-5.4.0/gcc/real.h:56:21: note: in expansion of macro ‘SIGSZ’
   unsigned long sig[SIGSZ];
                     ^
../../gcc-5.4.0/gcc/real.h:56:26: error: size of array ‘sig’ is not an integral
constant-expression
   unsigned long sig[SIGSZ];
                          ^
make[1]: *** [Makefile:2429: build/genpreds.o] Error 1
make[1]: Leaving directory '/home/user/build-gcc/gcc'
make: *** [Makefile:4100: all-gcc] Error 2

The cause of error seems to be the missing definition of HOST_BITS_PER_LONG in
file rtl.h.

removing the -pedantic option from the Makefile did not result in any
difference.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]