Re: glibc-2.3.2-decc-compaq.patch

Marc Giger <[email protected]>
Newsgroups gmane.linux.gentoo.alpha
Message-ID <[email protected]>
On Thu, 5 Feb 2004 22:55:36 -0500
Aron Griffis <[email protected]> wrote:

> Marc Giger wrote:	[Wed Feb 04 2004, 06:13:30PM EST]
> > Can someone of you comment why the following patch is needed?
> > 
> > diff -ruN glibc-2.3.2.orig/include/features.h
> > glibc-2.3.2/include/features.h---
> > glibc-2.3.2.orig/include/features.h 2003-06-14 00:28:23.000000000
> > +0100+++ glibc-2.3.2/include/features.h   
> >   2003-06-14 00:58:57.000000000 +0100@@ -285,7 +285,8 @@
> >  #if defined __GNUC__ \
> > || (defined __PGI && defined __i386__ ) \
> > || (defined __INTEL_COMPILER && (defined __i386__ || defined
> > __ia64__))\- || (defined __STDC_VERSION__ && __STDC_VERSION__ >=
> > 199901L)+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >=
> > 199901L)\+ &&!(defined(__DECC) || defined(__DECCXX)) 
> > # define__GLIBC_HAVE_LONG_LONG      1 
> > #endif
> > 
> > The Compaq C Compiler knows the "long long" datatype like gcc does.
> > It's also of the same size on both compilers 
> > (long == long int == long long == 8bytes). 
> 
> You're right, this looks broken to me.

Yeah, it looks like:-) but I was wrong... I removed this check and ran
into troubles. The Macro __GLIBC_HAVE_LONG_LONG must not be defined
with ccc. So this check is totally ok! It has nothing to do with
"long long". Sorry... I was searching for the reason why I couldn't
compile python with ccc.
After some time I found it! The attached patch solves the problem. Now
I'm running python 2.3 compiled with ccc:-)


> 
> > printf '%s %s %s\n' \
> >                 "-L${gcc_libs_path}" \
> >                 " -SysIncDir
> > /usr/lib/compaq/ccc-${ccc_release}/alpha-linux/include" \           
> >    
> > " -SysIncDir /usr/include/linux" \                >
> > usr/lib/compaq/ccc-${ccc_release}/alpha-linux/bin/comp.config
> 
> So do you know how this should be changed exactly?

Hehe, no! 
This seems not to be the right place neither. I think this is useless
anyway. The right place to fix it is in "create-comp-config.sh". I tried
to change it but it seems that a shell-script and regex guru is
needed;-) The same should be changed by cxx (preventing).

With these two fixes, I'm able to compile a lot more packages with the
compaq compiler.


Oh, while we are at it. What do you think if we move the libots libs to
/lib instead of /usr/lib ?

Lastly, I ran into troubles as I compiled gawk with ccc. 
Could you imagine what happens? I've made a RAID array with several
partitions on it. One partition was /usr.
gawk is needed in the init scripts, but libots.so is located in
/usr/lib, which is not mounted yet. Too bad.

greets

Marc

--
[email protected] mailing list
glibc-alpha-ccc.patch (text/x-diff, 533 B)
--- /tmp/usr/include/sys/sysmacros.h	2004-02-06 18:34:59.000000000 +0100
+++ /usr/include/sys/sysmacros.h	2004-02-06 18:36:32.000000000 +0100
@@ -25,7 +25,7 @@
 /* If the compiler does not know long long it is out of luck.  We are
    not going to hack weird hacks to support the dev_t representation
    they need.  */
-#ifdef __GLIBC_HAVE_LONG_LONG
+#if defined __GLIBC_HAVE_LONG_LONG || defined __DECC || defined __DECCXX
 __extension__
 extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
      __THROW;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.