* AXP compiling HOWTO
@ 1996-11-11 20:30 Scott Serr
0 siblings, 0 replies; 4+ messages in thread
From: Scott Serr @ 1996-11-11 20:30 UTC (permalink / raw)
It seems that the AXP flavor of Linux is plagued by difficult compiles
compared to its Intel brother. I am willing to setup a FAQ or HOWTO
on http://brinkley.isu.edu if I can pull together enough information.
And possibly an up-to-date web page on how/where the Java port is
going.
Compiling issues I would like to address:
- The basic differences between Intel and AXP Linux from a compiler
point of view.
- Differences in size of variables like "integers" in C etc.
(warnings about casting integers to pointers etc)
- Common compiler switches for quick fixes.
- Common library problems (overlaping and underlaping)
If there is something out there that already addresses this, please
tell me. If there isn't, then send me tons of email about these
subjects and links were I can collect the information.
Thanks,
Scott Serr
serrs@uffenham.isu.edu
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: AXP compiling HOWTO
[not found] <199611112030.NAA18607@uffenham.isu.edu>
@ 1996-11-11 22:17 ` Michal Jaegermann
1996-11-12 14:36 ` Jim Nance
1 sibling, 0 replies; 4+ messages in thread
From: Michal Jaegermann @ 1996-11-11 22:17 UTC (permalink / raw)
>
>
> It seems that the AXP flavor of Linux is plagued by difficult compiles
> compared to its Intel brother.
I am not so sure to what degree this is true. At least a degree of
that in reality seems to be much smaller than some postings in this
group would seem to indicate. A significat portion is likely
classifiable as an "operator error".
A good example is provided by periodical posts "I cannot compile a new
kernel"; usually without any details which would allow to give some
reasonable advice. There is one "gotcha" for novices. One has type
'make boot' instead of 'make zlilo' or 'make zImage' like README says.
I do not think that this explicitely written anywhere, although
undoubtly it should. Personally I found that the first time by
reading Makefiles - which is not an easy method with multilevel
Makefiles as employed by kernel sources. Other than that it is hard
to see what may be a problem; especially if a "victim" uses supplied
scripts for kernel patching instead of doing that "by-hand" when
not sure how.
> - The basic differences between Intel and AXP Linux from a compiler
> point of view.
This is an exciting topic for compiler hackers, but I do not think
that are ANY basic differences here from a user point of view.
> - Differences in size of variables like "integers" in C etc.
> (warnings about casting integers to pointers etc)
This is not a compiler issue per se. C standard says only that short is
no longer than int which is no longer than long. It does not say which,
if any, of these types is good enough to hold a pointer. Unfortunately
there is a log of a buggy code around which makes unwarranted assumptions
"because it happens to work on my system". Anybody who hacked Atari ST,
Amiga (or even ported Unix software to MS-DOS) and later tried Digital
Unix (a.k.a. OSF/1) is well aware about this for years. I am afraid that
if you have buggy code which you want to use, then you have to fix it.
If you are getting warnings about conversions between pointers and
integer types you should assume that without fixing these bugs be deadly.
In any case, the code was broken as given, even if it happened to work
somewhere.
> - Common compiler switches for quick fixes.
"Quick fixes" do not fix anything. The only switch in gcc which helps
is '-Wall', plus possible few others warnings not covered by "all". :-)
You just have to listen to what compiler says. Adding prototypes, if
absent, if often of a great help. Flak from a compiler is good!
A clean compile does not mean that a code is correct, but usually you
are a long way to this goal at that point.
If you are at the dead end then learing how to use -E switch, in order
to look at a code as compiler *really* sees it, can be of some help.
> - Common library problems (overlaping and underlaping)
Eh? You mean misalignment?
At last something which is really a compiler issue. There is some chance
that you may run into a bug in a compiler. Probably bigger with axp
variant of gcc than with Intel as the code is likely younger and used
by a smaller group of people. On the other hand, this compiler was used
to compile quite sizeable working systems, like Linux, so it is not all
that bad. :-) Still that chance is real, both on Intel and AXP.
Michal
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: AXP compiling HOWTO
@ 1996-11-12 1:03 Scott
0 siblings, 0 replies; 4+ messages in thread
From: Scott @ 1996-11-12 1:03 UTC (permalink / raw)
Michal Jaegermann wrote:
>
> >
> >
> > It seems that the AXP flavor of Linux is plagued by difficult compiles
> > compared to its Intel brother.
>
> I am not so sure to what degree this is true. At least a degree of
> that in reality seems to be much smaller than some postings in this
> group would seem to indicate. A significat portion is likely
> classifiable as an "operator error".
Ill say. The way the kernel headers and kernel source itself are
seperated in Redhat 4.0 threw me for a spin. The "operator" errors are
probably the most useful info to cover in such a FAQ. It would certainly
save bandwidth from newcomers like myself who will ask questions that
have been previously answered on the mailing list many times before. :)
sshinn
Team BOFH
Hit any user to continue.
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: AXP compiling HOWTO
[not found] <199611112030.NAA18607@uffenham.isu.edu>
1996-11-11 22:17 ` AXP compiling HOWTO Michal Jaegermann
@ 1996-11-12 14:36 ` Jim Nance
1 sibling, 0 replies; 4+ messages in thread
From: Jim Nance @ 1996-11-12 14:36 UTC (permalink / raw)
> Compiling issues I would like to address:
> - The basic differences between Intel and AXP Linux from a compiler
> point of view.
They are pretty simular. I guess the major difference is that RISC processors
are more sensitive to instruction ordering than CISC processors typically are.
This means that it is more work to optimize the AXP code, but that does not
really affect the way you code, only how long it takes to compile.
> - Differences in size of variables like "integers" in C etc.
> (warnings about casting integers to pointers etc)
The big difference is that pointers on the alpha are 64 bits, while
integers are 32 bits. This means that you can not store a pointer in
an integer. Now most people are smart enough not to try this anyway.
The problem occurs when you omit an include file containing a function
declaration, and you do it by accident. For example if you have a
statment like
char buff[80];
strcat(strcpy(buff, str), "new_suffix");
and you forget to include string.h, you will get a SEGV because the compiler
assumes strcpy returns in int instead of a char*, so you loose the most
significant 32 bits of the pointer.
The other terriable thing I have seen people do is try to fix a prototype
problem with a cast:
char *str = (char*) strtok(NULL, " ");
If you dont include string.h, and you leave out the cast, the compiler will
complain about the assignment of strtok(), which it assumes returns an
int, to str. Many people are tempted to try to fix this by adding the
cast. The problem is that while this shuts up the compiler, it does not
fix the problem because the compiler is still going to drop the 32 most
significant bits from the return value of strtok(). This is because it
still incorrectly assumes that strtok() returns an int, while it is
really returning a pointer. You have to have proper function declarations.
> - Common compiler switches for quick fixes.
-Wall
> - Common library problems (overlaping and underlaping)
Forgetting the include files in the source.
> If there is something out there that already addresses this, please
> tell me. If there isn't, then send me tons of email about these
> subjects and links were I can collect the information.
Take a look at:
http://www.azstarnet.com/~axplinux/FAQ-1.html#ss1.4
Jim
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1996-11-12 14:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <199611112030.NAA18607@uffenham.isu.edu>
1996-11-11 22:17 ` AXP compiling HOWTO Michal Jaegermann
1996-11-12 14:36 ` Jim Nance
1996-11-12 1:03 Scott
-- strict thread matches above, loose matches on Subject: below --
1996-11-11 20:30 Scott Serr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox