Rockbox Technical Forums
Rockbox Development => Starting Development and Compiling => Topic started by: ivi on March 31, 2016, 05:43:33 PM
-
Hi,
one of the changes in gcc 5 was in the way extern inline is handled with the new default GNU11 C standard (see https://gcc.gnu.org/gcc-5/porting_to.html), which in turn breaks the build of gcc 4.4.4.
In order to fix this, you can patch rockboxdev.sh in the following way to get back to the previously used GNU89 C standard, which will then allow you to successfully compile the cross gcc 4.4.4:
@@ -211,7 +211,7 @@
./configure --prefix=$prefix $configure_params
;;
*)
- CFLAGS=-U_FORTIFY_SOURCE ../$toolname-$version/configure --target=$target --prefix=$prefix --enable-languages=c --disable-libssp --disable-docs $configure_params
+ CFLAGS="-U_FORTIFY_SOURCE -std=gnu89" ../$toolname-$version/configure --target=$target --prefix=$prefix --enable-languages=c --disable-libssp --disable-docs $configure_params
;;
esac
This should also not harm any older versions of gcc, so someone with commit rights could also apply this to git (I don't have a system available right now with older gcc's to test this, though).
Regards,
Ingmar
-
Yeah, I should add all this to our Gerrit instance I suppose.
I have a tonne of environment related commits sitting in my local tree that I should really get merged upstream.
You've actually made me feel overwhelmingly lazy, because apparently I figured this out in at least October of 2015 (http://www.rockbox.org/irc/log-20150803#03:49:54) against gcc-4.9 (actually, lord only knows when I figured this out because at this point I apparently already had this in my local tree and knew it was an issue for modern gcc instances and what to do about it when another user hit the same issue - makes it somewhat worse I suppose...), we used slightly different approaches (-fgnu89-inline vs. -std=gnu89), but the end result is the same.
[Saint]
-
Thanks for this, ivi! I had this error this morning.
-
Has this been integrated in the sources meanwhile?
Or is this patch still needed?
If yes, which one of the two solutions is the better one?
[Edit]
I answer myself: the patch is still needed ???
(did no dev with commit access find time in the last six months to check this in? ::))
[/Edit]
-
I'm guessing you're just building armeabi?
[Saint]
-
Yes.
Why do you ask? Are there issues with this change for other platforms?
-
Yes.
Why do you ask? Are there issues with this change for other platforms?
Yes.
[Saint]