Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - GCC for powerpc-unknown-nto-qnx6.5.0: (6 Items)
   
GCC for powerpc-unknown-nto-qnx6.5.0  
Hello,

It's me again and now I'm trying to build GCC for powerpc-unknown-nto-qnx6.5.0 using cross-compilation tools for linux-
x86 host. Compilation fails with message:

make[4]: Entering directory '/home/max/gcc/build/powerpc-unknown-nto-qnx6.5.0/pic/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
powerpc-unknown-nto-qnx6.5.0-gcc   -g -O2 -fpic -O2  -g -O2 -DIN_GCC    -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-
prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fexceptions -g -DIN_LIBGCC2 -fbuilding-
libgcc -fno-stack-protector  -fexceptions -I. -I. -I../../.././gcc -I/home/max/gcc/trunk/libgcc -I/home/max/gcc/trunk/
libgcc/. -I/home/max/gcc/trunk/libgcc/../gcc -I/home/max/gcc/trunk/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS -o 
_muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c /home/max/gcc/trunk/libgcc/libgcc2.c -fvisibility=hidden -
DHIDE_EXPORTS
cc1: error: unrecognized command line option -fbuilding-libgcc
Makefile:466: recipe for target '_muldi3.o' failed
make[4]: *** [_muldi3.o] Error 1
make[4]: Leaving directory '/home/max/gcc/build/powerpc-unknown-nto-qnx6.5.0/pic/libgcc'
Makefile:1154: recipe for target 'multi-do' failed
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory '/home/max/gcc/build/powerpc-unknown-nto-qnx6.5.0/libgcc'
Makefile:117: recipe for target 'all-multi' failed
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory '/home/max/gcc/build/powerpc-unknown-nto-qnx6.5.0/libgcc'
Makefile:12916: recipe for target 'all-target-libgcc' failed
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory '/home/max/gcc/build'
Makefile:877: recipe for target 'all' failed
make: *** [all] Error 2


GCC 5.1, downloaded from f27svn.qnx.com/svn/repos/core-dev-tools 

Configuration options:
--build=i686-pc-linux-gnu --host=powerpc-unknown-nto-qnx6.5.0 --target=powerpc-unknown-nto-qnx6.5.0 --with-bugurl=no --
program-prefix=ntoppc- --enable-languages=c,c++ --verbose --without-expat --with-expat=no --with-python=no --disable-nls
Re: GCC for powerpc-unknown-nto-qnx6.5.0  
OK, I've solved this problem, but I've got another one:

make[2]: Entering directory `/home/max/gcc/build/powerpc-unknown-nto-qnx6.5.0/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
powerpc-unknown-nto-qnx6.5.0-gcc   -g -D__GNU_STDC_INLINE__ -O2  -g -D__GNU_STDC_INLINE__ -DIN_GCC   -W -Wall -Wwrite-
strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fexceptions -g
  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector   -I. -I. -I../.././gcc -I/home/max/gcc/gcc_4_6_branch/
libgcc -I/home/max/gcc/gcc_4_6_branch/libgcc/. -I/home/max/gcc/gcc_4_6_branch/libgcc/../gcc -I/home/max/gcc/
gcc_4_6_branch/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS -o crtsavfpr.o -MT crtsavfpr.o -MD -MP -MF crtsavfpr.dep -c
 -xassembler-with-cpp ../.././gcc/crtsavfpr.S
../.././gcc/crtsavfpr.S: Assembler messages:
../.././gcc/crtsavfpr.S:41: Error: Unrecognized opcode: `cfi_startproc'
../.././gcc/crtsavfpr.S:79: Error: Unrecognized opcode: `cfi_endproc'
make[2]: *** [crtsavfpr.o] Error 1
make[2]: Leaving directory `/home/max/gcc/build/powerpc-unknown-nto-qnx6.5.0/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/home/max/gcc/build'
make: *** [all] Error 2

How to fix it?
Re: GCC for powerpc-unknown-nto-qnx6.5.0  

On 15-06-16 09:51 AM, Maxim Kuzmin wrote:
> OK, I've solved this problem, but I've got another one:
>
> make[2]: Entering directory `/home/max/gcc/build/powerpc-unknown-nto-qnx6.5.0/libgcc'
> # If this is the top-level multilib, build all the other
> # multilibs.
> powerpc-unknown-nto-qnx6.5.0-gcc   -g -D__GNU_STDC_INLINE__ -O2  -g -D__GNU_STDC_INLINE__ -DIN_GCC   -W -Wall -Wwrite-
strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fexceptions -g
  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector   -I. -I. -I../.././gcc -I/home/max/gcc/gcc_4_6_branch/
libgcc -I/home/max/gcc/gcc_4_6_branch/libgcc/. -I/home/max/gcc/gcc_4_6_branch/libgcc/../gcc -I/home/max/gcc/
gcc_4_6_branch/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS -o crtsavfpr.o -MT crtsavfpr.o -MD -MP -MF crtsavfpr.dep -c
 -xassembler-with-cpp ../.././gcc/crtsavfpr.S
> ../.././gcc/crtsavfpr.S: Assembler messages:
> ../.././gcc/crtsavfpr.S:41: Error: Unrecognized opcode: `cfi_startproc'
> ../.././gcc/crtsavfpr.S:79: Error: Unrecognized opcode: `cfi_endproc'
> make[2]: *** [crtsavfpr.o] Error 1
> make[2]: Leaving directory `/home/max/gcc/build/powerpc-unknown-nto-qnx6.5.0/libgcc'
> make[1]: *** [all-target-libgcc] Error 2
> make[1]: Leaving directory `/home/max/gcc/build'
> make: *** [all] Error 2
>
> How to fix it?

Your binutils are too old. Build the trunk binutils for ppc.

Regards,

Ryan Mansfield
Re: GCC for powerpc-unknown-nto-qnx6.5.0  
I've successfully built binutils and updated /opt/qnx650/host/linux/x86/usr/bin/ntoppc-as, but unfortunately, I've got 
same error. This is output from gcc with "--verbose" flag:

/opt/qnx650/host/linux/x86/usr/bin/ntoppc-as --gdwarf2 -v -I. -I. -I../.././gcc -I/home/max/gcc/gcc_4_6_branch/libgcc -I
/home/max/gcc/gcc_4_6_branch/libgcc/. -I/home/max/gcc/gcc_4_6_branch/libgcc/../gcc -I/home/max/gcc/gcc_4_6_branch/libgcc
/../include -mppc -many -V -Qy -mbig -o crtsavfpr.o /tmp/ccR7N05D.s
GNU assembler version 2.25 (powerpc-unknown-nto-qnx6.5.0) using BFD version (GNU Binutils) 2.25
../.././gcc/crtsavfpr.S: Assembler messages:
../.././gcc/crtsavfpr.S:41: Error: unrecognized opcode: cfi_endproc'
../.././gcc/crtsavfpr.S:79: Error: unrecognized opcode: cfi_startproc'

Am I need to update other executables from binutils?
Re: GCC for powerpc-unknown-nto-qnx6.5.0  

On 15-06-17 04:23 AM, Maxim Kuzmin wrote:
> I've successfully built binutils and updated /opt/qnx650/host/linux/x86/usr/bin/ntoppc-as, but unfortunately, I've got
 same error. This is output from gcc with "--verbose" flag:
>
> /opt/qnx650/host/linux/x86/usr/bin/ntoppc-as --gdwarf2 -v -I. -I. -I../.././gcc -I/home/max/gcc/gcc_4_6_branch/libgcc 
-I/home/max/gcc/gcc_4_6_branch/libgcc/. -I/home/max/gcc/gcc_4_6_branch/libgcc/../gcc -I/home/max/gcc/gcc_4_6_branch/
libgcc/../include -mppc -many -V -Qy -mbig -o crtsavfpr.o /tmp/ccR7N05D.s
> GNU assembler version 2.25 (powerpc-unknown-nto-qnx6.5.0) using BFD version (GNU Binutils) 2.25
> ../.././gcc/crtsavfpr.S: Assembler messages:
> ../.././gcc/crtsavfpr.S:41: Error: unrecognized opcode: cfi_endproc'
> ../.././gcc/crtsavfpr.S:79: Error: unrecognized opcode: cfi_startproc'
>
> Am I need to update other executables from binutils?

Did you reconfigure and rebuild against the updated binutils?

i.e. config/rs6000/ppc-asm.h has

#ifdef HAVE_GAS_CFI_DIRECTIVE
# define CFI_STARTPROC                  .cfi_startproc
# define CFI_ENDPROC                    .cfi_endproc
# define CFI_OFFSET(reg, off)           .cfi_offset reg, off
# define CFI_DEF_CFA_REGISTER(reg)      .cfi_def_cfa_register reg
# define CFI_RESTORE(reg)               .cfi_restore reg
#else
# define CFI_STARTPROC
# define CFI_ENDPROC
# define CFI_OFFSET(reg, off)
# define CFI_DEF_CFA_REGISTER(reg)
# define CFI_RESTORE(reg)
#endif

and HAVE_HAS_CFI_DIRECTIVE will be defined by configure. The binutils 
2.25 that you just build should support the .cfi directives.

Regards,

Ryan Mansfield
Re: GCC for powerpc-unknown-nto-qnx6.5.0  
Yes, I've reconfigured and rebuilt gcc.