This is the mail archive of the gcc-help@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]

Re: Cross compilation


Kai Ruottu kirjoitti 10.11.2017 klo 18:14:
Kai Ruottu kirjoitti 10.11.2017 klo 11:21:
RAVI DEWANGAN kirjoitti 10.11.2017 klo 4:56:
Hi GNU Team,

Could you please guide me regarding cross compilation.

I am trying to cross compile the toolchain for FreeBSD11(target) using
Ubuntu16.04(host).

../../../../libstdc++-v3/libsupc++/new_opa.cc: In function 'void* aligned_alloc(std::size_t, std::size_t)': ../../../../libstdc++-v3/libsupc++/new_opa.cc:62:1: error: 'void* aligned_alloc(std::size_t, std::size_t)' was declared 'extern' and later 'static' [-fpermissive]
 aligned_alloc (std::size_t al, std::size_t sz)
 ^~~~~~~~~~~~~
In file included from /home/src-old/gcc-7.2.0/build/x86_64-freebsd11.1/libstdc++-v3/include/cstdlib:75:0,                  from /home/src-old/gcc-7.2.0/build/x86_64-freebsd11.1/libstdc++-v3/include/stdlib.h:36,
                 from ../../../../libstdc++-v3/libsupc++/new_opa.cc:27:
/home/src-old/gcc-7.2.0/build/gcc/include-fixed/stdlib.h:178:8: note: previous declaration of 'void* aligned_alloc(size_t, size_t)'
 void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1)
        ^~~~~~~~~~~~~
make[4]: *** [new_opa.lo] Virhe 1
make[4]: Poistutaan hakemistosta "/home/src-old/gcc-7.2.0/build/x86_64-freebsd11.1/libstdc++-v3/libsupc++"
make[3]: *** [all-recursive] Virhe 1

Seemingly the same problem was with the x86_64-freebsd10.1 target which I tried first after updating the earlier gcc-4.9.2 to gcc-4.9.3 with it. No problems in that build. Will check the FreeBSD 11.1 with gcc-4.9.3 too...

Yes, just the same error came with gcc-7.2.0 sources and FreeBSD 10.1 target. But builds with gcc-4.9.3, gcc-5.3.0 and gcc-6.3.0 sources worked OK for FreeBSD 11.1 target. Unfortunately my C++ skills are rusty so
I cannot tell what to fix in this issue with gcc-7.2.0 :(


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