List Info

Thread: couple jhalfs-X thoughts (long.. sorry.)




couple jhalfs-X thoughts (long.. sorry.)
user name
2006-04-21 21:57:10
I've been following the last half-dozen jhalfs-X builds
over the 
alpha/udev_update merge and found it most impressive.  I've
built LFS 
manually dozens of times, but I don't see that happening
again.  Nice 
job!  I do have a couple suggestions/requests though..

1) local MD5SUM support

The book was out of sync w/ jhalfs-X for a while (files
missing from the 
MD5SUM file) which resulted in packages not downloading and
the script 
stopping until I manually downloaded files and ran make
myself.

I ended up patching common/common-functions more or less as
so:

    download "" MD5SUMS
+  if [ -f ~/local_md5sums] ; then
+    cat ~/local_md5sums >> $BUILDDIR/sources/MD5SUMS
+  fi

Better would be to add a local md5sum file to the beginning
to override 
any possible conflicting sums but I'm sure you get the
idea.  It'd be 
nice to have the ability to override (or add to) the
downloaded MD5SUMS 
file by command-line switch or the common config file.  I
keep all of 
the sources I download, so it's not much of a stretch to
maintain my own 
md5sum file for them.  Your script can already be set to
look through 
and update my source archive, why not my md5sums so they're
guaranteed 
to match?

2) Optimization

It'd be nice to be able to optimize a build and be able to
compare ICA 
results between optimized and non-optimized builds.  Can't
really just 
export C{,XX}FLAGS and/or drop the vars into the lfs user's
.bashrc 
because it'd break some packages.

Any chance of adding support for this in the script?

I was thinking something along the lines of allowing the
user to 
configure different levels of optimization and binding the
levels to 
certain packages.

Ch5: true/false
Ch6: true/false

Level 0: '-O3 -march=athlon-fx'
Level 1: '-O2 -march=athlon-fx'
Level 2: ''

It'd be hard/impossible to automate the selection of
packages for each 
level based on the books unless you update each book to
include the 
recommended levels specifically for jhalfs-X, but that's
not really an 
acceptable way to go.  Packages are likely going to be
consistent enough 
to just include a static list with jhalfs-X though and given
periodic 
breakage it'd be easy enough to update the file.


Anyhow, I don't mind tinkering with this myself and
submitting a patch 
if you find it worth including - I don't mean to pile it
all on you. 
But beyond the simple md5sum patch, I'm not too familiar
with the inner 
workings of the script at the moment.  Any suggestions on
_where_ the 
setting of C{,XX}FLAGS should be done would be a big help. 
It would 
have to be in such a place that the variables are set if the
build is 
resumed part way through - on entering chroot, i guess.  Not
sure if you 
enter chroot for each package or if you stay in it and build
as many 
packages as possible though.  Each time a package is about
to be built 
then, it could just look it up in the optimization levels
file and 
set/unset the variables accordingly.

Thanks,
Jeremy.
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
couple jhalfs-X thoughts (long.. sorry.)
user name
2006-04-23 09:19:45
El Viernes, 21 de Abril de 2006 23:57, Jeremy Byron
escribió:
> I've been following the last half-dozen jhalfs-X
builds over the
> alpha/udev_update merge and found it most impressive. 
I've built LFS
> manually dozens of times, but I don't see that
happening again.  Nice
> job!  

Many thanks.

> I do have a couple suggestions/requests though.. 
>
> 1) local MD5SUM support
>
> The book was out of sync w/ jhalfs-X for a while (files
missing from the
> MD5SUM file) which resulted in packages not downloading
and the script
> stopping until I manually downloaded files and ran make
myself.

That will happens always due that FTP mirrors are updates
few days after the 
books. Thus in that meantime newer updated packages/patches
will be missing 
in the MD5SUM file

> I ended up patching common/common-functions more or
less as so:
>
>     download "" MD5SUMS
> +  if [ -f ~/local_md5sums] ; then
> +    cat ~/local_md5sums >>
$BUILDDIR/sources/MD5SUMS
> +  fi
>
> Better would be to add a local md5sum file to the
beginning to override
> any possible conflicting sums but I'm sure you get the
idea.  It'd be
> nice to have the ability to override (or add to) the
downloaded MD5SUMS
> file by command-line switch or the common config file. 
I keep all of
> the sources I download, so it's not much of a stretch
to maintain my own
> md5sum file for them.  Your script can already be set
to look through
> and update my source archive, why not my md5sums so
they're guaranteed
> to match?

Good proposal. We will see how that could be implemented.

> 2) Optimization
>
> It'd be nice to be able to optimize a build and be
able to compare ICA
> results between optimized and non-optimized builds. 
Can't really just
> export C{,XX}FLAGS and/or drop the vars into the lfs
user's .bashrc
> because it'd break some packages.
>
> Any chance of adding support for this in the script?

Well, the big issue with that is that at least I know
nothing about build 
optimization settings.

> Anyhow, I don't mind tinkering with this myself and
submitting a patch
> if you find it worth including - I don't mean to pile
it all on you.
> But beyond the simple md5sum patch, I'm not too
familiar with the inner
> workings of the script at the moment.  Any suggestions
on _where_ the
> setting of C{,XX}FLAGS should be done would be a big
help.  It would
> have to be in such a place that the variables are set
if the build is
> resumed part way through - on entering chroot, i guess.
 Not sure if you
> enter chroot for each package or if you stay in it and
build as many
> packages as possible though.  Each time a package is
about to be built
> then, it could just look it up in the optimization
levels file and
> set/unset the variables accordingly.

Yes, we enter to chroot for each package. Also, an envars
file is created for 
each package build to export the package sources directory.
That envars file 
could be the best place to add speciffic optimization
settings for each 
package.

If you want to create such patch, take a look to the
wrt_unpack*() functions 
inside common/common-functions.



-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.com
TLDP-ES:                           http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
couple jhalfs-X thoughts (long.. sorry.)
user name
2006-04-26 04:56:54
M.Canales.es wrote:
><snip>
>> It'd be nice to be able to optimize a build and be
able to compare ICA
><snip>
> If you want to create such patch, take a look to the
wrt_unpack*() functions 
> inside common/common-functions.

Just a bit of a heads-up.. I have a simple patch to allow
optimizing LFS
builds and am running a test now; examining the Makefile
though, it
looks fine.  I haven't added support to ?LFS because I'm
not so
concerned with them and haven't time to test them yet, but
it should be
as easy as dropping a couple function calls in place for
anyone who
wants to try it.

Assuming this build completes ok, I'll clean up the patch
and submit it
to you.

There are two config files:
common/opt_config: Enable/disable optimization
                   Select default optimization level
                   Define each optimization level
  ie: OPTIMIZE=1
      DEF_OPT_LEVEL=1

      CFLAGS_0="unset"
      CXXFLAGS_0=$CFLAGS_0
      LDFLAGS_0="unset"

      CFLAGS_1="-O3 -march=athlon-fx -pipe -s"
      CXXFLAGS_1=$CFLAGS_1
      LDFLAGS_1="-s"

common/def_opt_override: {$name $optLvl \n}
  ie: gcc      0
      binutils 0
      glibc    0

Anything not defined in common/def_opt_override is optimized
with the
default level, anything in common/def_opt_override is
optimized with the
settings defined for the assigned level.

Pretty straight forward, and it seems to work well.  I'll
get back to
you in a bit.

Regards,
Jeremy.
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
couple jhalfs-X thoughts (long.. sorry.)
user name
2006-04-26 07:06:04
Jeremy Byron wrote:
> M.Canales.es wrote:
>> <snip>
>>> It'd be nice to be able to optimize a build
and be able to compare ICA
>> <snip>
>> If you want to create such patch, take a look to
the wrt_unpack*() functions 
>> inside common/common-functions.
><snip>
> I'll get back to you in a bit.

The test build with my optimization patch of jhalfs-2575
completed
successfully.  Patch is attached.  I can send you the build
logs if
they're of any use to you too (only used test level 1
though).

Limitations:
- Doesn't optimize {C,H,B}LFS
  (trivial addition if the other books behave the same as
LFS)
- Can't enable/disable optimization from command-line
  (not necessary, would be nice)
- Can't set default optimization level from command-line
  (not necessary, would be nice)
- Doesn't make me coffee. :(
- ?

Bit of an aside, but I'm not sure what the 'wrt_' stands
for in the
function names. 'Write,' as in to the makefile, perhaps?
Anyhow, I
mimicked it for wrt_optimize() since it performs much the
same job as
wrt_unpack*() and such.

Oh.. I changed wrt_target() and LFS/master.sh slightly too. 
Not too
sure why you don't end the makefile command in wrt_target()
and then in
LFS/master.sh finish it with 'true'.  I don't think
makefile command
sequences should continue across functions - just makes
headaches.  I
ended the command sequence in wrt_target() and removed the
'true' line
from LFS/master.sh.

Regards,
Jeremy.
diff -Naur jhalfs-X/common/common-functions
jhalfs-X-opt/common/common-functions
--- jhalfs-X/common/common-functions	2006-04-25
23:18:39.000000000 -0700
+++ jhalfs-X-opt/common/common-functions	2006-04-25
17:00:03.000000000 -0700
 -201,6
+201,39 
 
 
 #----------------------------------#
+wrt_optimize() {                   # Apply pkg specific
opt's to build
+#----------------------------------#
+	local pkg=$1
+	if [ "$OPTIMIZE" = "1" -o
"$OPTIMIZE" = "yes" ] ; then
+		optLvl=`awk -v pkg="$pkg" '$1 == pkg { print
$2 }' \
+							$JHALFSDIR/def_opt_override`;
+		if [ "$optLvl" = "" ] ; then
+			optLvl=$DEF_OPT_LVL;
+		fi
+		for OPT_VAR in CFLAGS CXXFLAGS LDFLAGS; do
+			eval optVal=\$$_$optLvl;
+			if [ "$optVal" = "unset" ] ;
then
+( cat << EOF
+	echo "unset $OPT_VAR" >> envars;
+EOF
+) >> $MKFILE.tmp
+			else
+( cat << EOF
+	echo "export
$OPT_VAR=\"$optVal\"" >> envars;
+EOF
+) >> $MKFILE.tmp
+			fi
+		done; unset OPT_VAR optVal
+	else
+( cat << EOF
+	echo "unset CFLAGS CXXFLAGS LDFLAGS"
>> envars;
+EOF
+) >> $MKFILE.tmp
+	fi
+}
+
+
+#----------------------------------#
 wrt_target() {                     # Create target and
initialize log file
 #----------------------------------#
   local i=$1
 -225,7
+258,7 
 	\$(call unpack,$FILE)
 	ROOT=\`head -n1 /tmp/unpacked | sed 's^./;s/.*'\`
&& \\
 	echo "export
PKGDIR=\$(MOUNT_PT)\$(SRC)/\$\$ROOT" > envars
&& \\
-	chown -R lfs \$(MOUNT_PT)\$(SRC)/\$\$ROOT &&
\\
+	chown -R lfs \$(MOUNT_PT)\$(SRC)/\$\$ROOT
 EOF
 ) >> $MKFILE.tmp
 }
diff -Naur jhalfs-X/common/def_opt_override
jhalfs-X-opt/common/def_opt_override
--- jhalfs-X/common/def_opt_override	1969-12-31
16:00:00.000000000 -0800
+++ jhalfs-X-opt/common/def_opt_override	2006-04-25
17:00:03.000000000 -0700
 -0,0
+1,3 
+binutils       0
+gcc            0
+glibc          0
diff -Naur jhalfs-X/common/opt_config
jhalfs-X-opt/common/opt_config
--- jhalfs-X/common/opt_config	1969-12-31 16:00:00.000000000
-0800
+++ jhalfs-X-opt/common/opt_config	2006-04-25
17:01:22.000000000 -0700
 -0,0
+1,52 
+#####
+#
+# optimization configuration file
+#
+#####
+
+#--- Enable optimization 0(no)/1(yes)
+OPTIMIZE=0
+
+#--- Default optimization level
+#    This level is overridden by definitions in
common/def_opt_override;
+#    in this way, packages can be tuned independently.  For
example,
+#    if you have trouble building a package at level 3, add
it to
+#    common/def_opt_override as an alternate level.
+#
+#    Optimization levels need not be numeric; custom
strings
+#    can be defined.
+#      For example: CFLAGS_myLevel="-O3 -pipe"
+#                   cat "fooPkg myLevel"
>> common/def_opt_override    
+DEF_OPT_LVL=3
+
+#--- Optimization level definitions
+#      Usage: - Apply optimization string at any given
level
+#             - "unset" will cause the variable
to be unset instead of
+#               null
+#--- LEVEL 0
+#      WARNING: Do not edit this level unless you know what
you are
+#               doing.  By default, this is set to affect
the toolchain
+#               packages, which may have problems with
optimization.
+CFLAGS_0="unset"
+CXXFLAGS_0=$CFLAGS_0
+LDFLAGS_0="unset"
+
+#--- LEVEL 1
+#CFLAGS_1="-O2 -pipe"
+#CXXFLAGS_1=$CFLAGS_1
+#LDFLAGS_1=""
+
+#--- LEVEL 2
+#CFLAGS_2="-O3 -pipe"
+#CXXFLAGS_2=$CFLAGS_2
+#LDFLAGS_2=""
+
+#--- LEVEL 3
+CFLAGS_3="-O3 -march=athlon-fx -pipe -s"
+CXXFLAGS_3=$CFLAGS_3
+LDFLAGS_3="-s"
+
+#--- LEVEL noOpt_noSymbols
+#CFLAGS_noOpt_noSymbols="-s"
+#CXXFLAGS_noOpt_noSymbols=$CFLAGS_noOpt_noSymbols
+#LDFLAGS_noOpt_noSymbols="-s"
diff -Naur jhalfs-X/LFS/master.sh jhalfs-X-opt/LFS/master.sh
--- jhalfs-X/LFS/master.sh	2006-04-25 23:18:37.000000000
-0700
+++ jhalfs-X-opt/LFS/master.sh	2006-04-25 17:07:09.000000000
-0700
 -112,7
+112,10 
 
       # Insert instructions for unpacking the package and
to set the PKGDIR variable.
       wrt_unpack "$FILE"
-      echo -e '\ttrue' >> $MKFILE.tmp
+
+      # Append desired optimizations to envars
+      wrt_optimize "$name"
+
     fi
 
     # Insert date and disk usage at the top of the log
file, the script run
 -222,6
+225,19 
       wrt_unpack2 "$FILE"
     fi
 
+    # Append desired optimization level to envars
+    #   This is hackish and likely not necessary
+    #   provided the makefile is generated properly
+    #   in these non-building sections.
+    case "$" in
+      *kernfs)                              ;;
+      *creatingdirs)                        ;;
+      *createfiles)                         ;;
+      *readjusting)                         ;;
+      *strippingagain)                      ;;
+      *)               wrt_optimize "$name" ;;
+    esac
+
     # In the mount of kernel filesystems we need to set LFS
     # and not to use chroot.
     case "$" in
diff -Naur jhalfs-X/master.sh jhalfs-X-opt/master.sh
--- jhalfs-X/master.sh	2006-04-25 23:18:39.000000000 -0700
+++ jhalfs-X-opt/master.sh	2006-04-25 17:00:03.000000000
-0700
 -56,6
+56,11 
 [[ $? > 0 ]] && echo "$COMMON_DIR/conf did
not load.." && exit
 [[ $VERBOSITY > 0 ]] && echo "OK"
 #
+[[ $VERBOSITY > 0 ]] && echo -n "Loading
optimization config..."
+source $COMMON_DIR/opt_config
+[[ $? > 0 ]] && echo "
$COMMON_DIR/opt_config did not load.." && exit
+[[ $VERBOSITY > 0 ]] && echo "OK"
+#
 [[ $VERBOSITY > 0 ]] && echo -n "Loading
compare module..."
 source $COMMON_DIR/func_compare.sh
 [[ $? > 0 ]] && echo
"$COMMON_DIR/func_compare.sh did not load.."
&& exit
 -485,6
+490,7 
 
 if [[ "$PWD" != "$JHALFSDIR" ]];
then
   cp $COMMON_DIR/makefile-functions $JHALFSDIR/
+  cp $COMMON_DIR/def_opt_override $JHALFSDIR/
   if [[ "$COMPARE" != "0" ]] ; then
     mkdir -p $JHALFSDIR/extras
     cp extras/* $JHALFSDIR/extras
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
couple jhalfs-X thoughts (long.. sorry.)
user name
2006-04-26 16:49:25
On 4/26/06, Jeremy Byron <rjjbyronshaw.ca> wrote:
> Jeremy Byron wrote:

> The test build with my optimization patch of
jhalfs-2575 completed
> successfully.  Patch is attached.  I can send you the
build logs if
> they're of any use to you too (only used test level 1
though).

Thank you! I love it and I'm sure others will appreciate it
too. Great
job! I can't wait to use it. Yeah!
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
couple jhalfs-X thoughts (long.. sorry.)
user name
2006-04-26 17:23:08
El Miércoles, 26 de Abril de 2006 09:06, Jeremy Byron
escribió:

> The test build with my optimization patch of
jhalfs-2575 completed
> successfully.  Patch is attached.  I can send you the
build logs if
> they're of any use to you too (only used test level 1
though).

Many thanks. I will review it ASAP to see if should be keep
as a contributed 
patch or if could be a candidate for inclusion into the
default code.

> Bit of an aside, but I'm not sure what the 'wrt_'
stands for in the
> function names. 'Write,' as in to the makefile,
perhaps? Anyhow, I
> mimicked it for wrt_optimize() since it performs much
the same job as
> wrt_unpack*() and such.

Yes, wrt_* means "write to the Makefile".


> Oh.. I changed wrt_target() and LFS/master.sh slightly
too.  Not too
> sure why you don't end the makefile command in
wrt_target() and then in
> LFS/master.sh finish it with 'true'.  I don't think
makefile command
> sequences should continue across functions - just makes
headaches.  I
> ended the command sequence in wrt_target() and removed
the 'true' line
> from LFS/master.sh.

That true command was added some time ago to fix a issue
(that I don't 
remember at this moment). Maybe after the last code changes
it isn't required 
anymore. I will take a look to it.


-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.com
TLDP-ES:                           http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
couple jhalfs-X thoughts (long.. sorry.)
user name
2006-04-29 17:28:18
El Miércoles, 26 de Abril de 2006 09:06, Jeremy Byron
escribió:

> The test build with my optimization patch of
jhalfs-2575 completed
> successfully.  Patch is attached.  I can send you the
build logs if
> they're of any use to you too (only used test level 1
though).

I'm working in integrate your code inside jhalfs. Look like
the changes will 
be not very intrusives.

Some comments:

- I think that the temporary tools don't need to be
optimized. If I'm wrong 
send me a cluebat.

- The book say that CFLAGS and CXXFLAGS must be unset when
building GRUB. Have 
you tried to run an optimized GRUB? That could to mean that
GRUB must be 
added to def_opt_override.

- Also, the book say that if using CFLAGS you must to add
"-fPIC" when 
building Zlib and remove it afterwards. That could to mean
that Zlib will 
need a separate  LEVEL and be added to def_opt_override to
use that level.


> - Doesn't optimize {C,H,B}LFS
>   (trivial addition if the other books behave the same
as LFS)

Right, is trivial.

> - Can't enable/disable optimization from command-line
>   (not necessary, would be nice)
> - Can't set default optimization level from
command-line
>   (not necessary, would be nice)

Both can be fixed.

> - Doesn't make me coffee. :(

Know someone how that could be implemented? Would be a very
cool feature 


-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.com
TLDP-ES:                           http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
couple jhalfs-X thoughts (long.. sorry.)
user name
2006-04-29 23:35:28
M.Canales.es wrote:
><snip>
> I'm working in integrate your code inside jhalfs. Look
like the changes will 
> be not very intrusives.

Cool; thanks. 

> Some comments:
> 
> - I think that the temporary tools don't need to be
optimized. If I'm wrong 
> send me a cluebat.

Likely not, and I don't usually, but I figured it wouldn't
hurt
anything; that is unless it takes significantly longer to
build, but I
don't believe so. I'll run a comparison soon.

People with little HDD space might want to optimize them
with "-s" to
keep the file sizes smaller.  (Rather than running strip at
the end when
they may reach their limit before getting that far.)

Perhaps add CH5_OPT=1/0 and CH6_OPT=1/0 to common/opt_config
and wrap a
conditional around the master.sh:wrt_optimize() calls?  (I
was just
looking over my initial proposal and this was there.. forgot
about it. lol)

That won't help people who might want different
optimizations in ch5 and
ch6 (such as just "-s" in ch5 and "-O3
-march=athlon-fx -s" in ch6) but
that'd be a little more annoying to implement.

Anyhow, I won't lose any sleep over having ch5 optimized or
not.

> - The book say that CFLAGS and CXXFLAGS must be unset
when building GRUB. Have 
> you tried to run an optimized GRUB? That could to mean
that GRUB must be 
> added to def_opt_override.

Doh.  I should have gone through the book and noted any
optimization
warnings.  Forgot all about grub; yes it should be added to
the override
list.  It builds successfully but fails when loading stage
files into
the boot sector as a couple files are built larger than
allowable IIRC.
 I haven't actually tried running an optimized grub in
quite some time
though.

> - Also, the book say that if using CFLAGS you must to
add "-fPIC" when 
> building Zlib and remove it afterwards. That could to
mean that Zlib will 
> need a separate  LEVEL and be added to def_opt_override
to use that level.

Yup.  Perhaps simply:
echo "zlib fPIC" >>
common/def_opt_override

Then define C{,XX}FLAGS_fPIC in common/opt_config as
"-fPIC" with a
comment that the "-fPIC" flag must be retained
if other flags are added
to the section.  I think LDFLAGS can simply be
"" here.

Makes it kinda descriptive; I'm not sure why I kept the
numbers anyhow,
except that I had the test levels in mind at the time.

I got to thinking recently that the levels in the
common/def_opt_override file could be additive.  For
example, given a
default optimization level of 'def' and zlib needs
"-FPIC":
echo "zlib def,fPIC" >>
common/def_opt_override
This way, when the script grabs the override level
"def,fPIC" it can
concatenate both {C{,XX},LD}FLAGS_def and
{C{,XX},LD}FLAGS_fPIC into
{C{,XX},LD}FLAGS.

Not sure how useful this would be, but it might save on some
duplication
in the files.

Oh.. and I didn't add definitions for
OTHER_{C{,XX},LD}FLAGS (and any
other flags there may be for optimizing that I don't know
of).  Do folks
use these much/at all?

Anyhow, thanks much for the feedback and working this into
jhalfs.
Jeremy.
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
couple jhalfs-X thoughts (long.. sorry.)
user name
2006-04-30 09:16:32
El Domingo, 30 de Abril de 2006 01:35, Jeremy Byron
escribió:

> Anyhow, thanks much for the feedback and working this
into jhalfs.
> Jeremy.

Many thanks to you for the inputs.

The optimization code is hold for now due that we need to
develop a new 
from-scratch download code to can handle the FTP mirrors
migration.

I hope not to have this hold many time.
 
-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.com
TLDP-ES:                           http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
couple jhalfs-X thoughts (long.. sorry.)
user name
2006-05-02 13:19:26
On 4/29/06, Jeremy Byron <rjjbyronshaw.ca> wrote:
> M.Canales.es wrote:
>
> > - Also, the book say that if using CFLAGS you must
to add "-fPIC" when
> > building Zlib and remove it afterwards. That could
to mean that Zlib will
> > need a separate  LEVEL and be added to
def_opt_override to use that level.
>
> Yup.  Perhaps simply:
> echo "zlib fPIC" >>
common/def_opt_override

Now seems like a good time to bring up something that died
on the -dev
list a while back.  The zlib maintainer said he would
incorporate this
fix into the next release.

--- configure.bak       2005-07-11 13:11:57.000000000 -0700
+++ configure   2006-05-02 06:09:37.374408229 -0700
 -73,7
+73,7 

 if test "$gcc" -eq 1 && ($cc -c $cflags
$test.c) 2>/dev/null; then
   CC="$cc"
-  SFLAGS=${CFLAGS-"-fPIC -O3"}
+  SFLAGS="$ -fPIC"
   CFLAGS="$cflags"
   case `(uname -s || echo unknown) 2>/dev/null` in
   Linux | linux | GNU | GNU/*)
LDSHARED=${LDSHARED-"$cc -shared
-Wl,-soname,libz.so.1"};;

Then, -fPIC is always added to the shared library flags. 
This can be
accomplished with the following sed:

sed -i.bak 's/SFLAGS=.*fPIC/SFLAGS="\$
-fPIC"/' configure

--
Dan
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
[1-10] [11-15]

about | contact  Other archives ( Real Estate discussion Medical topics )