Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 477956 - [TRACKER] Build sys-devel/gcc as an N64 binary on MIPS profiles with non-N64 default ABI
Summary: [TRACKER] Build sys-devel/gcc as an N64 binary on MIPS profiles with non-N64 ...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: MIPS Porters
URL:
Whiteboard:
Keywords: Tracker
Depends on: 442548 457134 481306 510248
Blocks: 513042
  Show dependency tree
 
Reported: 2013-07-24 00:31 UTC by Matt Turner
Modified: 2022-02-19 01:15 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Turner gentoo-dev 2013-07-24 00:31:25 UTC
MIPS' o32 and n32 ABIs have a virtual memory limit of 2 GiB. Some packages, like webkit-gtk, require more than 2 GiB for linking.

The solution is to build gcc as an N64 binary (even when the base system is not N64), since N64 provides effectively unlimited virtual address space.

To do this gcc's dependencies will need multilib support:

sys-libs/zlib     : DONE as of 1.2.8-r1
dev-libs/mpfr     : Not done (EAPI=3)
dev-libs/gmp      : Not done (EAPI=0) (part of baselibs)
dev-libs/mpc      : Not done (EAPI=0)
sys-devel/gettext : Not done (EAPI=2) (part of baselibs)
dev-libs/cloog-ppl: Not done (EAPI=4)
dev-libs/isl      : Not done (EAPI=4)

This bug will track the project's progress.
Comment 1 SpanKY gentoo-dev 2013-08-21 04:54:13 UTC
why 2 GiB ?  if you're running a 64bit kernel, then shouldn't the 32bit processes have 4 GiB ?  i guess if you're running a 32bit kernel, then it's because you're using a 2 GiB/2 GiB split (or mips doesn't give you the option?) ?  although if you have the ability to run N64, i'd wager you must be running a 64bit kernel.
Comment 2 Matt Turner gentoo-dev 2013-08-21 06:30:15 UTC
(In reply to SpanKY from comment #1)
> why 2 GiB ?  if you're running a 64bit kernel, then shouldn't the 32bit
> processes have 4 GiB ?  i guess if you're running a 32bit kernel, then it's
> because you're using a 2 GiB/2 GiB split (or mips doesn't give you the
> option?) ?  although if you have the ability to run N64, i'd wager you must
> be running a 64bit kernel.

O32 and N32 only have 2^31 bits of virtual address space. See http://gcc.gnu.org/ml/gcc/2011-02/msg00303.html and other related threads. There was some talk of /another/ MIPS ABI ("n32-big") that would be n32, but with 32-bit pointers, but I think David Daney rightly decided it wasn't worth the trouble.
Comment 3 Matt Turner gentoo-dev 2014-05-18 18:48:56 UTC
sys-libs/zlib     : DONE as of 1.2.8-r1
dev-libs/mpfr     : Not done (EAPI=3)
dev-libs/gmp      : DONE as of 5.1.3-r1
dev-libs/mpc      : Not done (EAPI=4)
sys-devel/gettext : DONE as of 0.18.3.2
dev-libs/cloog-ppl: Not done (EAPI=4)
dev-libs/isl      : Not done (EAPI=4)
Comment 4 Matt Turner gentoo-dev 2015-02-23 02:21:33 UTC
sys-libs/zlib     : DONE as of 1.2.8-r1
dev-libs/mpfr     : DONE as of 3.1.2_p10
dev-libs/gmp      : DONE as of 5.1.3-r1
dev-libs/mpc      : DONE as of 1.0.2-r1
sys-devel/gettext : DONE as of 0.18.3.2
dev-libs/cloog    : DONE as of 0.18.1
dev-libs/isl      : DONE as of 0.12.2

(Newer gcc's replaced their dependence on cloog-ppl with cloog)

All the dependencies are done. Yay!
Comment 5 Anthony Basile gentoo-dev 2015-02-23 12:14:37 UTC
(In reply to Matt Turner from comment #4)
> sys-libs/zlib     : DONE as of 1.2.8-r1
> dev-libs/mpfr     : DONE as of 3.1.2_p10
> dev-libs/gmp      : DONE as of 5.1.3-r1
> dev-libs/mpc      : DONE as of 1.0.2-r1
> sys-devel/gettext : DONE as of 0.18.3.2
> dev-libs/cloog    : DONE as of 0.18.1
> dev-libs/isl      : DONE as of 0.12.2
> 
> (Newer gcc's replaced their dependence on cloog-ppl with cloog)
> 
> All the dependencies are done. Yay!

I haven't looked at this closely but is it as simple as adding -mabi=n64 to the CFLAGS when building gcc?  modulo any filtering the eclass may do of course.
Comment 6 Matt Turner gentoo-dev 2015-02-23 16:04:13 UTC
(In reply to Anthony Basile from comment #5)
> I haven't looked at this closely but is it as simple as adding -mabi=n64 to
> the CFLAGS when building gcc?  modulo any filtering the eclass may do of
> course.

Probably not that simple. We should make n64 compiling on n64 profiles work first (bug 442548). :)