As I have writen before, I couldn't compile gdb on my home Kubuntu 6.10 machine.
It was time to try again and found it would go without problems on the
office Kubuntu 6.04.

The difference is on the libc headers, because 6.04 uses libc 2.3.x
and 6.10 uses libc 2.4.x.

It turns out that the libc 2.3.x generic errno.h and socket.h headers
default to include the i386 versions if neither __i386__ or __x86_64__
are defined, while the 2.4.x headers refuse to include the i386
version if __i386__ is not defined.

This dirty hack apeases that requirement:


Index: src/gdb/gdb/defs.h
===================================================================
--- src/gdb/gdb/defs.h  (revision 868)
+++ src/gdb/gdb/defs.h  (working copy)
@@ -26,6 +26,15 @@

 #include "config.h"            /* Generated by configure.  */

+#ifndef __i386__
+/* HACK to include errno, socket and ioctls constants in glibc 2.4 */
+#  define __i386__
+#  include <errno.h>
+#  include <sys/socket.h>
+#  include <asm/ioctls.h>
+#  undef __i386__
+#endif
+
 #include <sys/types.h>
 #include <stdio.h>
 #include <errno.h>             /* System call error return status.  */


I'm sure there is a better way to handle this, but it's just so you
can know what is wrong with the current code.


Regards,
~Nuno Lucas

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to