Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for later levels of GCC #19

Open
nkolban opened this issue Nov 23, 2015 · 11 comments
Open

Support for later levels of GCC #19

nkolban opened this issue Nov 23, 2015 · 11 comments

Comments

@nkolban
Copy link

nkolban commented Nov 23, 2015

I see that the version of GCC built is 4.8.2. I see that the latest version of GCC is 5.2 and am wondering if there are plans to update?

@jcmvbkbc
Copy link
Owner

It's been updated: the branch lx106-g++-1.21.0 offers gcc-5.1 by default, here's the announcement: http://www.esp8266.com/viewtopic.php?f=9&t=224&start=155#p19771
But it seems that not a lot of people picked it up. So I left 4.8.x as default in xtensa-1.22.x branch, but whoever needs that still can do 'ct-ng menuconfig' after the 'ct-ng xtensa-lx106-elf' and select gcc-5.x.

@maruno
Copy link

maruno commented May 16, 2016

Is compiling GCC 5.2 supported? From the xtensa-1.22.x-branch I can't select GCC 5.1, and GCC 5.2 seems to fail to compile here for me: https://gist.github.com/maruno/64e33793c46fc84480169ccd01bbcd10

@jcmvbkbc
Copy link
Owner

unwind-dw2-fde-dip.c:36:40: fatal error: elf.h: No such file or directory

I believe your system is missing libc development package. On ubuntu/debian it should be fixed with
apt-get install build-essential

nitrotm pushed a commit to nitrotm/crosstool-NG that referenced this issue May 17, 2016
@maruno
Copy link

maruno commented May 18, 2016

I'm not running Linux, but trying to build this on FreeBSD. Shouldn't elf.h be found in the target system headers? Adding the system headers to the last command doesn't seem to work too well.

I updated my gist with the full build.log.

@maruno
Copy link

maruno commented May 18, 2016

Adding -isystem /storage/tooling/crosstool-NG/bin/.build/src/gcc-5.2.0/gcc/config/xtensa to the last command seems to let it run, maybe a missing include directory?

@jcmvbkbc
Copy link
Owner

jcmvbkbc commented May 18, 2016

Reading unwind-dw2-fde-dip.c I see the following:

#if !defined(inhibit_libc) && !defined(__OpenBSD__)
#include <elf.h>        /* Get DT_CONFIG.  */
#endif

which makes me think, that something like && !defined(__FreeBSD__) may be missing here.

@jcmvbkbc
Copy link
Owner

OK, reading it a bit further I realize that the compiler thinks that it builds the unwinding library for FreeBSD running on esp8266. At that point I'd say that this is gcc issue and this type of configuration is not actually supported by gcc.

@igrr
Copy link
Contributor

igrr commented Oct 14, 2016

Getting this issue on macOS as well.
Shouldn't this unwinding code be only added to libgcc build if it is being built for linux target?

@jcmvbkbc
Copy link
Owner

Now I'm getting the same error when building esp32 toolchain, but not esp8266. Looking at it.

@jcmvbkbc
Copy link
Owner

Ok, my problem was that unwind-dw2-fde-dip.c should not have been used on baremetal elf target. It should be fixed with commit a194053. I suspect that it also fixes issues seen on *BSD/macOS, can you guys please check?

@igrr
Copy link
Contributor

igrr commented Oct 20, 2016

Thanks, this fixes the issue on macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants