![]() |
Alternate GCC Toolchain
Hi all,
Just an update as everyone starts thinking about the 2013 FRC season, the patches that I and several others wrote have now been officially integrated into the GCC mainline. Now, having undergone the sad ordeal of graduating from high school and FRC last year, I am faced with not being able to test anything beyond compile time. So, I leave it open to everyone else to test out :D Between college and working with the GCC devs I haven't had time to update the whole buildsystem yet, but EXPECT TO SEE BINARY PACKAGES SOON :D For those of you who can't wait, here's how you can build GCC for vxworks on your very own: NOTE: Lines starting with # must be run as root, and you need to have gcc, flex, bison, libmpfr-dev, libgmp-dev, libmpc-dev (or whatever the equivalents are for your distro) installed NOTE2: If someone wants to mirror the snapshot of GCC that would be awesome as github has to dynamically regenerate it every time someone downloads it (though this is still faster than checking out on cvs...). I'd do it but my school doesn't like people tunneling out of their network... Code:
# mkdir -p /usr/powerpc-wrs-vxworks/wind_baseThat was a mouthful. This is why I will work to get those binaries out to you all soon :). Let me know if I made a typo. I haven't tested this as rigorously as I usually do for my builds, and I haven't rebuilt binutils in a while, but I wanted to get this out to you all early so that I could see if there's any runtime issues people run into. HOW TO BUILD: You can manually hack a UCPP makefile, OR, you can use cmake. Links: https://github.com/rbmj/cmake_vxworks and, to build a better WPILib (I mean, they had to make the compiler's optimizations better since 3.x :D) and ensure there are no symbol/ABI conflicts, go here: https://github.com/rbmj/wpilib I submitted the necessary patches to firstforge at the end of last season, but they have a pretty closed development model... Also, I'm not sure how much they are into supporting unofficial toolchains, though technically all of the changes are necessary for standards compliance as old GCC accepts stuff it shouldn't... but I digress. Lobby FIRST/WRS/NI to use a compiler that *isn't* ten years old! [BUGS/TODO]: Also, a very broken build of fortran can be made by using --enable-languages=c,c++,fortran. However, this misconfigures itself horribly, so you'll need to go in and edit the config.h file by hand *bleh*. Go support is also in the works. However, at least for me, these are both lower priorities unless people here say they're really interested in these, as they aren't currently used by FRC. Also know, that the best way to get this done faster if you care is to do it yourself :) Just share with everyone else too! The entire C++11 standard library (as it is/will be known by GCC 4.8 - freeze should be this week, so no major changes) *should* work. There might be one minor bug in thread-specific data corner cases, but other than that, please test all of the new features you can think of! And then use them so we don't have spaghetti code! TEST TEST TEST TEST PLEASE! |
Re: Alternate GCC Toolchain
Quote:
Just like all those old mentors that volunteer for FIRST !! |
Re: Alternate GCC Toolchain
Quote:
|
Re: Alternate GCC Toolchain
Quote:
|
Re: Alternate GCC Toolchain
Quote:
|
Re: Alternate GCC Toolchain
1 Attachment(s)
Yeah, I can't even get it to compile. It looks like it fails with:
Code:
/bin/bash: MULTIDIR: command not foundWould it be possible to just zip the /usr/powerpc-wrs-vxworks folder so I wouldn't have to worry about it? |
Re: Alternate GCC Toolchain
Quote:
In all seriousness, because it runs natively on linux, supports c++11 and has much better compliance with c++03, has better optimizations, runs faster (AFAIK), and because IT'S SHINY AND NEW! Also, WRT to the MULTIDIR thing, that's not a fatal error. Double-check that /usr/powerpc-wrs-vxworks/include is a symlink to sys-include/wrn/coreip. Make sure that /usr/powerpc-wrs-vxworks/sys-include contains files that make sense (vxWorks.h, stdio.h, etc.) I was typing those commands into a post box, not into a terminal, so it might have a typo... |
Re: Alternate GCC Toolchain
Hey, I'm just asking. I like shiny and new too. I'm all for innovation.
What I'm curious in learning is why so much embedded C still uses the 3.4.4 version, not the 4.xx series of gcc. That said, what are the risks of using 4.x versus 3.4.4 in an embedded system. I know there are substantial language compliance differences and I'm curious as to how that drills down the particular FRC application we deal with. I'm all for innovation. I just want to know what the innovation is. That's all. And thanks, I'm glad to see the project... |
Re: Alternate GCC Toolchain
1 Attachment(s)
Checked it again. Still not able to compile. Heres what I get:
Code:
/bin/bash: MULTIDIR: command not foundAlso included an overview of the powerpc-wrs-vxworks folder. |
Re: Alternate GCC Toolchain
I can't answer for the risks associated with using a new GCC. However, I can say that some of the standard library and language compliance benefits are very interesting and useful, particularly C++11 features. Additionally, should one discover any issues, the developers are much more likely to help you with a modern, developed version.
It is to both VxWorks' and GCC's benefit to keep compatibility current and not let it bitrot. Again, a major motivating factor is to be able to get a native linux version. IN MY EXPERIENCE, the whole development process is smoother on linux, and not using the giant hulking behemoth that eclipse (and thus workbench) is makes development go much more quickly. CMake also does a better job of dependency tracking than the Makefiles that are generated by workbench or UCPP (no offense of course to the people who have been working on UCPP, which is an awesome project). |
Re: Alternate GCC Toolchain
Quote:
|
Re: Alternate GCC Toolchain
Quote:
Code:
/usr/lib/gcc/powerpc-wrs-vxworks/4.8.0/../../../../powerpc-wrs-vxworks/bin/ld: |
Re: Alternate GCC Toolchain
Quote:
I can't seem to edit my original post anymore, so please do this or you will get errors... |
Re: Alternate GCC Toolchain
Ok, now it get this:
Code:
/usr/bin/powerpc-wrs-vxworks-c++ -nostdlib -r -Wl,-X -staticQuote:
Code:
/usr/lib/gcc/powerpc-wrs-vxworks/4.8.0/../../../../powerpc-wrs-vxworks/bin/ld: |
Re: Alternate GCC Toolchain
That's a known bug. Look in the old thread, make the symlinks described, and you should be good.
I haven't been updating the toolchain file as I've been *very* busy working with the GCC devs to get everything working on VxWorks out-of-the-box. Again, this is still experimental until I get everything updated and get some binary packages out. I wanted to give the adventurous a chance to play around with it in advance though :) |
| All times are GMT -5. The time now is 01:33. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi