Skip to content

Instantly share code, notes, and snippets.

@zeta709
Created February 18, 2018 00:54
Show Gist options
  • Save zeta709/3e6c10376b01d7dc99b449b9882bd27c to your computer and use it in GitHub Desktop.
Save zeta709/3e6c10376b01d7dc99b449b9882bd27c to your computer and use it in GitHub Desktop.
Upgrade GCC

Error:

configure: error: C compiler cannot create executables
error: unrecognized command line option ‘-V’
error: unrecognized command line option '-qversion'

Solution:

binutils-config -l

#!/bin/sh
emerge -va1 gcc
gcc-config -l
# gcc-config *** # choose valid one
emerge -va1 binutils
binutils-config -l
# binutils-config *** # choose valid one
source /etc/profile
emerge -va1 libtool
revdep-rebuild --library 'libstdc++.so.6' -- --exclude gcc
# References
# https://wiki.gentoo.org/wiki/Upgrading_GCC
# https://forums.funtoo.org/topic/1498-can-you-explain-x86_64-pc-linux-gnu-gcc-v-versus-v-in-my-log-files/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment