Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#8186 - Enable 64bit support in 32bit GCC

Attached to Project: Arch Linux
Opened by Damjan Georgievski (damjan) - Monday, 01 October 2007, 00:33 GMT
Last edited by Jan de Groot (JGC) - Wednesday, 20 February 2008, 22:05 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Jan de Groot (JGC)
Andreas Radke (AndyRTR)
Architecture All
Severity Low
Priority Normal
Reported Version 2007.08.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Even a 32bit GCC can "cross-compile" 64bit executables.

This is mostly usefull if you want to compile a 64bit kernel on x86-64 CPU's. The kernel will still be compatible with 32bit user-space but will make better use of the CPU especially with memory management.

Gcc supports this easily, it's only that the default configuration doesn't enable it by default. Debian configures its gcc to support -m64 on its 32bit distro, and I think it would be beneficial for Arch too.

This change in GCC in no way affects the 32bit compatibility, and by default it's still a 32bit compiler. It only enables the -m64 feature. There are some rumors that compilation is slower, but GCC devels assure this is not true and no hard facts have surfaced about that.

I'll try to contact GCC devels to find the best patch that enables this. Debian might be a godd source too.
This task depends upon

Closed by  Jan de Groot (JGC)
Wednesday, 20 February 2008, 22:05 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Can't get a biarch enabled binutils built without segfaults, not implementing.
Comment by Andreas Radke (AndyRTR) - Monday, 01 October 2007, 19:27 GMT
-1 from me.

this feature - if it's a real one - is only useful for a few people and adds too much risk for us that it might break other stuff. at least Arch i686 doesn't make use of it - whoever may find that useful can recompile the gcc packages themself.

/me still wonders why anybody would run such a strange custom compiled 64bit kernel from inside a true 32bit OS. don't rape your cpu, operating system and compilers!
Comment by Damjan Georgievski (damjan) - Tuesday, 02 October 2007, 14:26 GMT
Andy, a 64bit kernel is much more efficient when working with anything more than 1GB RAM. That's the main reason.

And yes, it's a real feature used in Debian for ex.

And lastly, whether running 64/32bit combination is rape or not, has nothing to do with this request. The -m64 option to GCC doesn't change anything in the default (32bit) functionality of GCC.
Comment by Damjan Georgievski (damjan) - Wednesday, 20 February 2008, 19:52 GMT
  • Field changed: Percent Complete (100% → 0%)
And reason for "Won't implement"?

I'd also like to refer to this post by Theodore Tso http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2008-February/042289.html
Comment by Jan de Groot (JGC) - Wednesday, 20 February 2008, 21:00 GMT
This requires a debian patch and using --enable-targets=all in the configure step. I wonder what useful feature this could add to our gcc:
- we're not a multilib friendly distribution
- you need 64bit libraries to link against

Comment by Jan de Groot (JGC) - Wednesday, 20 February 2008, 21:19 GMT
Ok, I enabled 64bit support in a local gcc build with the debian patch and --enable-targets=all, this is the result:

jan@server ~]$ gcc -o test -m64 test.c
Assembler messages:
Fatal error: No compiled in support for x86_64

More patching is involved, so I don't like to add support for biarch support on i686 until it's official.

Loading...