* Stupid question
@ 2004-11-22 1:45 Gene Heskett
2004-11-22 8:33 ` Jan Engelhardt
2004-11-22 14:32 ` P
0 siblings, 2 replies; 21+ messages in thread
From: Gene Heskett @ 2004-11-22 1:45 UTC (permalink / raw)
To: linux-kernel
Greetings;
Silly Q of the day probably, but what do I set in a Makefile for the
-march=option for building on a 233 mhz Pentium 2?
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.29% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Stupid question
2004-11-22 1:45 Stupid question Gene Heskett
@ 2004-11-22 8:33 ` Jan Engelhardt
2004-11-22 12:21 ` Gene Heskett
2004-11-22 14:32 ` P
1 sibling, 1 reply; 21+ messages in thread
From: Jan Engelhardt @ 2004-11-22 8:33 UTC (permalink / raw)
To: Gene Heskett; +Cc: linux-kernel
>Greetings;
>
>Silly Q of the day probably, but what do I set in a Makefile for the
>-march=option for building on a 233 mhz Pentium 2?
Now that's really stupid, but here's the answer:
You run `make menuconfig` (or whichever you like) and choose Processor Type
"Pentium II".
Jan Engelhardt
--
Gesellschaft für Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 Göttingen, www.gwdg.de
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Stupid question
2004-11-22 8:33 ` Jan Engelhardt
@ 2004-11-22 12:21 ` Gene Heskett
2004-11-22 19:02 ` Jan Engelhardt
0 siblings, 1 reply; 21+ messages in thread
From: Gene Heskett @ 2004-11-22 12:21 UTC (permalink / raw)
To: linux-kernel
On Monday 22 November 2004 03:33, Jan Engelhardt wrote:
>>Greetings;
>>
>>Silly Q of the day probably, but what do I set in a Makefile for
>> the -march=option for building on a 233 mhz Pentium 2?
>
>Now that's really stupid, but here's the answer:
>
>You run `make menuconfig` (or whichever you like) and choose
> Processor Type "Pentium II".
>
>
>Jan Engelhardt
If I was building a kernel, then yes my question was stupid.
Except I'm not building a kernel, I'm tryng to compile a module to
drive some truely dumb hardware, reusing code that was last touched
in 1999 when the Makefile could use the -mi486 syntax with gcc-2.95.
Now we have gcc 3.3.3, even on a Brain Dead Install of emc
(LinuxCNC), which has a 2.4 kernel with the rtai patch kit for real
time. I need to put this directly into the Makefile using the
currently valid -march= & -mcpu= syntax's.
So far, the closest I've come to getting it right on that box bails
out because its being mis-interpreted as -march=mips on that box.
Those includes aren't part of an x86 install. Hence the
question. :-)
It appears I've got more problems that this one though, lots of "hey
you can't do that anymore" warnings when I try to build it on this
box (bleeding edge kernel 2.6.10-rc2-bk4-kjt1 etc) and it eventually
bails out or course. It apparently plays mix-n-match with kernel vs
glibc headers too. As a loadable module, I'd assume it should be
using kernel headers only?
Yeah, I'm stupid. Virtually all of my original C coding has been done
on much smaller architectures, and 15 to 20 years ago. Terminal rust
has set in on those skills I once had well honed when I was only 55.
Now I'm 70, semi-retired, and I'd like to drive some stepper motors
on a micromill.
While composing this, I also read the man page for gcc and while it
has a bunch of options, it doesn't always list/define the valid ones,
particularly for x86 stuffs. Lots of other architectures are covered
in much better detail. I guess they figure everyone knows x86 stuff.
Sadly, for those of us who came up thru the motorola ranks, such is
not the case. Heck, I'd do this in assembly IF I knew intel asm as
well as I know 6x09 asm.
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.29% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Stupid question
2004-11-22 12:21 ` Gene Heskett
@ 2004-11-22 19:02 ` Jan Engelhardt
2004-11-22 19:21 ` Gene Heskett
0 siblings, 1 reply; 21+ messages in thread
From: Jan Engelhardt @ 2004-11-22 19:02 UTC (permalink / raw)
To: Gene Heskett; +Cc: linux-kernel
>>>Silly Q of the day probably, but what do I set in a Makefile for
>>> the -march=option for building on a 233 mhz Pentium 2?
>>
>>Now that's really stupid, but here's the answer:
>>
>>You run `make menuconfig` (or whichever you like) and choose
>> Processor Type "Pentium II".
>
>If I was building a kernel, then yes my question was stupid.
>
>Except I'm not building a kernel, I'm tryng to compile a module to
>drive some truely dumb hardware, reusing code that was last touched
>[...]
Well, take a fresh kernel tree, set the desired CPU type, and then look at the
.config which is generated. Voilà -- in theory ;-)
>Yeah, I'm stupid. Virtually all of my original C coding has been done
>on much smaller architectures, and 15 to 20 years ago. Terminal rust
Never hurts trying to compile a 2.6 for 386SX if the will is strong. :-)
Jan Engelhardt
--
Gesellschaft für Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 Göttingen, www.gwdg.de
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Stupid question
2004-11-22 19:02 ` Jan Engelhardt
@ 2004-11-22 19:21 ` Gene Heskett
2004-11-22 19:32 ` Jan Engelhardt
0 siblings, 1 reply; 21+ messages in thread
From: Gene Heskett @ 2004-11-22 19:21 UTC (permalink / raw)
To: linux-kernel
On Monday 22 November 2004 14:02, Jan Engelhardt wrote:
>>>>Silly Q of the day probably, but what do I set in a Makefile for
>>>> the -march=option for building on a 233 mhz Pentium 2?
>>>
>>>Now that's really stupid, but here's the answer:
>>>
>>>You run `make menuconfig` (or whichever you like) and choose
>>> Processor Type "Pentium II".
>>
>>If I was building a kernel, then yes my question was stupid.
>>
>>Except I'm not building a kernel, I'm tryng to compile a module to
>>drive some truely dumb hardware, reusing code that was last touched
>>[...]
>
>Well, take a fresh kernel tree, set the desired CPU type, and then
> look at the .config which is generated. Voilà -- in theory ;-)
>
I'm glad you put that caveat in there, Jan. :)
>>Yeah, I'm stupid. Virtually all of my original C coding has been
>> done on much smaller architectures, and 15 to 20 years ago.
>> Terminal rust
>
>Never hurts trying to compile a 2.6 for 386SX if the will is strong.
> :-)
On an SX? No way Jose. That would take more will power than I have &
I quit a 2 pack a day habit cold turkey 15+ years ago. Theres one of
those things out in a storage shed, won't even run winderz > 95SR1,
its been tried a couple of times.
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.29% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Stupid question
2004-11-22 19:21 ` Gene Heskett
@ 2004-11-22 19:32 ` Jan Engelhardt
2004-11-23 2:11 ` Gene Heskett
0 siblings, 1 reply; 21+ messages in thread
From: Jan Engelhardt @ 2004-11-22 19:32 UTC (permalink / raw)
To: Gene Heskett; +Cc: linux-kernel
>>Well, take a fresh kernel tree, set the desired CPU type, and then
>> look at the .config which is generated. Voilà -- in theory ;-)
>I'm glad you put that caveat in there, Jan. :)
What? There are no bugs! They're features.
>>Never hurts trying to compile a 2.6 for 386SX if the will is strong.
>> :-)
>
>On an SX? No way Jose. That would take more will power than I have &
Read more closely. I said "compile for" not "compile on".
Jan Engelhardt
--
Gesellschaft für Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 Göttingen, www.gwdg.de
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Stupid question
2004-11-22 19:32 ` Jan Engelhardt
@ 2004-11-23 2:11 ` Gene Heskett
0 siblings, 0 replies; 21+ messages in thread
From: Gene Heskett @ 2004-11-23 2:11 UTC (permalink / raw)
To: linux-kernel
On Monday 22 November 2004 14:32, Jan Engelhardt wrote:
[...]
>>
>>On an SX? No way Jose. That would take more will power than I
>> have &
>
>Read more closely. I said "compile for" not "compile on".
>
Touche'
>
>Jan Engelhardt
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.29% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Stupid question
2004-11-22 1:45 Stupid question Gene Heskett
2004-11-22 8:33 ` Jan Engelhardt
@ 2004-11-22 14:32 ` P
2004-11-22 15:58 ` Gene Heskett
1 sibling, 1 reply; 21+ messages in thread
From: P @ 2004-11-22 14:32 UTC (permalink / raw)
To: gene.heskett; +Cc: linux-kernel
Gene Heskett wrote:
> Greetings;
>
> Silly Q of the day probably, but what do I set in a Makefile for the
> -march=option for building on a 233 mhz Pentium 2?
http://www.pixelbeat.org/scripts/gcccpuopt
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Stupid question
2004-11-22 14:32 ` P
@ 2004-11-22 15:58 ` Gene Heskett
2004-11-23 12:08 ` Nix
0 siblings, 1 reply; 21+ messages in thread
From: Gene Heskett @ 2004-11-22 15:58 UTC (permalink / raw)
To: linux-kernel
On Monday 22 November 2004 09:32, P@draigBrady.com wrote:
>Gene Heskett wrote:
>> Greetings;
>>
>> Silly Q of the day probably, but what do I set in a Makefile for
>> the -march=option for building on a 233 mhz Pentium 2?
>
>http://www.pixelbeat.org/scripts/gcccpuopt
Thanks very much. Obviously someone else needed to scratch this itch
too. This should produce the correct results when running on the
target machine. Here, it produces this:
[root@coyote CIO-DIO96]# sh ../gcccpuopt
-march=athlon-xp -mfpmath=sse -msse -mmmx -m3dnow
--
Cheers & thanks again, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.29% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Stupid question
2004-11-22 15:58 ` Gene Heskett
@ 2004-11-23 12:08 ` Nix
2004-11-23 12:19 ` P
2004-11-23 12:46 ` Gene Heskett
0 siblings, 2 replies; 21+ messages in thread
From: Nix @ 2004-11-23 12:08 UTC (permalink / raw)
To: gene.heskett; +Cc: linux-kernel
On 23 Nov 2004, Gene Heskett yowled:
> On Monday 22 November 2004 09:32, P@draigBrady.com wrote:
>>Gene Heskett wrote:
>>> Greetings;
>>>
>>> Silly Q of the day probably, but what do I set in a Makefile for
>>> the -march=option for building on a 233 mhz Pentium 2?
>>
>>http://www.pixelbeat.org/scripts/gcccpuopt
>
> Thanks very much. Obviously someone else needed to scratch this itch
> too. This should produce the correct results when running on the
> target machine. Here, it produces this:
> [root@coyote CIO-DIO96]# sh ../gcccpuopt
> -march=athlon-xp -mfpmath=sse -msse -mmmx -m3dnow
... which is peculiar, as -mmmx -msse is redundant, as is -mmmx -m3dnow,
and all three of those flags are the end are implied by -march=athlon-xp
anyway.
(-mfpmath=sse *is* useful on non-64-bit platforms, though.)
--
`The sword we forged has turned upon us
Only now, at the end of all things do we see
The lamp-bearer dies; only the lamp burns on.'
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Stupid question
2004-11-23 12:08 ` Nix
@ 2004-11-23 12:19 ` P
2004-11-23 12:48 ` Gene Heskett
2004-11-23 12:46 ` Gene Heskett
1 sibling, 1 reply; 21+ messages in thread
From: P @ 2004-11-23 12:19 UTC (permalink / raw)
To: Nix; +Cc: gene.heskett, linux-kernel
Nix wrote:
> On 23 Nov 2004, Gene Heskett yowled:
>
>>On Monday 22 November 2004 09:32, P@draigBrady.com wrote:
>>
>>>Gene Heskett wrote:
>>>
>>>>Greetings;
>>>>
>>>>Silly Q of the day probably, but what do I set in a Makefile for
>>>>the -march=option for building on a 233 mhz Pentium 2?
>>>
>>>http://www.pixelbeat.org/scripts/gcccpuopt
>>
>>Thanks very much. Obviously someone else needed to scratch this itch
>>too. This should produce the correct results when running on the
>>target machine. Here, it produces this:
>>[root@coyote CIO-DIO96]# sh ../gcccpuopt
>> -march=athlon-xp -mfpmath=sse -msse -mmmx -m3dnow
>
>
> ... which is peculiar, as -mmmx -msse is redundant, as is -mmmx -m3dnow,
> and all three of those flags are the end are implied by -march=athlon-xp
> anyway.
>
> (-mfpmath=sse *is* useful on non-64-bit platforms, though.)
I added those in so that they were explicit.
They do no harm. I had a version that didn't print
these redundant options but got many requests
about whether they were needed. You can't win.
Pádraig.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Stupid question
2004-11-23 12:19 ` P
@ 2004-11-23 12:48 ` Gene Heskett
0 siblings, 0 replies; 21+ messages in thread
From: Gene Heskett @ 2004-11-23 12:48 UTC (permalink / raw)
To: linux-kernel
On Tuesday 23 November 2004 07:19, P@draigBrady.com wrote:
>Nix wrote:
>> On 23 Nov 2004, Gene Heskett yowled:
>>>On Monday 22 November 2004 09:32, P@draigBrady.com wrote:
>>>>Gene Heskett wrote:
>>>>>Greetings;
>>>>>
>>>>>Silly Q of the day probably, but what do I set in a Makefile for
>>>>>the -march=option for building on a 233 mhz Pentium 2?
>>>>
>>>>http://www.pixelbeat.org/scripts/gcccpuopt
>>>
>>>Thanks very much. Obviously someone else needed to scratch this
>>> itch too. This should produce the correct results when running
>>> on the target machine. Here, it produces this:
>>>[root@coyote CIO-DIO96]# sh ../gcccpuopt
>>> -march=athlon-xp -mfpmath=sse -msse -mmmx -m3dnow
>>
>> ... which is peculiar, as -mmmx -msse is redundant, as is -mmmx
>> -m3dnow, and all three of those flags are the end are implied by
>> -march=athlon-xp anyway.
>>
>> (-mfpmath=sse *is* useful on non-64-bit platforms, though.)
>
>I added those in so that they were explicit.
>They do no harm. I had a version that didn't print
>these redundant options but got many requests
>about whether they were needed. You can't win.
>
>Pádraig.
I've heard that expression before :-)
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.29% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Stupid question
2004-11-23 12:08 ` Nix
2004-11-23 12:19 ` P
@ 2004-11-23 12:46 ` Gene Heskett
1 sibling, 0 replies; 21+ messages in thread
From: Gene Heskett @ 2004-11-23 12:46 UTC (permalink / raw)
To: linux-kernel
On Tuesday 23 November 2004 07:08, Nix wrote:
>On 23 Nov 2004, Gene Heskett yowled:
>> On Monday 22 November 2004 09:32, P@draigBrady.com wrote:
>>>Gene Heskett wrote:
>>>> Greetings;
>>>>
>>>> Silly Q of the day probably, but what do I set in a Makefile for
>>>> the -march=option for building on a 233 mhz Pentium 2?
>>>
>>>http://www.pixelbeat.org/scripts/gcccpuopt
>>
>> Thanks very much. Obviously someone else needed to scratch this
>> itch too. This should produce the correct results when running on
>> the target machine. Here, it produces this:
>> [root@coyote CIO-DIO96]# sh ../gcccpuopt
>> -march=athlon-xp -mfpmath=sse -msse -mmmx -m3dnow
>
>... which is peculiar, as -mmmx -msse is redundant, as is -mmmx
> -m3dnow, and all three of those flags are the end are implied by
> -march=athlon-xp anyway.
>
Humm, as I see it, the choices presented in a make xconfig do not
allow the choice of the athlon-xp, just the athlon. Are there any
worthwhile optimizations the added '-xp' would bring into play?
Making it enough faster to make that choice a worthwhile choice?
Said another way, what file would I edit after the .config has been
saved in order to put that into effect for the subsequent build?
>(-mfpmath=sse *is* useful on non-64-bit platforms, though.)
Oh? As that stuff is pretty invisible during a make today, how would
one go about determining if thats in effect on this machine?
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.29% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Stupid question
@ 2004-05-27 9:38 Marcel Hilzinger
2004-05-27 9:51 ` mjt
0 siblings, 1 reply; 21+ messages in thread
From: Marcel Hilzinger @ 2004-05-27 9:38 UTC (permalink / raw)
To: reiserfs-list
What, if someone likes to create a directory called "metas" under reiser4?
Actually this is not possible, as the system will complain about: "there is
already a directory metas".
Marcel
--
Üdvözlettel -- Mit freundlichen Grüssen,
Marcel Hilzinger
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Stupid question
2004-05-27 9:38 Marcel Hilzinger
@ 2004-05-27 9:51 ` mjt
0 siblings, 0 replies; 21+ messages in thread
From: mjt @ 2004-05-27 9:51 UTC (permalink / raw)
To: Marcel Hilzinger; +Cc: reiserfs-list
On Thu, May 27, 2004 at 11:38:20AM +0200, Marcel Hilzinger wrote:
>What, if someone likes to create a directory called "metas" under reiser4?
That's a can of worms opened many times too often.
>Actually this is not possible, as the system will complain about: "there is
>already a directory metas".
Yes.
I recommend patching it to ..metas/
NEEXT!
--
mjt
^ permalink raw reply [flat|nested] 21+ messages in thread
* Stupid Question.
@ 2004-05-12 18:53 John T. Williams
2004-05-12 19:02 ` Jeff Woods
0 siblings, 1 reply; 21+ messages in thread
From: John T. Williams @ 2004-05-12 18:53 UTC (permalink / raw)
To: Linux-C-Programming (E-mail)
I know I should know this, but I don't, and haven't been able to find a
good answer.
What does declaring a function static do? ie
What is the difference between
static int blue() {
return 0;
}
and
int blue() {
return 0;
}
^ permalink raw reply [flat|nested] 21+ messages in thread* Re: Stupid Question.
2004-05-12 18:53 Stupid Question John T. Williams
@ 2004-05-12 19:02 ` Jeff Woods
2004-05-13 14:38 ` Jan-Benedict Glaw
0 siblings, 1 reply; 21+ messages in thread
From: Jeff Woods @ 2004-05-12 19:02 UTC (permalink / raw)
To: John T. Williams; +Cc: Linux-C-Programming (E-mail)
At 5/12/2004 02:53 PM -0400, John T. Williams wrote:
>What does declaring a function static do? ie
>What is the difference between
>
>static int blue() {
> return 0;
>}
>
>and
>
>int blue() {
> return 0;
>}
It makes the function visible only within the comilation unit it's in. See
also:
http://www.phim.unibe.ch/comp_doc/c_manual/C/SYNTAX/static.htm
As the website points out static functions and static variables seem like
very different meanings of the word "static". In both cases I think of it
as "global but private/hidden".
--
Jeff Woods <kazrak+kernel@cesmail.net>
^ permalink raw reply [flat|nested] 21+ messages in thread* Re: Stupid Question.
2004-05-12 19:02 ` Jeff Woods
@ 2004-05-13 14:38 ` Jan-Benedict Glaw
2004-05-13 18:27 ` Glynn Clements
0 siblings, 1 reply; 21+ messages in thread
From: Jan-Benedict Glaw @ 2004-05-13 14:38 UTC (permalink / raw)
To: Linux-C-Programming (E-mail)
[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]
On Wed, 2004-05-12 13:02:25 -0600, Jeff Woods <Kazrak+kernel@cesmail.net>
wrote in message <6.0.1.1.0.20040512125919.02e8cec0@no.incoming.mail>:
> At 5/12/2004 02:53 PM -0400, John T. Williams wrote:
> >What does declaring a function static do? ie
> >What is the difference between
> >static int blue() {
> > return 0;
> >}
> >and
> >int blue() {
> > return 0;
> >}
>
> It makes the function visible only within the comilation unit it's in. See
> also:
A static function (or variable) will only be "visible" within exactly
that .c file which it is defined in.
Static automatic variables (those that are within functions) do have a
different semantic: their contents is preserved during multiple function
calls.
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak!
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread* Re: Stupid Question.
2004-05-13 14:38 ` Jan-Benedict Glaw
@ 2004-05-13 18:27 ` Glynn Clements
0 siblings, 0 replies; 21+ messages in thread
From: Glynn Clements @ 2004-05-13 18:27 UTC (permalink / raw)
To: Linux-C-Programming (E-mail)
Jan-Benedict Glaw wrote:
> Static automatic variables (those that are within functions) do have a
> different semantic: their contents is preserved during multiple function
> calls.
"Static automatic variables" is a self-contradiction. "Static local
variables" (as opposed to "automatic local variables") would be more
accurate.
Local variables (those whose scope is limited to the block in which
they are declared) are automatic (stored on the stack) by default. The
"static" keyword makes them static (stored in the data segment).
This overloading of the "static" keyword is a common source of
confusion. They really should have added another keyword, IMHO. [And
dispensed with the (entirely redundant) "automatic" keyword, which
I've never actually seen used in nearly 20 years of C programming.]
And the distinction between automatic and static local variables is
somewhat deeper than the fact that the value is preserved across
calls. It's highly significant when dealing with reentrancy (e.g.
recursive functions, multi-threaded code).
For instance, an automatic variable has a separate instance for each
call, while a static variable only has a single instance. OTOH, you
can legitimately return or store a pointer to a static variable and
reference it from outside of the function, whereas an automatic
variable ceases to exist once the function returns.
--
Glynn Clements <glynn.clements@virgin.net>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Stupid Question
@ 1999-08-18 6:39 Michael A. Thompson
1999-08-18 9:53 ` Martin Costabel
0 siblings, 1 reply; 21+ messages in thread
From: Michael A. Thompson @ 1999-08-18 6:39 UTC (permalink / raw)
To: linuxppc-dev
1. Which rpm contains the standard include headers?
I come from mklinux and IRIX... I cant seem to find stdio.h stdlib.h
etc... or sys/*.h directory. I installed the egcs c/c++ rpms,
kernal-devel rpms and other gnu develope apps libs utils and headers but
can find the standard stuff....
2. is it normal for c++ includes to be here: /usr/include/g++-2?
3. What is the normal file structure for linuxppc 5 include directory?
is it like x86 linux, BSD, etc....
Thanks for any help on this. I have a very limited ppc linux system and
only want a working devel system without the other stuff....
Michael
--
----------------------------------
Michael A. Thompson
[IRIX - NeXTStep - Linux - MacOS - Windows]
Home: (940)382-2086
E-Mail: mat0001@jove.acs.unt.edu
----------------------------------
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Stupid Question
1999-08-18 6:39 Michael A. Thompson
@ 1999-08-18 9:53 ` Martin Costabel
0 siblings, 0 replies; 21+ messages in thread
From: Martin Costabel @ 1999-08-18 9:53 UTC (permalink / raw)
To: Michael A. Thompson; +Cc: linuxppc-dev
"Michael A. Thompson" wrote:
>
> 1. Which rpm contains the standard include headers?
> I come from mklinux and IRIX... I cant seem to find stdio.h stdlib.h
> etc... or sys/*.h directory. I installed the egcs c/c++ rpms,
> kernal-devel rpms and other gnu develope apps libs utils and headers but
> can find the standard stuff....
They are in the glibc-devel package.
> 2. is it normal for c++ includes to be here: /usr/include/g++-2?
Yes. Depends on your compiler.
> 3. What is the normal file structure for linuxppc 5 include directory?
> is it like x86 linux, BSD, etc....
I don't know the others. One thing: Make sure that /usr/include/asm is a
link to /usr/src/linux/include/asm which in turn points to
/usr/src/linux/include/asm-ppc and /usr/include/linux points to
/usr/src/linux/include/linux (you do have the kernel headers installed,
don't you?)
--
Martin
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2004-11-23 12:49 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-22 1:45 Stupid question Gene Heskett
2004-11-22 8:33 ` Jan Engelhardt
2004-11-22 12:21 ` Gene Heskett
2004-11-22 19:02 ` Jan Engelhardt
2004-11-22 19:21 ` Gene Heskett
2004-11-22 19:32 ` Jan Engelhardt
2004-11-23 2:11 ` Gene Heskett
2004-11-22 14:32 ` P
2004-11-22 15:58 ` Gene Heskett
2004-11-23 12:08 ` Nix
2004-11-23 12:19 ` P
2004-11-23 12:48 ` Gene Heskett
2004-11-23 12:46 ` Gene Heskett
-- strict thread matches above, loose matches on Subject: below --
2004-05-27 9:38 Marcel Hilzinger
2004-05-27 9:51 ` mjt
2004-05-12 18:53 Stupid Question John T. Williams
2004-05-12 19:02 ` Jeff Woods
2004-05-13 14:38 ` Jan-Benedict Glaw
2004-05-13 18:27 ` Glynn Clements
1999-08-18 6:39 Michael A. Thompson
1999-08-18 9:53 ` Martin Costabel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.