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

Switch to gcc 6.3 as minimum requirement? #17

Closed
doe300 opened this issue Jan 23, 2018 · 7 comments
Closed

Switch to gcc 6.3 as minimum requirement? #17

doe300 opened this issue Jan 23, 2018 · 7 comments
Assignees

Comments

@doe300
Copy link
Owner

doe300 commented Jan 23, 2018

Currently, VC4C and VC4CL are held compatible with the ancient GCC 4.8 to support older Raspbian systems. GCC 4.8 barely supports C++11 [1] and hence lacks a lot of useful new features provided in C++14 and C++17. The latest Raspian Stretch ships with GCC 6.3, which completely supports C++14 as well as a lot of C++17 features [1].

Some useful C++14/C++17 features we could use when switching [1]:

  • Full support for variadic templates
  • Extended constexpr functions
  • __has_include e.g. for distinguishing LLVM versions
  • New library features: string_view, file-system support, optional and any in experimental namespace

Since the official raspberrypi-tools repository has not yet been upgraded to GCC 6.3 (see here), we would need to use another tool-chain for our CircleCI cross-compilation such as this one (see also here).

So the question is:
Should we drop support for GCC 4.8 and therefore for older Raspbian systems?

[1] https://gcc.gnu.org/projects/cxx-status.html

@fighne
Copy link

fighne commented Feb 16, 2018

I think the ease of access to the Raspbian image, and the supported hardware ( I have an original Raspberry Pi which it runs on ) I personally think it's a yes.

@doe300
Copy link
Owner Author

doe300 commented Feb 21, 2018

Just a quick questions to anyone who has more experience with gcc-versions and targets than I have.
For the CircleCI build, can't we just switch to g++-arm-linux-gnueabihf as cross-compiler? Or do we have to use a custom-build compiler for the raspberry pi (as idein does)? If so, why?
@nomaddo, any ideas?

@doe300 doe300 self-assigned this Feb 21, 2018
@nomaddo
Copy link
Collaborator

nomaddo commented Feb 21, 2018

@doe300
Why we use custom-build compiler is that, other choices has cons as following:

  • linaro cross compilers: armv6 compiler lacks support for hardfp
  • g++-arm-linux-gnueabihf: it lacks support for NEON

In this case, we care support for march armv6 and armv7 with hardfp, not care for NEON acceleration.
with g++-arm-linux-gnueabihf in Debian:stretch, solving dependent libraries may be easier.
OK, I will create new Dockerfile.

@Terminus-IMRC
Copy link

My cross-rpi repo is obsolete, so please use our new one: https://github.com/Idein/docker-cross-rpi

@Terminus-IMRC
Copy link

@nomaddo linaro's arm toolchain lacks support for armv6 itself, not vfp...

@nomaddo
Copy link
Collaborator

nomaddo commented Feb 21, 2018

@Terminus-IMRC very thanks for the correction :)

@Terminus-IMRC
Copy link

After some investigations, it turned out that cross toolchain of Linaro and Debian both support armv6 (VFP) and armv7 (NEON), which means that you can just switch to use g++-arm-linux-gnueabihf as cross compiler. Sorry for misleading comments.

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

No branches or pull requests

4 participants