Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] PPC64-32ul -- gcc don't do -m64 (!)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
yaneurabeya
Veteran
Veteran


Joined: 13 May 2004
Posts: 1754
Location: Seattle

PostPosted: Thu Apr 24, 2008 9:54 pm    Post subject: [SOLVED] PPC64-32ul -- gcc don't do -m64 (!) Reply with quote

When trying to compile the 64-bit code I come up with the following errors:

Code:
livecd linux # echo '__GNUC__' | gcc -E -xc -
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "<stdin>"
4
livecd linux # echo '__GNUC__' | gcc -E -m64 -xc -
# 1 "<stdin>"
:0: error: -m64 not supported in this configuration


Am I just using the wrong -march or CHOST? I'm trying to keep the ABI general though so it's bootable on multiple 64-bit capable Powerpc machines (as well as 32-bit G4 Powerpc boxen, if needed).

Code:
livecd linux # emerge --info
Portage 2.1.4.4 (default-linux/ppc/ppc64/2007.0/32bit-userland, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r8-G5 ppc64)
=================================================================
System uname: 2.6.23-gentoo-r8-G5 ppc64 PPC970, altivec supported
Timestamp of tree: Thu, 24 Apr 2008 19:03:01 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.6.3, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="ppc"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirrors.easynews.com/linux/gentoo/ http://distfiles.gentoo.org"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl berkdb cli cracklib crypt cups dri fortran gcc64 gdbm gpm iconv ipv6 mudflap ncurses nls nptl nptlonly openmp pam pcre perl ppc python readline session spl ssl unicode zlib" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" USERLAND="GNU" VIDEO_CARDS="dummy nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


Last edited by yaneurabeya on Thu Apr 24, 2008 10:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
yaneurabeya
Veteran
Veteran


Joined: 13 May 2004
Posts: 1754
Location: Seattle

PostPosted: Thu Apr 24, 2008 10:05 pm    Post subject: Reply with quote

Nevermind. Turns out it was picking up the wrong compiler (didn't realize that /usr/bin/gcc has -o32 only :(...).
Back to top
View user's profile Send private message
patrickoneal
n00b
n00b


Joined: 26 Jan 2004
Posts: 10
Location: Dallas, TX

PostPosted: Fri May 09, 2008 4:27 am    Post subject: Reply with quote

So how did you fix it? I am still a NOOB when it comes to Gentoo on a Sun box but have been running it on x86 hardware for years but it is a little different and the answer wasn't obvious to me on your example. I faced a similar problem after downloading the 2008.0 disk and starting with a stage 3 install when I tried to make the kernel I received almost the same error.
_________________
"When pride comes, then comes shame; But with the humble is wisdom." Solomon
Back to top
View user's profile Send private message
bmaass
n00b
n00b


Joined: 15 Mar 2008
Posts: 25

PostPosted: Mon May 12, 2008 8:19 am    Post subject: Reply with quote

patrickoneal wrote:
So how did you fix it? I am still a NOOB when it comes to Gentoo on a Sun box but have been running it on x86 hardware for years but it is a little different and the answer wasn't obvious to me on your example. I faced a similar problem after downloading the 2008.0 disk and starting with a stage 3 install when I tried to make the kernel I received almost the same error.
If you're building a 64bit Kernel from a 32bit userland, you'll need to have it cross-compile by setting "CROSS_COMPILE ?=" to your architecture in the top-level Makefile in your kernel source directory (on a PowerPC G5, it'll be "CROSS_COMPILE ?= powerpc64-unknown-linux-gnu-", for example).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC 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