LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-09-2008, 02:41 PM   #1
henkees
Member
 
Registered: Feb 2008
Location: Netherlands, Zeeland
Distribution: Slackware64 current multilib, Gentoo and SalixOs
Posts: 40

Rep: Reputation: 18
compile kernel for x86_64


I have an Intel dual core (64bits) computer and I have some experience with kernel compiling. I have a very simple -maybe very stupid- question:

Is it possible to install or compile the kernel for x86_64, so that the kernel is 64 bits and that it can support 32bits applications?

I searched and searched but can't find a good answer. I found something that you first must compile gcc for 64 bits, but how to do that, no idea...
(I don't even know if it is really possible...)
The only thing I found via google is that it is very tricky(?)

Can someone help me out of my dreams, or maybe... give the solution.

(I work of course with slackware (the real one, 32 bits)

Thanks in advance.

Last edited by henkees; 10-09-2008 at 02:50 PM.
 
Old 10-09-2008, 03:00 PM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,094
Blog Entries: 2

Rep: Reputation: 111Reputation: 111
Its easiest just to install a 64bit OS and then install the 32bit compatibility libraries for running the 32bit stuff.
 
Old 10-09-2008, 03:17 PM   #3
henkees
Member
 
Registered: Feb 2008
Location: Netherlands, Zeeland
Distribution: Slackware64 current multilib, Gentoo and SalixOs
Posts: 40

Original Poster
Rep: Reputation: 18
I must say that I also work with Suse (64 bits), but I like Slack more because it's "clear and simple".
I have several times compiled the kernel so that it's quite small and it loads just what is needed for my hardware.
I can say it is quite fast for 32 bits now!

I have read that it could be possible to compile a kernel 64 bits on a 32 bits system with a gcc compiler that supports 64bits.
IF it is possible, then the system would get a little bit faster... IS it possible? How? Or is this really difficult stuff?
Thanks anyway!
 
Old 10-09-2008, 09:06 PM   #4
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,244

Rep: Reputation: 622Reputation: 622Reputation: 622Reputation: 622Reputation: 622Reputation: 622
If you want a 64-bit Slackware with 32-bit compatibility, give Slamd64 a try. Bluewhite64 is a 64-bit port (if you can call it a port -- it differs from Slackware quite a bit), but WITHOUT 32-bit compatibility (as far as I know -- though this may have changed as of late). Slamd64 is more similar to a direct 64-bit port (and some prefer it for political reasons -- do a search if you want more information about that), and if I were to switch, that's the distro I would use. Slamd64 does seem to get updated a lot slower than Bluewhite64, though. However, regular 32-bit Slackware works fine for me without any 32-bit compatibility issues (for obvious reasons), so I see no need to switch -- yet.

As for compiling 64-bit stuff, if you do need a 64-bit gcc etc., you would need to do the circular copmilation technique, as far as I know -- but I haven't played with this stuff so I am probably dead wrong. If you do need to build circularly, it's a lot of effort.
 
Old 10-10-2008, 02:08 AM   #5
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,750

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
The kernel doesn't care whether applications are 32 bit or 64 bit. The applications depend on whether glibc is 32bit or 64bit. Since the kernel doesn't need or use any external libs, it doesn't care.
Creating a 64bit system is whole 'nother matter. but if all you want is 64bit optimization for your kernel, just select the appropriate arch and recompile.
 
Old 10-10-2008, 04:18 AM   #6
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
I don't think there's much use in compiling a 64-bit kernel for a 32-bit system. Just install slamd64, it's an unofficial port of Slackware to 64-bit with multilib support, meaning it can run 32-bit apps too.
 
Old 10-10-2008, 11:10 AM   #7
Petri Kaukasoina
Member
 
Registered: Mar 2007
Posts: 241

Rep: Reputation: 86
I run a x86_64 kernel on my pentium 4 with Slackware-current (normal 32-bit userspace). I just build the kernel on another system (x86_64 Centos). CONFIG_IA32_EMULATION=y is needed in the kernel config.

Maybe its merits are questionable but at least no HIMEM is needed: all memory is readily accessible with 64 address bits. I also installed a 64-bit version of Matlab (plus some 64-bit shared libraries for Matlab in /lib64 which I copied from Centos). And, some number crunching fortran and C programs were a bit faster (6-11 %) as x86_64 binaries vs. x86_32.
 
Old 10-10-2008, 02:36 PM   #8
henkees
Member
 
Registered: Feb 2008
Location: Netherlands, Zeeland
Distribution: Slackware64 current multilib, Gentoo and SalixOs
Posts: 40

Original Poster
Rep: Reputation: 18
Thanks for all the answers!
It's getting more clear to me.
I'll try kernel compiling with 64bits arch supporting. I want to stay on Slack and not to go to Slamd64, because Slamd64 gave me some problems with the Intel processor. (I never buy an Intel anymore, but that's an other story...)
Thanks again, greetings, Henkees.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile 32bit .c .cc On 64bit x86_64 systems? Leo Park Linux - Software 4 01-09-2008 10:57 PM
x86_64 library compile problem zypo Fedora 1 10-10-2005 04:46 AM
kernel compile on x86_64 fails acidjuice Linux - Software 1 05-06-2005 04:30 PM
Compile errors on x86_64 SUSE marsonist Linux - Software 5 05-20-2004 05:21 PM
Can't get kernel to compile as x86_64 arch... Electrode Linux - Software 22 12-18-2003 09:11 AM


All times are GMT -5. The time now is 09:29 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration