BHLFS Tips ???

Vincent Blondel vincent at xtra-net.org
Sun Dec 18 04:45:46 PST 2005


On Sat, 2005-12-17 at 12:02 +0100, Joachim Schipper wrote:
> On Sat, Dec 17, 2005 at 11:20:33AM +0100, Vincent Blondel wrote:
> > On Fri, 2005-12-16 at 16:16 +0100, Jaap Struyk wrote:
> > > Op vr 16-12-2005, om 07:52 schreef Vincent Blondel:
> > > 
> > > > Now that my HLFS system is up and running, I would like to compile some BLFS packages so that I can use our internal shell
> > > > scripts.
> > > 
> > > I've put up alist with builded apps., add --with-pic and (re)move static
> > > libs before building a next package as basic rule.
> > > http://www.japie.deserver.nl/ftp/HLFS/build_all_packages
> > > -- 
> > > Groetjes Japie
> > > 
> > 
> > When you speak about adding "--with-pic" to CFLAGS, don't you mean
> > adding "-pie -fpie" because when I have a look at the compilation
> > settings for basic packages, I often see something like this :
> > 
> >   sed -e 's/^CFLAGS .*$/& -pie -fpie/' -i src/Makefile.in
> > 
> > Secondly, what do you mean by (re)moving static libs ? Once again when I
> > have a look at the compilation settings for basic packages, I see that
> > "disable-static" is often used during the 'configure' step :
> > 
> >    ./configure ... --disable-static
> > 
> > Sorry for these, maybe, stupid questions, but I prefer to get all
> > necessary info before doing anything.
> 
> --with-pic is an option to configure. If configure misbehaves, and does
> not correctly build, one can directly add -pie -fpie to CFLAGS.
> 
> And yes, --disable-static is the standard configure argument for not
> building static libs.
> 
> 		Joachim

What do you mean by misbehabiour for configure script ?

I just compiled , until now, OpenSSL package. Now I am trying to compile
my first package 'wget'. When I run :

  ./configure ... --with-pic 

I don't see any error message but I also don't see it is well taking
into account this parameter.

So I just tested the resulted binary by taking both tests specified in
chapter6 for Gcc package and I get this :

-----

root # readelf -l /usr/bin/wget | grep -e ': /lib' -e 'Shared' \
    -e 'GNU_RELRO' -e 'PAX_FLAGS'

Elf file type is DYN (Shared object file)
      [Requesting program interpreter: /lib/ld-linux.so.2]
  GNU_RELRO      0x03bb44 0x0003bb44 0x0003bb44 0x004bc 0x004bc R   0x1
  PAX_FLAGS      0x000000 0x00000000 0x00000000 0x00000 0x00000     0x4

-----

root # readelf -d /usr/bin/wget | grep -e 'BIND_NOW' -e 'TEXTREL'

 0x00000018 (BIND_NOW)     

-----

So is this enough to verify compilation step ran successfully ?

Regards
Vincent





More information about the hlfs-dev mailing list