Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* follow-up on Compiling X on Alpha
@ 1999-01-23 10:08 Designer 7
  0 siblings, 0 replies; 12+ messages in thread
From: Designer 7 @ 1999-01-23 10:08 UTC (permalink / raw)
  To: axp-list

Ok... I found out where 

#define AlphaArchitecture 

is... however, it is getting defined like this:

#ifdef __alpha

#define AlphaArchitecture

#endif 

Just wondering.. is this the problem? shouldn't it be:

#ifdef __alpha__
#define AlphaArchitecture
#endif

no? yes?

D.

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: follow-up on Compiling X on Alpha
@ 1999-01-23 10:38 Designer 7
  1999-01-23 19:15 ` Michal Jaegermann
  0 siblings, 1 reply; 12+ messages in thread
From: Designer 7 @ 1999-01-23 10:38 UTC (permalink / raw)
  To: axp-list

Ok.. forget it.. It is the difference between __alpha and __alpha__ ... 
everything compiles fine now... I also had to fix patch#32... but 
anyways.. it's all good.

D.

p.s. - I wonder how the Redhat people ever got this to compile? As I 
used their src.rpm.... hmmm... interesting how they perform "magic".

>
>Ok... I found out where 
>
>#define AlphaArchitecture 
>
>is... however, it is getting defined like this:
>
>#ifdef __alpha
>
>#define AlphaArchitecture
>
>#endif 
>
>Just wondering.. is this the problem? shouldn't it be:
>
>#ifdef __alpha__
>#define AlphaArchitecture
>#endif
>
>no? yes?
>
>D.
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>
>-- 
>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
>



______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: follow-up on Compiling X on Alpha
  1999-01-23 10:38 Designer 7
@ 1999-01-23 19:15 ` Michal Jaegermann
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Jaegermann @ 1999-01-23 19:15 UTC (permalink / raw)
  To: axp-list

Designer 7 wrote:
> 
> Ok.. forget it.. It is the difference between __alpha and __alpha__ ... 

Which version of a compiler you are using?  If I type 'gcc -dumpspecs'
I see both "-D__alpha" and "-D__alpha__".  This particular compiler
is "gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)" but,
AFAIK, these defines are present in all versions of gcc used on Alpha.

Besides you can always edit your specs file to suit your taste.
It is a simple text file and any editor will do.

  Michal


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: follow-up on Compiling X on Alpha
@ 1999-01-23 20:26 Designer 7
  1999-01-25 18:42 ` Maciej W. Rozycki
  0 siblings, 1 reply; 12+ messages in thread
From: Designer 7 @ 1999-01-23 20:26 UTC (permalink / raw)
  To: axp-list

Hmm...

I am using the same egcs version.... I'm wondering if my cpp might have 
been the problem... I know I've had some problems with it before... but 
I recompiled a new one and it's worked so far.. until this __alpha 
thing.

Also, yes, gcc -dumpspecs shows __alpha AND __alpha__ .... hmmm.. don't 
know....

Well... since I did get it to compile now.... next thing is to figure 
out an easy way to link libffm into it. Any suggestions? Is there a 
simply way from the rpm spec file to link libffm to all the packages 
that use libm?

Thanks.
D.


>Designer 7 wrote:
>> 
>> Ok.. forget it.. It is the difference between __alpha and __alpha__ 
... 
>
>Which version of a compiler you are using?  If I type 'gcc -dumpspecs'
>I see both "-D__alpha" and "-D__alpha__".  This particular compiler
>is "gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)" but,
>AFAIK, these defines are present in all versions of gcc used on Alpha.
>
>Besides you can always edit your specs file to suit your taste.
>It is a simple text file and any editor will do.
>
>  Michal


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: follow-up on Compiling X on Alpha
  1999-01-23 20:26 Designer 7
@ 1999-01-25 18:42 ` Maciej W. Rozycki
  0 siblings, 0 replies; 12+ messages in thread
From: Maciej W. Rozycki @ 1999-01-25 18:42 UTC (permalink / raw)
  To: axp-list

On Sat, 23 Jan 1999, Designer 7 wrote:

> I am using the same egcs version.... I'm wondering if my cpp might have 
> been the problem... I know I've had some problems with it before... but 
> I recompiled a new one and it's worked so far.. until this __alpha 
> thing.
> 
> Also, yes, gcc -dumpspecs shows __alpha AND __alpha__ .... hmmm.. don't 
> know....

 See what definitions `/lib/cpp -dM /dev/null' dumps.  X uses /lib/cpp as
a C preprocessor.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: follow-up on Compiling X on Alpha
@ 1999-01-25 20:42 Designer 7
  1999-01-25 22:06 ` Maciej W. Rozycki
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Designer 7 @ 1999-01-25 20:42 UTC (permalink / raw)
  To: axp-list


>
>> I am using the same egcs version.... I'm wondering if my cpp might 
have 
>> been the problem... I know I've had some problems with it before... 
but 
>> I recompiled a new one and it's worked so far.. until this __alpha 
>> thing.
>> 
>> Also, yes, gcc -dumpspecs shows __alpha AND __alpha__ .... hmmm.. 
don't 
>> know....
>
> See what definitions `/lib/cpp -dM /dev/null' dumps.  X uses /lib/cpp 
as
>a C preprocessor.

ok.. so this is what I got:
#define linux 1
#define _LONGLONG 1
#define __alpha__ 1
#define __ELF__ 1
#define unix 1

is this it? or am I missing anything? is __alpha suppose to show up here 
too?

D.

 

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: follow-up on Compiling X on Alpha
  1999-01-25 20:42 Designer 7
@ 1999-01-25 22:06 ` Maciej W. Rozycki
  1999-01-26  0:57 ` Michal Jaegermann
  1999-01-26 13:41 ` Christopher C Chimelis
  2 siblings, 0 replies; 12+ messages in thread
From: Maciej W. Rozycki @ 1999-01-25 22:06 UTC (permalink / raw)
  To: axp-list

On Mon, 25 Jan 1999, Designer 7 wrote:

> > See what definitions `/lib/cpp -dM /dev/null' dumps.  X uses /lib/cpp 
> as
> >a C preprocessor.
> 
> ok.. so this is what I got:
> #define linux 1
> #define _LONGLONG 1
> #define __alpha__ 1
> #define __ELF__ 1
> #define unix 1
> 
> is this it? or am I missing anything? is __alpha suppose to show up here 
> too?

 The C preprocessor program has an internal list of predefines.  You
probably has your `lib/cpp' set up as a symlink to the real program
located under '/usr/lib/gcc-lib' directory tree.  This is not the best
available solution as the internal list of `cpp' is fixed -- it cannot be
changed without recompilation.  A much better solution is to use `gcc -E'
which also invokes the C preprocessor but as this one uses the `gcc'
driver, the 'specs' file is being taken into account where additional
predefines as well as other parameters may be set (the file is plain
text). 

 Unfortunately, one may not just replace the `/lib/cpp' symlink with a
shell script which execs `gcc -E' as the command line syntax of these two
is slightly different.  There was an example `/lib/cpp' replacemet script
posted on one of egcs-related mailing lists some time ago which solved
some of these compatibility issues.  You may check that one -- I use it
for a few months now and I see no troubles.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: follow-up on Compiling X on Alpha
  1999-01-25 20:42 Designer 7
  1999-01-25 22:06 ` Maciej W. Rozycki
@ 1999-01-26  0:57 ` Michal Jaegermann
  1999-01-26 13:41 ` Christopher C Chimelis
  2 siblings, 0 replies; 12+ messages in thread
From: Michal Jaegermann @ 1999-01-26  0:57 UTC (permalink / raw)
  To: axp-list

Designer 7 wrote:
> 
> >
> > See what definitions `/lib/cpp -dM /dev/null' dumps.  X uses /lib/cpp 
> as
> >a C preprocessor.
> 
> ok.. so this is what I got:
> #define linux 1
> #define _LONGLONG 1
> #define __alpha__ 1
> #define __ELF__ 1
> #define unix 1
> 
> is this it? or am I missing anything?

Apparently so.  Mine prints this:

/lib/cpp -dM /dev/null
#define __linux__ 1 
#define linux 1 
#define _LONGLONG 1 
#define __alpha__ 1 
#define __linux 1 
#define __ELF__ 1 
#define __alpha 1 
#define unix 1

What is really your '/lib/cpp'?  gcc may use its own version
while Imake will indeed rely on /lib/cpp.

  Michal


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: follow-up on Compiling X on Alpha
@ 1999-01-26  1:12 Designer 7
  0 siblings, 0 replies; 12+ messages in thread
From: Designer 7 @ 1999-01-26  1:12 UTC (permalink / raw)
  To: axp-list


>Apparently so.  Mine prints this:
>
>/lib/cpp -dM /dev/null
>#define __linux__ 1 
>#define linux 1 
>#define _LONGLONG 1 
>#define __alpha__ 1 
>#define __linux 1 
>#define __ELF__ 1 
>#define __alpha 1 
>#define unix 1
>
>What is really your '/lib/cpp'?  gcc may use its own version
>while Imake will indeed rely on /lib/cpp.

/lib/cpp is linked to 

/usr/lib/gcc-lib/alpha-redhat-linux/egcs-2.91.60/cpp

which was installed when I built egcs-1.1.1-release.
Perhaps I will look into recompiling cpp to include those other 
defines...

but anyways... for now, X is compiled as I changed the __alpha to 
__alpha__ .... I just still trying to figure out what's with the SVGA 
server and Matrox cards.

D.


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: follow-up on Compiling X on Alpha
  1999-01-25 20:42 Designer 7
  1999-01-25 22:06 ` Maciej W. Rozycki
  1999-01-26  0:57 ` Michal Jaegermann
@ 1999-01-26 13:41 ` Christopher C Chimelis
  1999-01-26 16:56   ` Michal Jaegermann
  2 siblings, 1 reply; 12+ messages in thread
From: Christopher C Chimelis @ 1999-01-26 13:41 UTC (permalink / raw)
  To: axp-list


On Mon, 25 Jan 1999, Designer 7 wrote:

> ok.. so this is what I got:
> #define linux 1
> #define _LONGLONG 1
> #define __alpha__ 1
> #define __ELF__ 1
> #define unix 1
> 
> is this it? or am I missing anything? is __alpha suppose to show up here 
> too?

It can be (and should be really...at least for now until everyone catches
up and changes to __alpha__).  For Debian, I added __alpha to the list
after we had found that it was necessary somehow when compiling X, so you
may want to try that.  I don't know the exact interaction there (just
adding it because I was told to), but X definitely uses __alpha.

C


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: follow-up on Compiling X on Alpha
  1999-01-26 13:41 ` Christopher C Chimelis
@ 1999-01-26 16:56   ` Michal Jaegermann
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Jaegermann @ 1999-01-26 16:56 UTC (permalink / raw)
  To: axp-list

Christopher C Chimelis wrote:
> 
> On Mon, 25 Jan 1999, Designer 7 wrote:
> 
> > ok.. so this is what I got:
> > #define linux 1
> > #define _LONGLONG 1
> > #define __alpha__ 1
> > #define __ELF__ 1
> > #define unix 1
> > 
> > is this it? or am I missing anything? is __alpha suppose to show up here 
> > too?
> 
> It can be (and should be really...at least for now until everyone catches
> up and changes to __alpha__).

I looked around and older versions of egcs, and gcc, have more predefines.
For example, for egcs-2.90.29 there is something like that in specs
file (a long line folded for mail):

*predefines:
-D__alpha -D__alpha__ -D__linux__ -D__linux -D_LONGLONG -Dlinux -Dunix
-Asystem(linux) -Acpu(alpha) -Amachine(alpha) -D__ELF__

For egcs-2.91.60 (a.k.a. "1.1.1 release") it is only

*predefines:
-Dlinux -Dunix -Asystem(linux) -D_LONGLONG -D__alpha__ -D__ELF__

I have no idea why this change as there are various sources around which
rely on a presence of defines from a longer list.  X is only one example,
although pretty big one. :-)  You can, obviously, hack your specs file
and Red Hat apparently did in what you can find in rpm format.

Anybody wants to file a bug report to egcs-bugs@cygnus.com?

  Michal


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: follow-up on Compiling X on Alpha
@ 1999-01-27  7:55 Designer 7
  0 siblings, 0 replies; 12+ messages in thread
From: Designer 7 @ 1999-01-27  7:55 UTC (permalink / raw)
  To: axp-list


>> > See what definitions `/lib/cpp -dM /dev/null' dumps.  X uses 
/lib/cpp 
>> as
>> >a C preprocessor.
>> 
>> ok.. so this is what I got:
>> #define linux 1
>> #define _LONGLONG 1
>> #define __alpha__ 1
>> #define __ELF__ 1
>> #define unix 1
>> 
>> is this it? or am I missing anything?
>
>Apparently so.  Mine prints this:
>
>/lib/cpp -dM /dev/null
>#define __linux__ 1 
>#define linux 1 
>#define _LONGLONG 1 
>#define __alpha__ 1 
>#define __linux 1 
>#define __ELF__ 1 
>#define __alpha 1 
>#define unix 1
>
>What is really your '/lib/cpp'?  gcc may use its own version
>while Imake will indeed rely on /lib/cpp.
>
>  Michal

A question for you: which compiler and version is the above from?

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~1999-01-27  7:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-01-23 10:08 follow-up on Compiling X on Alpha Designer 7
  -- strict thread matches above, loose matches on Subject: below --
1999-01-23 10:38 Designer 7
1999-01-23 19:15 ` Michal Jaegermann
1999-01-23 20:26 Designer 7
1999-01-25 18:42 ` Maciej W. Rozycki
1999-01-25 20:42 Designer 7
1999-01-25 22:06 ` Maciej W. Rozycki
1999-01-26  0:57 ` Michal Jaegermann
1999-01-26 13:41 ` Christopher C Chimelis
1999-01-26 16:56   ` Michal Jaegermann
1999-01-26  1:12 Designer 7
1999-01-27  7:55 Designer 7

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox