I am trying to compile gcc 6.4.0 independently with gcc 7.2 in Archlinux.
Configuration is as follows:
../configure --prefix=${INSTALL_PREFIX} --enable-languages=c,c++,fortran \
--enable-threads=posix --enable-tls --enable-libgomp --enable-lto \
--enable-shared --enable-static --disable-nls --disable-multilib \
--with-fpmath=sse
While compiling, I got the following error in md-unwind-support.h
:
md-unwind-support.h:65:47: error: dereferencing pointer to incomplete type 'struct ucontext'
I compared md-unwind-support.h
between defined in gcc 6.4.0 and gcc 7.2.0 and found that struct ucontext
is defined as ucontext_t
in gcc 7.2.0.
So, I made some changes in md-unwind-support.h
of gcc 6.4.0 source tree but got some kine of namespace issue as follows:
int std::uncaught_exceptions() should have been declared inside 'std'
I get stuck and have no idea about this issue.
Any help and advice will be helpful.
In order to have make
to work you have to modify the file make_folder/libgcc/config/i386/linux_unwind.h
where make_folder
is the folder where you type the make
command.
In linux_unwind.h
you have to change struct ucontext *uc_ = context->cfa;
on line 61 to struct ucontext_t *uc_ = context->cfa;
Thanks to Seong that told us what file to modify.
I finally resolved issue.
I should have modified libgcc/config/i386/linux_unwind.h
instead of directly md-unwind-support.h
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With