Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gcc 4.1.1 and gcc-config [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message
cac
n00b
n00b


Joined: 05 Jun 2006
Posts: 29
Location: Columbus, Ohio

PostPosted: Tue Apr 24, 2007 3:04 pm    Post subject: gcc 4.1.1 and gcc-config [solved] Reply with quote

I have gcc 4.1.1 emerged, but I am having some issues with selecting it using gcc-config. It seems that it will set 4.1.1 as a cross-compiler and not as my main compiler:
Code:
sparcy init.d # gcc-config -l
 [1] sparc64-unknown-linux-gnu-3.4.6
 [2] sparc64-unknown-linux-gnu-4.1.1 *
 [3] sparc-unknown-linux-gnu-3.4.6 *
 [4] sparc-unknown-linux-gnu-3.4.6-hardened
 [5] sparc-unknown-linux-gnu-3.4.6-hardenednopie
 [6] sparc-unknown-linux-gnu-3.4.6-hardenednopiessp
 [7] sparc-unknown-linux-gnu-3.4.6-hardenednossp
sparcy init.d # gcc-config -f 2
 * Switching cross-compiler to sparc64-unknown-linux-gnu-4.1.1 ...
>>> Regenerating /etc/ld.so.cache...                                      [ ok ]
sparcy init.d # env-update
>>> Regenerating /etc/ld.so.cache...
sparcy init.d # source /etc/profile
sparcy init.d # gcc-config -l
 [1] sparc64-unknown-linux-gnu-3.4.6
 [2] sparc64-unknown-linux-gnu-4.1.1 *
 [3] sparc-unknown-linux-gnu-3.4.6 *
 [4] sparc-unknown-linux-gnu-3.4.6-hardened
 [5] sparc-unknown-linux-gnu-3.4.6-hardenednopie
 [6] sparc-unknown-linux-gnu-3.4.6-hardenednopiessp
 [7] sparc-unknown-linux-gnu-3.4.6-hardenednossp


For what its worth the asterisk next to 4.1.1 is cyan while the one next to 3.4.6 is green. My guess is that my CHOST is mucking this up as it is set to sparc-unknown-linux-gnu. I've never changed this post-install on any of my gentoo boxes so I wanted to make sure it is okay to modify before I do it. emerge --info follows:
Code:
sparcy init.d # emerge --info
Portage 2.1.2.2 (default-linux/sparc/sparc64/2006.1, gcc-3.4.6, glibc-2.5-r0, 2.6.20-gentoo-r5 sparc64)
=================================================================
System uname: 2.6.20-gentoo-r5 sparc64 sun4u
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 23 Apr 2007 06:50:01 +0000
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.15-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.19.2-r2
ACCEPT_KEYWORDS="sparc"
AUTOCLEAN="yes"
CBUILD="sparc-unknown-linux-gnu"
CFLAGS="-mtune=ultrasparc -Os -fomit-frame-pointer -pipe"
CHOST="sparc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-mtune=ultrasparc -Os -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg distlocks fixpackages metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://bigbox.ih.lucent.com/mirrors/gentoo/ http://gentoo.osuosl.org/ "
LC_ALL="en_US.UTF-8"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://cnstest.cb.lucent.com/gentoo-portage"
USE="X alsa berkdb bitmap-fonts bzip2 cli cracklib crypt cups dbus dri drm eds emboss encode esd fbcon firefox foomaticdb fortran gcc64 gdbm gif gnome gstreamer gtk2 hal iconv imlib isdnlog jpeg kde libwww mad midi mikmod motif mpeg ncurses nfs nls nptl nptlonly ogg opengl oss pam pcre perl png pppd python qt3 readline reflection samba sdl session sparc spell spl ssl syslog tcpd truetype truetype-fonts type1-fonts unicode vorbis xml xorg xv zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="mach64 ati sunffb"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


I also need to investigate safe CFLAGS after some light reading yesterday, but that will come after this is solved.

TIA,
-Chris


Last edited by cac on Tue Apr 24, 2007 5:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
gust4voz
Retired Dev
Retired Dev


Joined: 09 Sep 2003
Posts: 373
Location: Buenos Aires, Argentina

PostPosted: Tue Apr 24, 2007 3:17 pm    Post subject: Reply with quote

You're only switch the kernel compiler (kgcc64).
At this point gcc4 is only unleashed for kernels on any profile (kgcc64-4.1.1), but plain userland gcc4 will be available once 2007.0 is released and only for 2007.0 profiles since it requires user intervention to upgrade (you can't just switch compiler and expect things compiled with gcc3/4 to be mixed up and work).
Basically you'll need to follow the gcc upgrade guide once everything is released to do so.
_________________
Gustavo Zacarias
Gentoo/SPARC monkey
Back to top
View user's profile Send private message
cac
n00b
n00b


Joined: 05 Jun 2006
Posts: 29
Location: Columbus, Ohio

PostPosted: Tue Apr 24, 2007 5:20 pm    Post subject: Reply with quote

My apologizes. I'm definitely familiar with the upgrade docs, and in fact was following them when I made my first post. I mistook seeing kgcc-4.1.1 fly by during my last emerge world for regular gcc. I am a little ignorant regarding the differences but I'm guessing the kernel compiler (kgcc) gets you a 64bit kernel but the regular gcc gets you 32bit userland, and hence the need for a separate complier versus using the same gcc version. And this would be why 4.1.1 shows up as a cross-compiler in gcc-config? My first error was not double checking what was exactly merged. Then my confusion was further fueled by gcc-config -l.

Now that I'm a little bit more familiar withe kgcc vs gcc I think the upgrade docs need to have some wording to clarify the difference. There wasn't anything in there to verify you really have both pieces and it isn't clear from gcc-config. Right now I the kgcc-4.1.1 but don't have gcc-4.1.1 so I shouldn't switch yet.

Thanks for the help,
-Chris
Back to top
View user's profile Send private message
gust4voz
Retired Dev
Retired Dev


Joined: 09 Sep 2003
Posts: 373
Location: Buenos Aires, Argentina

PostPosted: Tue Apr 24, 2007 7:09 pm    Post subject: Reply with quote

Feel free to send the docs team a patch with it.
But anyway there's no special upgrade instructions for kgcc64 since it just builds kernels and it doesn't matter which gcc built the userland, they can be mixed together just fine.
Other than kgcc64-4.1.1 being the "supported" kernel compiler there's no reason for kgcc64-3.4.6 to have any issues building them other than usually generating slightly larger kernels.
_________________
Gustavo Zacarias
Gentoo/SPARC monkey
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum