LinuxQuestions.org
Review your favorite Linux distribution.
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 08-09-2015, 04:35 PM   #1
Jerasmussen
Member
 
Registered: Jul 2015
Location: San Antonio, TX
Distribution: XCP on Debian Wheezy; Raspbian; HLFS
Posts: 30

Rep: Reputation: Disabled
HLFS or CLFS?


Hiya:

Linux from Scratch is a new adventure for me, something to do before the savings run out and I become homeless or, abrupt climate change puts an end to western civilization. You know, whichever comes first.

Anyway, I've been reading through the books while doing practice compilations and one thing has me confused. Can someone please confirm the following?

The HLFS book talks about cross-linking but, this is not the same as the cross compiling described in the CLFS book. Thus, an HLFS build produces a system that runs on the same architecture as the host, regardless of what -march or -mtune flags are given. The only way to build a 32 bit system on a 64 bit host is the method described in the CLFS book.

Do I have that right?

Regards,
James Rasmussen
 
Old 08-10-2015, 01:19 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Using the LFS instructions, you can build a pure 32-bit system on a 64-bit (x86_64) machine. Thus, you can build a 32-bit system on a 64-bit host using LFS instructions.

The HLFS instructions are modified version of the LFS instructions to create a hardened system (hence the H). Thus, you can build a 32-bit system on a 64-bit host using HLFS instructions.

If you want a multilib system (32-bit AND 64-bit libraries and apps), you need to use the instructions in CLFS. The CLFS instructions also provide for a pure 32-bit or a pure 64-bit system on a 64-bit host. Thus, you can build a pure 32-bit, pure 64-bit, or multilib system on a 64-bit host using CLFS instructions.
 
Old 08-10-2015, 03:23 PM   #3
re_nelson
Member
 
Registered: Oct 2011
Location: Texas, USA
Distribution: LFS-SVN, Gentoo~amd64, CentOS-7, Slackware64-current, FreeBSD-11.1, Arch
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by Jerasmussen View Post
Hiya:
Linux from Scratch is a new adventure for me, something to do before the savings run out and I become homeless or, abrupt climate change puts an end to western civilization. You know, whichever comes first.
Well expressed James and your creative wording brought a smile. As one who's been using an LFS system as my primary working environment for over a dozen years, my suggestion is to stick with a pure LFS/BLFS using the most recent version (not the cutting-edge SVN variety). For your first go-around, avoid the variants such as HLFS, CLFS or any of the others.

And I can't stress the following enough: Follow the book verbatim! Treat it as if it's enscribed on golden plates and handed down from the mountain after being written by a wise oracle. If you have a 64-bit platform, then don't even give a second thought, at this early stage, to a multilib system (with 32-bit apps and libraries). I opted for 32-bit and 64-bit only after several years. Even now, what bits and pieces there are using 32-bits are few and far between.

Believe in the book and follow it all the days of your life!
 
Old 08-10-2015, 06:32 PM   #4
Jerasmussen
Member
 
Registered: Jul 2015
Location: San Antonio, TX
Distribution: XCP on Debian Wheezy; Raspbian; HLFS
Posts: 30

Original Poster
Rep: Reputation: Disabled
Thanks Weibullguy and re_nelson;

When "playing around" with HLFS on my 64 bit Debian box, readelf -l a.out | grep ': /tools' always came back with the x86_64 linker and the triplet was always x86_64-lfs-linux-gnu. it didn't seem to mater what I set for -march= or -mtune= and believe me, I tried some crazy stuff just to see what would happen.

The HLFS book also seems to play "fast and loose" with some of the terminology, using cross-linked and cross-compiled in non-specific contexts. I guess that makes sense though, if as you say HLFS is intended for Bodhisattvas.

BTW, the aforementioned Debian box is a xen cloud platform host, so I can spin up different hardware/software profiles in minutes. Quite useful actually: I can create monstrosities that would turn Dr. Frankenstein green with envy, watch them crash into deranged snippets of broken code, and the "real" computer sails on without a hiccup.

Regards,
James Rasmussen
 
  


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
is HLFS really necessary? thehardcore8 Linux From Scratch 1 10-22-2009 12:28 AM
[consult]How to compile a pure 64bit HLFS system ? yarx Linux From Scratch 1 03-18-2009 04:30 AM
chown clfs:clfs mishap Louis_Carole Linux From Scratch 4 03-21-2007 07:40 PM
HLFS glibc-2.5 and ssp Angeliqe Linux From Scratch 2 01-29-2007 01:56 PM
hlfs iso? irq13 Linux From Scratch 0 03-08-2004 05:24 PM

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

All times are GMT -5. The time now is 05:00 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