Gentoo Archives: gentoo-alpha

From: Marc Giger <gigerstyle@×××.ch>
To: gentoo-alpha@l.g.o
Subject: [gentoo-alpha] glibc-2.3.2-decc-compaq.patch
Date: Wed, 04 Feb 2004 23:13:33
Message-Id: 20040205001330.1f25a0d2.gigerstyle@gmx.ch
Hi devs,

I'm playing around with the ccc/cxx and found some interesting things.

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). 

This breaks the compilation (with ccc) of some packages.

Comments?


Another thing is the following...:

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

..declared in the ccc ebuild. That's a big problem. I needed a lot of
time to figure out, why ccc could not compile files which had declared
INT_MAX or something like that. (@see <limits.h>)

The standard include path and the ccc include path must be declared
BEFORE gcc's include paths in comp.config, otherwise the INT_MAX & Co
Macros expands to __INT_MAX__ because the #include_next directives.
__INT_MAX__ is a predefined gcc thing.

Thank you for the time. Please mail me to discuss these.

greets

Marc

--
gentoo-alpha@g.o mailing list

Replies

Subject Author
Re: [gentoo-alpha] glibc-2.3.2-decc-compaq.patch Aron Griffis <agriffis@g.o>