LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 10-24-2016, 02:42 PM   #1
mwvsedam
LQ Newbie
 
Registered: Oct 2016
Posts: 2

Rep: Reputation: Disabled
Building 32 and 64 bit versions of glibc under X86_64


Hi,

I have an x86_64 machine and I am trying to build a new secondary gcc/glibc toolchain (leaving the existing toolchain in place and undisturbed). I have been able to build gcc (c,c++) and glibc all as 64 bit. I have to compile some application code as 32 bit (-m32) and need it to link with a 32 bit version of glibc. Does anyone have a glibc configure example of how to build glibc as 32 bit under an x86_64 compiler/environment?

Thanks.
 
Old 10-24-2016, 03:15 PM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi you might wanna take a look at CLFS, There is a multilib version
http://trac.clfs.org/wiki/read#Curre...andDevelopment
 
Old 10-24-2016, 04:29 PM   #3
mwvsedam
LQ Newbie
 
Registered: Oct 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Hi you might wanna take a look at CLFS, There is a multilib version
http://trac.clfs.org/wiki/read#Curre...andDevelopment
Thanks. Ya, I did come across that CLFS config example in my efforts over the last week or so. I tried something similar and config ran ok but still get make/build errors that I don't quite yet understand.

Is it reasonable to assume that I can leave my existing system intact and build a secondary more up to date binutils, gcc, and both 32/64 bit glibc on that host without having to create a full chroot'd environment? I was just trying to --prefix everything to some directory under my home as the root for the tool chain. I tried both 1) cross-compiling with specific --host, --target, and --build specs and 2) just letting config decide on those parameters. I did get binutils, gcc, and glibc to build and seemingly work all as 64 bit. I had some old apps that had some 32 bit code and wouldn't link with that new glibc. I tried various options for configuring/building glibc as 32 bit but there were unknown data structures/types encountered during make that I couldn't seem to find anywhere. Anyway, is my approach even reasonable/do-able?

Thanks again.
 
Old 10-25-2016, 11:00 AM   #4
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
https://github.com/elkrejzi/system-m...2032%20bit.txt

Try this one
 
  


Reply



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
yum install of both 32-bit and 64-bit gcc libraries - PROTECTED MULTILIB VERSIONS auclark@wsu.edu Linux - Newbie 8 12-08-2015 06:14 PM
what are the issues with replacing glibc-2.8-8.x86_64 on FC9 with glibc-2.14.1 rlsmithnm Linux - Newbie 3 12-01-2011 02:42 PM
glibc-2.3.2-95.37.i386 parallel to glibc-x86_64 thbaig Linux - General 3 06-14-2011 06:25 AM
Can you kexec at boot from a 32-bit (x86) to 64-bit (x86_64) kernel? Shingoshi Linux - Kernel 15 06-26-2009 10:08 PM
Errors during the test suite for Glibc-20050926 32 Bit � Cross compile x86_64 Basel Linux From Scratch 3 10-29-2005 06:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 09:32 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration