Robert Connolly | 13 Sep 2009 07:09
Picon
Favicon

optimizations

Just some tidbits.

I've mentioned before that GCC can be compiled with --with-cpu=i686 (this sets 
the default -mtune) and --with-arch=i486 (this sets the default -march).

Some distros are now adding "-O1 --hash-style=gnu" to gcc specs, for linking. 
This can be done in gcc/config/i386/linux.h, in "#define LINK_SPEC".

In gcc/config/i386/linux.h "#define CC1_SPEC", and in "gcc/gcc.c" "#define 
CC1PLUS_SPEC", this can be added to set -fomit-frame-pointer by default:
%{!pg:%{!fno-omit-frame-pointer: -fomit-frame-pointer}}

I've tried it, and it seems to work. I prefer this, instead of setting CFLAGS 
in the environment, because it allows packages to use whatever CFLAGS they 
like, while also using -fomit-frame-pointer (and my -mtune and -march) by 
default.

Some packages will try to use their own CFLAGS, but will use our CFLAGS if it 
is set in the environment. Using GCC specs allows both to work at the same 
time.

robert
--

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page
Stef Bon | 23 Sep 2009 10:21
Picon

A simple way to determine an option from a list seperated by a ','.

Hello,

I've written a script which is a wrapper around mount.cifs. IT's called 
by the automounter, which passes some
paremteres to it.
It's neccesary for this script to determine these parameters. The first 
are easy:

$1 is the key
$2 is the mountdirectory

and mountoptions are  after -o .
I've written code that does discover these options and looks for the 
option AUTOFS_USER:

MOUNT_options=""

while [ ! -z "$1" ]; do

    if [ "$1" = "-o" ]; then

        shift

        MOUNT_options="$1"
        break            

    fi

    shift

(Continue reading)

Piotr Sawuk | 24 Sep 2009 02:57
Picon

Re: A simple way to determine an option from a list seperated by a ','.

Stef Bon wrote:
> Hello,
> 

>         elif [ $(echo "$MOUNT_option" | grep "AUTOFS_USER" | wc --chars) 
> -gt 0 ]; then
> 
> 
>             AUTOFS_USER="$(echo $MOUNT_option | cut --delimiter='=' 
> --fields=2 --only-delimited)"

with sed:

if echo ",$MOUNT_options" | grep ",AUTOFS_USER";then
	AUTOFS_USER="$(echo ,$MOUNT_options | sed 's%.*,AUTOFS_USER=%%g;s%,.*%%')"
fi

what above commands do: the whole block creates a variable only
when AUTOFS_USER is an option. and only when there actually is
"=" and anything after it, the variable is non-empty. the if
works also with ordinary commands, no [] needed. the sed does
extract the last AUTOFS_USER option's parameter. in the sed
command, the first command does erase all ",AUTOFS_USER="
and anything before them. the ";" is a command-seperator in
sed, and the next command is performed after the first has
finished. the second sed-command does erase "," and everything
after it. there is a "," at the beginning of the echo-input,
and so everything is erased by this second command, unless the
first one did actually erase the ",AUTOFS_USER=" thereby leaving
the stuff after the "=" untouched. i.e. the first command clips
(Continue reading)

Freddy Cruger | 27 Sep 2009 12:33
Gravatar

Chat test

Can I really post here? Is it really chat, so free, without dnsbl?

--

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Leam Hall | 27 Sep 2009 12:48
Favicon

Re: Chat test

Not sure what dnsbl is, but I did get your e-mail.

Leam

Freddy Cruger wrote:
> Can I really post here? Is it really chat, so free, without dnsbl?
> 
--

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

pankaj sharma aka Cipher | 28 Sep 2009 09:22
Picon

Re: lfs-chat Digest, Vol 1126, Issue 1

yes

On Sun, Sep 27, 2009 at 11:00 PM, <lfs-chat-request <at> linuxfromscratch.org> wrote:
Send lfs-chat mailing list submissions to
       lfs-chat <at> linuxfromscratch.org

To subscribe or unsubscribe via the World Wide Web, visit
       http://linuxfromscratch.org/mailman/listinfo/lfs-chat
or, via email, send a message with subject or body 'help' to
       lfs-chat-request <at> linuxfromscratch.org

You can reach the person managing the list at
       lfs-chat-owner <at> linuxfromscratch.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of lfs-chat digest..."


Today's Topics:

  1. Chat test (Freddy Cruger)
  2. Re: Chat test (Leam Hall)


----------------------------------------------------------------------

Message: 1
Date: Sun, 27 Sep 2009 12:33:05 +0200
From: Freddy Cruger <freddy <at> port.selfip.org>
Subject: Chat test
To: lfs-chat <at> linuxfromscratch.org
Message-ID: <1254047585.5272.1.camel <at> port.festhaus.lan>
Content-Type: text/plain

Can I really post here? Is it really chat, so free, without dnsbl?



------------------------------

Message: 2
Date: Sun, 27 Sep 2009 06:48:00 -0400
From: Leam Hall <leam <at> reuel.net>
Subject: Re: Chat test
To: General chatter list <lfs-chat <at> linuxfromscratch.org>
Message-ID: <4ABF42E0.7030705 <at> reuel.net>
Content-Type: text/plain; charset=UTF-8; format=flowed

Not sure what dnsbl is, but I did get your e-mail.

Leam

Freddy Cruger wrote:
> Can I really post here? Is it really chat, so free, without dnsbl?
>


------------------------------

--
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

End of lfs-chat Digest, Vol 1126, Issue 1
*****************************************



--
Pankaj Sharma
Project Engineer
Mobile-09911221752

--

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Gmane