tags 318443 +patch thanks Hi,
attached is a patch fixing the oustanding issues preventing gcc-4.0 to build properly on hurd-i386. The changes are: * Fix debian/rules.patch to actually apply hurd-changes.dpatch on hurd-i386. * Add hurd-any and hurd-i386 to ada_no_archs, as ada is still not bootstrapped. * Also patch gcc/config/t-gnu to use /usr/include instead of /include. * Fix another PATH_MAX issue in gcc/fortran/gfortran.h (hacky patch, bug filed upstream as #23065 for proper fixing) * Fix serious issues with libpthread in libgcc and libstdc++ by adding #pragma weak statements to gcc/gthr-posix.h. Thanks to Neal Walfield and Jeroen Dekkers for analyzing this. With those changes applied, gcc-4.0 builds fine. cheers, Michael -- Michael Banck Debian Developer [EMAIL PROTECTED] http://www.advogato.org/person/mbanck/diary.html
--- debian/rules.patch.orig 2005-07-25 17:58:18.000000000 +0200 +++ debian/rules.patch 2005-07-25 17:58:27.000000000 +0200 @@ -79,7 +79,7 @@ endif endif -ifeq ($(DEB_TARGET_ARCH_OS),gnu) +ifeq ($(DEB_TARGET_ARCH_OS),hurd) debian_patches += hurd-changes endif --- debian/rules.conf.orig 2005-07-25 18:05:10.000000000 +0200 +++ debian/rules.conf 2005-07-25 18:04:08.000000000 +0200 @@ -245,7 +245,8 @@ # avoid it ... ada_no_archs := $(strip $(foreach cpu,$(ada_no_cpus),!$(cpu)) \ !kfreebsd-any !knetbsd-any !netbsd-any \ - !kfreebsd-i386 !knetbsd-i386 !netbsd-i386) + !kfreebsd-i386 !knetbsd-i386 !netbsd-i386 \ + !hurd-any !hurd-i386) java_no_archs := $(strip $(foreach cpu,$(java_no_cpus),!$(cpu)) \ !knetbsd-any !netbsd-any !knetbsd-i386 !netbsd-i386) pascal_no_archs := $(strip $(foreach cpu,$(pascal_no_cpus),!$(cpu)) \ --- debian/patches/hurd-changes.dpatch.orig 2005-07-25 23:04:11.328516064 +0200 +++ debian/patches/hurd-changes.dpatch 2005-07-25 23:04:16.552721864 +0200 @@ -26,7 +26,9 @@ # DP: /usr directory like the other ports. So this patch should NOT go # DP: upstream. # DP: -# DP: Define MAXPATHLEN. +# DP: Define MAXPATHLEN and PATH_MAX. +# DP: +# DP: Add some #pragma weak for _pthread_* functions. --- gcc/config/gnu.h.orig 2005-06-22 13:23:24.000000000 +0200 +++ gcc/config/gnu.h 2005-06-22 13:24:18.000000000 +0200 @@ -41,6 +43,12 @@ /* The system headers under GNU are C++-aware. */ #define NO_IMPLICIT_EXTERN_C +--- gcc/config/t-gnu.orig 2005-07-21 21:50:47.860778032 +0200 ++++ gcc/config/t-gnu 2005-07-21 21:50:55.514614472 +0200 +@@ -1,2 +1,2 @@ + # In GNU, "/usr" is a four-letter word. +-NATIVE_SYSTEM_HEADER_DIR = /include ++NATIVE_SYSTEM_HEADER_DIR = /usr/include --- gcc/tlink.c 2004-11-09 11:12:19.000000000 +0100 +++ gcc/tlink.c.new 2005-06-22 13:01:44.000000000 +0200 @@ -34,6 +34,10 @@ @@ -54,3 +62,34 @@ /* Defined in the automatically-generated underscore.c. */ extern int prepends_underscore; +--- gcc/fortran/gfortran.h.orig 2005-07-25 21:10:15.000000000 +0200 ++++ gcc/fortran/gfortran.h 2005-07-25 21:11:07.000000000 +0200 +@@ -501,7 +501,11 @@ + #include <limits.h> + #ifndef PATH_MAX + # include <sys/param.h> +-# define PATH_MAX MAXPATHLEN ++# ifdef MAXPATHLEN ++# define PATH_MAX MAXPATHLEN ++# else ++# define PATH_MAX 4096 ++# endif + #endif + + +--- gcc/gthr-posix.h.orig 2005-07-19 13:58:06.000000000 +0200 ++++ gcc/gthr-posix.h 2005-07-23 17:28:14.000000000 +0200 +@@ -40,6 +40,13 @@ + #define _REENTRANT 1 + #endif + ++#pragma weak _pthread_mutex_lock ++#pragma weak _pthread_mutex_trylock ++#pragma weak _pthread_mutex_unlock ++ ++#pragma weak _pthread_mutex_init ++#pragma weak _pthread_mutex_destroy ++ + #include <pthread.h> + #include <unistd.h> +