"Jonathan Wakely" wrote: > > > The problem is present from version 4.7.x. Can anyone help how I can compile a newer gcc version for ppc? > > Have you got a particularly ancient libc? Lots of people build on ppc > all the time e.g. just a few hours ago: > https://gcc.gnu.org/ml/gcc-testresults/2015-01/msg03213.html Yes, my log was created while compiling a very old kernel user land ( 2.24.x) But if I try to compile a actual kernel userland I was also unable to compile, but with different problems. Log attached. I filled a bug report long time ago: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63907 It is still unconfirmed. I will try to build without libitm which will need some time. I'll back with a report after successful installation or failure. The log when compiling against 3.x kernel version: Making install in sanitizer_common make[3]: Entering directory '/home/krud/own_components/gcc_install/gccinst016ma/gcc-5-20150125/build_powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/libsanitizer/sanitizer_common' /bin/sh ../libtool --tag=CXX --mode=compile /home/krud/own_components/gcc_install/gccinst016ma/gcc-5-20150125/build_powerpc-unknown-linux-gnu_5-20150125_42/./gcc/xgcc -shared-libgcc -B/home/krud/own_components/gcc_install/gccinst016ma/gcc-5-20150125/build_powerpc-unknown-linux-gnu_5-20150125_42/./gcc -nostdinc++ -L/home/krud/own_components/gcc_install/gccinst016ma/gcc-5-20150125/build_powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/libstdc++-v3/src -L/home/krud/own_components/gcc_install/gccinst016ma/gcc-5-20150125/build_powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/libstdc++-v3/src/.libs -L/home/krud/own_components/gcc_install/gccinst016ma/gcc-5-20150125/build_powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -B/opt/powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/bin/ -B/opt/powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/lib/ -isystem /opt/powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/include -isystem /opt/powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/sys-include -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I. -I../../../../libsanitizer/sanitizer_common -I.. -I ../../../../libsanitizer/include -isystem ../../../../libsanitizer/include/system -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros -I../../libstdc++-v3/include -I../../libstdc++-v3/include/powerpc-unknown-linux-gnu -I../../../../libsanitizer/../libstdc++-v3/libsupc++ -std=gnu++11 -DSANITIZER_LIBBACKTRACE -DSANITIZER_CP_DEMANGLE -I ../../../../libsanitizer/../libbacktrace -I ../libbacktrace -I ../../../../libsanitizer/../include -include ../../../../libsanitizer/libbacktrace/backtrace-rename.h -g -O2 -D_GNU_SOURCE -MT sanitizer_platform_limits_linux.lo -MD -MP -MF .deps/sanitizer_platform_limits_linux.Tpo -c -o sanitizer_platform_limits_linux.lo ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc libtool: compile: /home/krud/own_components/gcc_install/gccinst016ma/gcc-5-20150125/build_powerpc-unknown-linux-gnu_5-20150125_42/./gcc/xgcc -shared-libgcc -B/home/krud/own_components/gcc_install/gccinst016ma/gcc-5-20150125/build_powerpc-unknown-linux-gnu_5-20150125_42/./gcc -nostdinc++ -L/home/krud/own_components/gcc_install/gccinst016ma/gcc-5-20150125/build_powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/libstdc++-v3/src -L/home/krud/own_components/gcc_install/gccinst016ma/gcc-5-20150125/build_powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/libstdc++-v3/src/.libs -L/home/krud/own_components/gcc_install/gccinst016ma/gcc-5-20150125/build_powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -B/opt/powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/bin/ -B/opt/powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/lib/ -isystem /opt/powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/include -isystem /opt/powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/sys-include -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I. -I../../../../libsanitizer/sanitizer_common -I.. -I ../../../../libsanitizer/include -isystem ../../../../libsanitizer/include/system -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros -I../../libstdc++-v3/include -I../../libstdc++-v3/include/powerpc-unknown-linux-gnu -I../../../../libsanitizer/../libstdc++-v3/libsupc++ -std=gnu++11 -DSANITIZER_LIBBACKTRACE -DSANITIZER_CP_DEMANGLE -I ../../../../libsanitizer/../libbacktrace -I ../libbacktrace -I ../../../../libsanitizer/../include -include ../../../../libsanitizer/libbacktrace/backtrace-rename.h -g -O2 -D_GNU_SOURCE -MT sanitizer_platform_limits_linux.lo -MD -MP -MF .deps/sanitizer_platform_limits_linux.Tpo -c ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc -fPIC -DPIC -o .libs/sanitizer_platform_limits_linux.o In file included from ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc:29:0: /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h:72:51: error: '__kernel_fd_set' has not been declared static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) ^ /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h: In function 'void __FD_SET(long unsigned int, int*)': /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h:74:28: error: '__NFDBITS' was not declared in this scope unsigned long _tmp = fd / __NFDBITS; ^ /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h:76:10: error: request for member 'fds_bits' in '* fdsetp', which is of non-class type 'int' fdsetp->fds_bits[_tmp] |= (1UL<<_rem); ^ /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h: At global scope: /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h:80:51: error: '__kernel_fd_set' has not been declared static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) ^ /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h: In function 'void __FD_CLR(long unsigned int, int*)': /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h:82:28: error: '__NFDBITS' was not declared in this scope unsigned long _tmp = fd / __NFDBITS; ^ /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h:84:10: error: request for member 'fds_bits' in '* fdsetp', which is of non-class type 'int' fdsetp->fds_bits[_tmp] &= ~(1UL<<_rem); ^ /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h: At global scope: /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h:88:52: error: '__kernel_fd_set' has not been declared static __inline__ int __FD_ISSET(unsigned long fd, __kernel_fd_set *p) ^ /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h: In function 'int __FD_ISSET(long unsigned int, int*)': /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h:90:28: error: '__NFDBITS' was not declared in this scope unsigned long _tmp = fd / __NFDBITS; ^ /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h:92:13: error: request for member 'fds_bits' in '* p', which is of non-class type 'int' return (p->fds_bits[_tmp] & (1UL<<_rem)) != 0; ^ /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h: At global scope: /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h:100:34: error: variable or field '__FD_ZERO' declared void static __inline__ void __FD_ZERO(__kernel_fd_set *p) ^ /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h:100:34: error: '__kernel_fd_set' was not declared in this scope /opt/ppc1_eldk4.2/ppc_6xx/usr/include/asm/posix_types.h:100:51: error: 'p' was not declared in this scope static __inline__ void __FD_ZERO(__kernel_fd_set *p) ^ Makefile:448: recipe for target 'sanitizer_platform_limits_linux.lo' failed make[3]: *** [sanitizer_platform_limits_linux.lo] Error 1 make[3]: Leaving directory '/home/krud/own_components/gcc_install/gccinst016ma/gcc-5-20150125/build_powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/libsanitizer/sanitizer_common' Makefile:436: recipe for target 'install-recursive' failed make[2]: *** [install-recursive] Error 1 make[2]: Leaving directory '/home/krud/own_components/gcc_install/gccinst016ma/gcc-5-20150125/build_powerpc-unknown-linux-gnu_5-20150125_42/powerpc-unknown-linux-gnu/libsanitizer' Makefile:11663: recipe for target 'install-target-libsanitizer' failed make[1]: *** [install-target-libsanitizer] Error 2 make[1]: Leaving directory '/home/krud/own_components/gcc_install/gccinst016ma/gcc-5-20150125/build_powerpc-unknown-linux-gnu_5-20150125_42' Makefile:2267: recipe for target 'install' failed make: *** [install] Error 2 Makefile:353: recipe for target '/opt/powerpc-unknown-linux-gnu_5-20150125_42/bin/powerpc-unknown-linux-gnu-gcc' failed make: *** [/opt/powerpc-unknown-linux-gnu_5-20150125_42/bin/powerpc-unknown-linux-gnu-gcc] Error 2