[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#264025: marked as done (Fixes for GNU/k*BSD.)



Your message dated Wed, 22 Sep 2004 09:29:04 +0200
with message-id <16721.10688.452056.602359@gargle.gargle.HOWL>
and subject line Fixed in upload of gcc-4.0 4.0-0pre0 to experimental
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 6 Aug 2004 19:54:29 +0000
>From rmh@khazad.dyndns.org Fri Aug 06 12:54:29 2004
Return-path: <rmh@khazad.dyndns.org>
Received: from 86.red-80-24-13.pooles.rima-tde.net (bilbo) [80.24.13.86] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BtAnL-0002mQ-00; Fri, 06 Aug 2004 12:54:27 -0700
Received: from khazad.dyndns.org ([192.168.0.1])
	by bilbo with esmtp (Exim 3.36 #1 (Debian))
	id 1BtAtq-0002kh-00; Fri, 06 Aug 2004 22:01:10 +0200
Received: from rmh by khazad.dyndns.org with local (Exim 4.34)
	id 1BtAnH-0009m8-TP; Fri, 06 Aug 2004 21:54:23 +0200
Date: Fri, 6 Aug 2004 21:54:23 +0200
From: Robert Millan <rmh@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Fixes for GNU/k*BSD.
Message-ID: <20040806195423.GA37532@khazad.dyndns.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="uQr8t48UFsdbeI+V"
Content-Disposition: inline
X-Reportbug-Version: 2.64
Organisation: free as in freedom
User-Agent: Mutt/1.5.6+20040722i
Sender: <rmh@khazad.dyndns.org>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 


--uQr8t48UFsdbeI+V
Content-Type: multipart/mixed; boundary="ZPt4rx8FFjLCG7dd"
Content-Disposition: inline


--ZPt4rx8FFjLCG7dd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Package: gcc-3.5
Version: 3.5ds1-0pre1
Severity: wishlist
Tags: patch

Hi!

I'm attaching two patches that fix configuration for GNU/k*BSD:

  - kbsd-gnu.dpatch: This is an update for debian/patches/kbsd-gnu.dpatch
  - gcc-3.5.diff: These are the fixes to the Debian package itself.

The summary of changes for gcc-3.5.diff follows.  It includes a rationale for
every change as footnotes. Let me know if any of these requires further
explanation (All them are necessary for proper portability support, and I
have checked that the generated debian/control contains correct dpkg tags).

Summary of changes:

  * control.m4:
    - s/locale_no_archs !hurd-i386/locale_no_archs/g
      (This is now handled in rules.defs. [1])
    - s/procps [check_no_archs]/procps [linux-gnu_archs]/g [2]
    - Add type-handling to build-deps. [3]
  * rules.conf:
    - Don't require (>= $(libc_ver)) for libc0.1-dev. [4]
    - Generate *_no_archs variables with type-handling and use them for
      for m4's -D parameters. [3]
  * rules.defs:
    - use filter instead of findstring [1].
    - s/netbsd-elf-gnu/netbsdelf-gnu/g [5].
    - enable java for kfreebsd-gnu [6]
    - enable ffi for kfreebsd-gnu and knetbsd-gnu [6]
    - enable libgc for kfreebsd-gnu [6]
    - enable checks for kfreebsd-gnu and knetbsd-gnu [7]
    - enable locales for kfreebsd-gnu and gnu [1] [8].

Rationales:

 [1] When using $(findstring foo,bar), we had the problem that 'gnu'
     matched the strings for other systems, like 'kfreebsd-gnu'.

     Apparently, 'gnu' was excluded from locale_no_systems to avoid that,
     and instead hardcoded in control.m4 as !hurd-i386.

     By using $(filter foo,bar) instead of findstring, whitespace terminations
     are checked, and therefore it's no longer a problem if 'gnu' matches
     'kfreebsd-gnu' or such.

     I've replaced all findstring checks for CPUs or systems with equivalent
     filter checks. This will avoid future problems (e.g. 'mips' matching
     'mipsel').

 [2] procps is Linux-specific. Since only linux-based systems had the check
     option enabled so far, this wasn't a problem. Now that we're enabling
     checks for k*bsd-gnu, we have to make procps a requirement only for
     linux-gnu systems.

 [3] type-handling is used to generate the list of architectures dpkg can
     understand, using the cpu and system variables one can sanely work with
     (i.e. without gratuitously referring to CPU for system checks, and
     without gratuitously referring to system for CPU checks).

 [4] We don't have an up-to-date version of libc0.1-dev on GNU/k*BSD (yet).

 [5] This fixes a wrong string that was added in one of my previous patches.
     Sorry.

 [6] Java and ffi were ported in upstream. libgc is ported in kbsd-gnu.dpatch.

 [7] Checks always worked on these systems, so no reason to disable them.

 [8] We have locales on kfreebsd-gnu now.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: kfreebsd-i386 (i386)
Kernel: GNU/kFreeBSD 5.2.1-5
Locale: LANG=C, LC_CTYPE=C (ignored: LC_ALL set to C)

--ZPt4rx8FFjLCG7dd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="gcc-3.5.diff"
Content-Transfer-Encoding: quoted-printable

diff -ur gcc-3.5-3.5ds1.old/debian/control.m4 gcc-3.5-3.5ds1/debian/control=
=2Em4
--- gcc-3.5-3.5ds1.old/debian/control.m4	2004-08-06 01:16:08.000000000 +0200
+++ gcc-3.5-3.5ds1/debian/control.m4	2004-08-06 21:13:10.000000000 +0200
@@ -39,7 +39,7 @@
 ifdef(`TARGET',`dnl cross
 Build-Depends: LIBC_BUILD_DEP, m4, autoconf2.13, automake1.7, libtool, aut=
otools-dev, gawk, dpkg-cross (>=3D 1.14.5), binutils`'TS
 ',`dnl native
-Build-Depends: LIBC_BUILD_DEP, libc6-dev-sparc64 [sparc], libc6-dev-s390x =
[s390], m4, autoconf, autoconf2.13, automake1.8, libtool, gawk, dejagnu (>=
=3D 1.4.3) [check_no_archs], expect (>=3D 5.38.0) [check_no_archs], bzip2, =
BINUTILS_BUILD_DEP, binutils-hppa64 [hppa], debhelper (>=3D 4.1), gperf (>=
=3D 2.7-3), bison (>=3D 1:1.875a-1), flex, gettext, texinfo (>=3D 4.3), zli=
b1g-dev, libgc-dev [libgc_no_archs], xlibs-dev, gnat-3.3 [ada_no_archs] | g=
nat-3.4 [ada_no_archs], libncurses5-dev [pascal_no_archs], libgmp3-dev, tet=
ex-bin [pascal_no_archs], locales [locale_no_archs !hurd-i386], procps [che=
ck_no_archs], help2man [pascal_no_archs], sharutils, libgtk2.0-dev [java_no=
_archs], libart-2.0-dev [java_no_archs], g++-3.3, gobjc-3.3
+Build-Depends: LIBC_BUILD_DEP, libc6-dev-sparc64 [sparc], libc6-dev-s390x =
[s390], m4, autoconf, autoconf2.13, automake1.8, libtool, gawk, dejagnu (>=
=3D 1.4.3) [check_no_archs], expect (>=3D 5.38.0) [check_no_archs], bzip2, =
BINUTILS_BUILD_DEP, binutils-hppa64 [hppa], debhelper (>=3D 4.1), gperf (>=
=3D 2.7-3), bison (>=3D 1:1.875a-1), flex, gettext, texinfo (>=3D 4.3), zli=
b1g-dev, libgc-dev [libgc_no_archs], xlibs-dev, gnat-3.3 [ada_no_archs] | g=
nat-3.4 [ada_no_archs], libncurses5-dev [pascal_no_archs], libgmp3-dev, tet=
ex-bin [pascal_no_archs], locales [locale_no_archs], procps [linux-gnu_arch=
s], help2man [pascal_no_archs], sharutils, libgtk2.0-dev [java_no_archs], l=
ibart-2.0-dev [java_no_archs], g++-3.3, gobjc-3.3, type-handling (>=3D 0.2.=
1)
 Build-Depends-Indep: doxygen (>=3D 1.3.7)
 ')dnl
=20
diff -ur gcc-3.5-3.5ds1.old/debian/rules.conf gcc-3.5-3.5ds1/debian/rules.c=
onf
--- gcc-3.5-3.5ds1.old/debian/rules.conf	2004-08-06 01:16:08.000000000 +0200
+++ gcc-3.5-3.5ds1/debian/rules.conf	2004-08-06 01:42:31.000000000 +0200
@@ -34,7 +34,7 @@
 ifeq ($(DEB_TARGET_GNU_SYSTEM),netbsd-elf-gnu)
   LIBC_DEP =3D libc12-dev
 endif
-LIBC_BUILD_DEP =3D libc6.1-dev (>=3D $(libc_ver)) [alpha ia64] | libc0.3-d=
ev (>=3D $(libc_ver)) | libc0.1-dev (>=3D $(libc_ver)) | libc12-dev (>=3D $=
(libc_ver)) | libc6-dev (>=3D $(libc_ver))
+LIBC_BUILD_DEP =3D libc6.1-dev (>=3D $(libc_ver)) [alpha ia64] | libc0.3-d=
ev (>=3D $(libc_ver)) | libc0.1-dev | libc12-dev (>=3D $(libc_ver)) | libc6=
-dev (>=3D $(libc_ver))
=20
 SOURCE_VERSION :=3D $(shell dpkg-parsechangelog | awk '/^Version:/ {print =
$$NF}')
 DEB_VERSION :=3D $(shell echo $(SOURCE_VERSION) \
@@ -169,6 +169,27 @@
 	   lib64objc lib64g2c libnof objcdev proto
 endif
=20
+ada_no_archs :=3D `type-handling -n \`echo $(ada_no_cpus) \
+	| sed "s/ /,/g"\` any` `type-handling -n any \`echo $(ada_no_systems) \
+	| sed "s/ /,/g"\``
+java_no_archs :=3D `type-handling -n \`echo $(java_no_cpus) \
+	| sed "s/ /,/g"\` any` `type-handling -n any \`echo $(java_no_systems) \
+	| sed "s/ /,/g"\``
+pascal_no_archs :=3D `type-handling -n \`echo $(pascal_no_cpus) \
+	| sed "s/ /,/g"\` any` `type-handling -n any \`echo $(pascal_no_systems) \
+	| sed "s/ /,/g"\``
+libgc_no_archs :=3D `type-handling -n \`echo $(libgc_no_cpus) \
+	| sed "s/ /,/g"\` any` `type-handling -n any \`echo $(libgc_no_systems) \
+	| sed "s/ /,/g"\``
+check_no_archs :=3D `type-handling -n \`echo $(check_no_cpus) \
+	| sed "s/ /,/g"\` any` `type-handling -n any \`echo $(check_no_systems) \
+	| sed "s/ /,/g"\``
+locale_no_archs :=3D `type-handling -n \`echo $(locale_no_cpus) \
+	| sed "s/ /,/g"\` any` `type-handling -n any \`echo $(locale_no_systems) \
+	| sed "s/ /,/g"\``
+
+linux-gnu_archs :=3D `type-handling any linux-gnu`
+
 control-file:
 	echo "addons: $(addons)"; \
 	m4 $(ctrl_flags) \
@@ -185,12 +206,13 @@
 	  -DFFI_SO=3D$(FFI_SONAME) \
 	  -DMF_SO=3D$(MUDFLAP_SONAME) \
 	  -Denabled_languages=3D"$(languages) $(addons)" \
-	  -Dada_no_archs=3D"$(foreach arch,$(ada_no_cpus) $(ada_no_systems),!$(ar=
ch))" \
-	  -Djava_no_archs=3D"$(foreach arch,$(java_no_cpus) $(java_no_systems),!$=
(arch))" \
-	  -Dpascal_no_archs=3D"$(foreach arch,$(pascal_no_cpus) $(pascal_no_syste=
ms),!$(arch))" \
-	  -Dlibgc_no_archs=3D"$(foreach arch,$(libgc_no_cpus) $(libgc_no_systems)=
,!$(arch))" \
-	  -Dcheck_no_archs=3D"$(foreach arch,$(check_no_cpus) $(check_no_systems)=
,!$(arch))" \
-	  -Dlocale_no_archs=3D"$(foreach arch,$(locale_no_cpus) $(locale_no_syste=
ms),!$(arch))" \
+	  -Dada_no_archs=3D"$(ada_no_archs)" \
+	  -Djava_no_archs=3D"$(java_no_archs)" \
+	  -Dpascal_no_archs=3D"$(pascal_no_archs)" \
+	  -Dlibgc_no_archs=3D"$(libgc_no_archs)" \
+	  -Dcheck_no_archs=3D"$(check_no_archs)" \
+	  -Dlocale_no_archs=3D"$(locale_no_archs)" \
+	  -Dlinux-gnu_archs=3D"$(linux-gnu_archs)" \
 		debian/control.m4 > debian/control.tmp2
 	uniq debian/control.tmp2 > debian/control.tmp
 	rm -f debian/control.tmp2
diff -ur gcc-3.5-3.5ds1.old/debian/rules.defs gcc-3.5-3.5ds1/debian/rules.d=
efs
--- gcc-3.5-3.5ds1.old/debian/rules.defs	2004-08-06 01:16:08.000000000 +0200
+++ gcc-3.5-3.5ds1/debian/rules.defs	2004-08-06 04:40:58.000000000 +0200
@@ -97,7 +97,7 @@
 with_common_libs :=3D yes
=20
 #no_common_libs :=3D s390
-#ifeq ($(DEB_TARGET_GNU_CPU), $(findstring $(DEB_TARGET_GNU_CPU),$(no_comm=
on_libs)))
+#ifneq (, $(filter $(DEB_TARGET_GNU_CPU),$(no_common_libs)))
 #  with_common_libs :=3D no
 #endif
=20
@@ -105,7 +105,7 @@
=20
 #no_dummy_cpus :=3D ia64 i386 hppa s390 sparc
 #with_base_only :=3D yes
-#ifeq ($(DEB_TARGET_GNU_CPU), $(findstring $(DEB_TARGET_GNU_CPU),$(no_dumm=
y_cpus)))
+#ifneq (, $(filter $(DEB_TARGET_GNU_CPU),$(no_dummy_cpus)))
 #  with_base_only :=3D no
 #  with_common_libs :=3D yes
 #  with_common_pkgs :=3D yes
@@ -138,7 +138,7 @@
   with_cxx :=3D yes
 endif
 no_cxx_cpus :=3D avr
-ifeq ($(DEB_TARGET_GNU_CPU), $(findstring $(DEB_TARGET_GNU_CPU),$(no_cxx_c=
pus)))
+ifneq (, $(filter $(DEB_TARGET_GNU_CPU),$(no_cxx_cpus)))
   with_cxx :=3D disabled for architecture $(DEB_TARGET_GNU_CPU)
 endif
 ifeq (c++, $(findstring c++,$(WITHOUT_LANG)))
@@ -171,7 +171,7 @@
   with_debug :=3D no
 endif
 debug_no_cpus :=3D
-ifeq ($(DEB_TARGET_GNU_CPU), $(findstring $(DEB_TARGET_GNU_CPU),$(debug_no=
_cpus)))
+ifneq (, $(filter $(DEB_TARGET_GNU_CPU),$(debug_no_cpus)))
     with_debug :=3D disabled for architecure $(DEB_TARGET_GNU_CPU)
 endif
=20
@@ -180,8 +180,8 @@
 # The __cxa_atexit API does not exist in some libc version (NetBSD)
 with_cxa_atexit :=3D yes
=20
-no_cxa_systems :=3D netbsd-elf-gnu
-ifeq ($(DEB_TARGET_GNU_SYSTEM), $(findstring $(DEB_TARGET_GNU_SYSTEM),$(no=
_cxa_systems)))
+no_cxa_systems :=3D netbsdelf-gnu
+ifneq (, $(filter $(DEB_TARGET_GNU_SYSTEM),$(no_cxa_systems)))
   with_cxa_atexit :=3D disabled for $(DEB_TARGET_GNU_SYSTEM)
 endif
=20
@@ -193,8 +193,8 @@
   with_java :=3D yes
 endif
=20
-java_no_systems :=3D gnu kfreebsd-gnu knetbsd-gnu netbsd-elf-gnu
-ifeq ($(DEB_TARGET_GNU_SYSTEM), $(findstring $(DEB_TARGET_GNU_SYSTEM),$(ja=
va_no_systems)))
+java_no_systems :=3D gnu knetbsd-gnu netbsdelf-gnu
+ifneq (, $(filter $(DEB_TARGET_GNU_SYSTEM),$(java_no_systems)))
   with_java :=3D disabled for $(DEB_TARGET_GNU_SYSTEM)
 endif
 ifdef DEB_CROSS
@@ -241,12 +241,12 @@
 ifeq ($(with_common_libs),yes)
   with_libffi :=3D yes
   no_ffi_cpus :=3D
-  no_ffi_systems :=3D gnu kfreebsd-gnu knetbsd-gnu netbsd-elf-gnu
+  no_ffi_systems :=3D gnu netbsdelf-gnu
   ifneq ($(with_java),yes)
-    ifeq ($(DEB_TARGET_GNU_CPU), $(findstring $(DEB_TARGET_GNU_CPU),$(no_f=
fi_cpus)))
+    ifneq (, $(filter $(DEB_TARGET_GNU_CPU),$(no_ffi_cpus)))
       with_libffi :=3D disabled for architecure $(DEB_TARGET_GNU_CPU)
     endif
-    ifeq ($(DEB_TARGET_GNU_SYSTEM), $(findstring $(DEB_TARGET_GNU_SYSTEM),=
$(no_ffi_systems)))
+    ifneq (, $(filter $(DEB_TARGET_GNU_SYSTEM),$(no_ffi_systems)))
       with_libffi :=3D disabled for $(DEB_TARGET_GNU_SYSTEM)
     endif
   endif
@@ -278,7 +278,7 @@
 endif
=20
 ifeq ($(with_common_libs)-$(with_f77),yes-yes)
-  ifeq ($(DEB_TARGET_GNU_CPU),$(findstring $(DEB_TARGET_GNU_CPU),mipsel))
+  ifneq (, $(filter $(DEB_TARGET_GNU_CPU),mipsel))
     with_libg2c :=3D disable on mipsel for gcc-3.4
   else
     with_libg2c :=3D yes
@@ -352,12 +352,12 @@
   with_pascal :=3D no
 endif
=20
-pascal_no_systems :=3D netbsd-elf-gnu
-ifeq ($(DEB_TARGET_GNU_SYSTEM),$(findstring $(DEB_TARGET_GNU_SYSTEM),$(pas=
cal_no_systems)))
+pascal_no_systems :=3D netbsdelf-gnu
+ifneq (, $(filter $(DEB_TARGET_GNU_SYSTEM),$(pascal_no_systems)))
   with_pascal :=3D disabled for $(DEB_TARGET_GNU_SYSTEM)
 endif
 with_gpidump :=3D yes
-ifeq ($(DEB_TARGET_GNU_CPU),$(findstring $(DEB_TARGET_GNU_CPU),mips mipsel=
))
+ifneq (, $(filter $(DEB_TARGET_GNU_CPU),mips mipsel))
   with_gpidump :=3D disabled for architecture $(DEB_TARGET_GNU_CPU)
 endif
 pascal_version :=3D 20030830
@@ -383,11 +383,11 @@
=20
 # disable ObjC garbage collection library (needs libgc)
 libgc_no_cpus :=3D avr
-libgc_no_systems :=3D kfreebsd-gnu knetbsd-gnu
-ifeq ($(DEB_TARGET_GNU_CPU),$(findstring $(DEB_TARGET_GNU_CPU),$(libgc_no_=
cpus)))
+libgc_no_systems :=3D knetbsd-gnu
+ifneq (, $(filter $(DEB_TARGET_GNU_CPU),$(libgc_no_cpus)))
   with_objc_gc :=3D disabled for architecture $(DEB_TARGET_GNU_CPU)
 endif
-ifeq ($(DEB_TARGET_GNU_SYSTEM),$(findstring $(DEB_TARGET_GNU_SYSTEM),$(lib=
gc_no_systems)))
+ifneq (, $(filter $(DEB_TARGET_GNU_SYSTEM),$(libgc_no_systems)))
   with_objc_gc :=3D disabled for $(DEB_TARGET_GNU_SYSTEM)
 endif
 with_objc_gc :=3D disabled for gcc-3.4
@@ -426,11 +426,11 @@
=20
 with_libgnat :=3D yes
 ada_no_cpus :=3D arm m68k
-ada_no_systems :=3D gnu kfreebsd-gnu knetbsd-gnu netbsd-elf-gnu
-ifeq ($(DEB_TARGET_GNU_CPU), $(findstring $(DEB_TARGET_GNU_CPU),$(ada_no_c=
pus)))
+ada_no_systems :=3D gnu kfreebsd-gnu knetbsd-gnu netbsdelf-gnu
+ifneq (, $(filter $(DEB_TARGET_GNU_CPU),$(ada_no_cpus)))
   with_ada :=3D disabled for architecure $(DEB_TARGET_GNU_CPU)
 endif
-ifeq ($(DEB_TARGET_GNU_SYSTEM), $(findstring $(DEB_TARGET_GNU_SYSTEM),$(ad=
a_no_systems)))
+ifneq (, $(filter $(DEB_TARGET_GNU_SYSTEM),$(ada_no_systems)))
   with_ada :=3D disabled for $(DEB_TARGET_GNU_SYSTEM)
 endif
 ifeq (ada, $(findstring ada,$(WITHOUT_LANG)))
@@ -443,14 +443,14 @@
 with_ada :=3D disabled for gcc-3.5
=20
 # needed for 3.4 on alpha, but not for release tarballs
-ifeq ($(DEB_HOST_GNU_CPU),$(findstring $(DEB_HOST_GNU_CPU),alpha))
+ifneq (, $(filter $(DEB_HOST_GNU_CPU),alpha))
   with_ada_bootstrap_workaround :=3D yes
 endif
=20
 ifeq ($(with_ada),yes)
   enabled_languages +=3D ada
   libada_no_cpus :=3D alpha mips mipsel powerpc s390 sparc
-  ifeq ($(DEB_TARGET_GNU_CPU), $(findstring $(DEB_TARGET_GNU_CPU),$(libada=
_no_cpus)))
+  ifneq (, $(filter $(DEB_TARGET_GNU_CPU),$(libada_no_cpus)))
     with_libgnat :=3D disabled for architecure $(DEB_TARGET_GNU_CPU)
   endif
 else
@@ -468,7 +468,7 @@
   endif
 endif
 tl_no_cpus :=3D powerpc
-ifeq ($(DEB_TARGET_GNU_CPU), $(findstring $(DEB_TARGET_GNU_CPU),$(tl_no_cp=
us)))
+ifneq (, $(filter $(DEB_TARGET_GNU_CPU),$(tl_no_cpus)))
     with_treelang :=3D disabled for architecure $(DEB_TARGET_GNU_CPU)
 endif
 ifdef DEB_CROSS
@@ -503,8 +503,8 @@
 ifdef DEB_CROSS
   with_check :=3D disabled for cross compiler package
 endif
-check_no_systems :=3D gnu kfreebsd-gnu knetbsd-gnu
-ifeq ($(DEB_TARGET_GNU_SYSTEM), $(findstring $(DEB_TARGET_GNU_SYSTEM),$(ch=
eck_no_systems)))
+check_no_systems :=3D gnu
+ifneq (, $(filter $(DEB_TARGET_GNU_SYSTEM),$(check_no_systems)))
   with_check :=3D disabled for $(DEB_TARGET_GNU_SYSTEM)
 endif
 ifneq ($(WITHOUT_CHECK),)
@@ -564,8 +564,8 @@
=20
 # GNU locales
 force_gnu_locales :=3D yes
-locale_no_systems :=3D kfreebsd-gnu knetbsd-gnu netbsd-elf-gnu
-ifeq ($(DEB_TARGET_GNU_SYSTEM), $(findstring $(DEB_TARGET_GNU_SYSTEM),$(lo=
cale_no_systems)))
+locale_no_systems :=3D gnu knetbsd-gnu netbsdelf-gnu
+ifneq (, $(filter $(DEB_TARGET_GNU_SYSTEM),$(locale_no_systems)))
   force_gnu_locales :=3D disabled for $(DEB_TARGET_GNU_SYSTEM)
 endif
=20

--ZPt4rx8FFjLCG7dd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="kbsd-gnu.dpatch"
Content-Transfer-Encoding: quoted-printable

#! /bin/sh -e

# DP: GNU/k*BSD support
# Author: Robert Millan <robertmh@gnu.org>
# Status: pending

dir=3D
if [ $# -eq 3 -a "$2" =3D '-d' ]; then
    pdir=3D"-d $3"
    dir=3D"$3/"
elif [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch)
        patch $pdir -f --no-backup-if-mismatch -p1 < $0
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
        ;;
    *)
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1
esac
exit 0

# append the patch here and adjust the -p? flag in the patch calls.

diff -Nur gcc-20040724.old/boehm-gc/configure gcc-20040724/boehm-gc/configu=
re
--- gcc-20040724.old/boehm-gc/configure	2004-06-17 21:32:41.000000000 +0200
+++ gcc-20040724/boehm-gc/configure	2004-08-06 01:53:05.000000000 +0200
@@ -5337,6 +5337,12 @@
 _ACEOF
=20
 	;;
+     *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+	cat >>confdefs.h <<\_ACEOF
+#define _REENTRANT 1
+_ACEOF
+
+	;;
      *-*-aix*)
 	cat >>confdefs.h <<\_ACEOF
 #define GC_AIX_THREADS 1
diff -Nur gcc-20040724.old/boehm-gc/configure.ac gcc-20040724/boehm-gc/conf=
igure.ac
--- gcc-20040724.old/boehm-gc/configure.ac	2004-06-16 09:34:42.000000000 +0=
200
+++ gcc-20040724/boehm-gc/configure.ac	2004-08-06 01:53:05.000000000 +0200
@@ -138,6 +138,9 @@
 	AC_DEFINE(GC_LINUX_THREADS)
 	AC_DEFINE(_REENTRANT)
 	;;
+     *-*-gnu* | *-*-k*bsd*-gnu)
+	AC_DEFINE(_REENTRANT)
+	;;
      *-*-aix*)
 	AC_DEFINE(GC_AIX_THREADS)
 	AC_DEFINE(_REENTRANT)
diff -Nur gcc-20040724.old/boehm-gc/dbg_mlc.c gcc-20040724/boehm-gc/dbg_mlc=
=2Ec
--- gcc-20040724.old/boehm-gc/dbg_mlc.c	2003-07-28 06:18:20.000000000 +0200
+++ gcc-20040724/boehm-gc/dbg_mlc.c	2004-08-06 01:53:05.000000000 +0200
@@ -59,7 +59,7 @@
=20
 # include <stdlib.h>
=20
-# if defined(LINUX) || defined(SUNOS4) || defined(SUNOS5) \
+# if defined(LINUX) || defined(GLIBC) || defined(SUNOS4) || defined(SUNOS5=
) \
      || defined(HPUX) || defined(IRIX5) || defined(OSF1)
 #   define RANDOM() random()
 # else
diff -Nur gcc-20040724.old/boehm-gc/dyn_load.c gcc-20040724/boehm-gc/dyn_lo=
ad.c
--- gcc-20040724.old/boehm-gc/dyn_load.c	2003-07-30 19:42:28.000000000 +0200
+++ gcc-20040724/boehm-gc/dyn_load.c	2004-08-06 01:53:05.000000000 +0200
@@ -26,7 +26,8 @@
  * None of this is safe with dlclose and incremental collection.
  * But then not much of anything is safe in the presence of dlclose.
  */
-#if defined(__linux__) && !defined(_GNU_SOURCE)
+#if (defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) \
+  && !defined(_GNU_SOURCE)
     /* Can't test LINUX, since this must be define before other includes */
 #   define _GNU_SOURCE
 #endif
@@ -56,7 +57,7 @@
     !(defined(ALPHA) && defined(OSF1)) && \
     !defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \
     !defined(RS6000) && !defined(SCO_ELF) && !defined(DGUX) && \
-    !(defined(FREEBSD) && defined(__ELF__)) && \
+    !(defined(KFREEBSD) && defined(__ELF__)) && \
     !(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
     !defined(DARWIN)
  --> We only know how to find data segments of dynamic libraries for the
@@ -81,7 +82,7 @@
 #endif
=20
 #if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
-    (defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
+    (defined(KFREEBSD) && defined(__ELF__)) || defined(DGUX) || \
     (defined(NETBSD) && defined(__ELF__)) || defined(HURD)
 #   include <stddef.h>
 #   include <elf.h>
@@ -265,7 +266,7 @@
 # endif /* SUNOS */
=20
 #if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
-    (defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
+    (defined(KFREEBSD) && defined(__ELF__)) || defined(DGUX) || \
     (defined(NETBSD) && defined(__ELF__)) || defined(HURD)
=20
=20
@@ -360,7 +361,7 @@
 /* For glibc 2.2.4+.  Unfortunately, it doesn't work for older	*/
 /* versions.  Thanks to Jakub Jelinek for most of the code.	*/
=20
-# if defined(LINUX) /* Are others OK here, too? */ \
+# if defined(GLIBC) \
      && (__GLIBC__ > 2 || (__GLIBC__ =3D=3D 2 && __GLIBC_MINOR__ > 2) \
          || (__GLIBC__ =3D=3D 2 && __GLIBC_MINOR__ =3D=3D 2 && defined(DT_=
CONFIG)))=20
=20
@@ -434,7 +435,7 @@
=20
 #define HAVE_REGISTER_MAIN_STATIC_DATA
=20
-# else /* !LINUX || version(glibc) < 2.2.4 */
+# else /* !GLIBC || version(glibc) < 2.2.4 */
=20
 /* Dynamic loading code for Linux running ELF. Somewhat tested on
  * Linux/x86, untested but hopefully should work on Linux/Alpha.=20
diff -Nur gcc-20040724.old/boehm-gc/include/gc.h gcc-20040724/boehm-gc/incl=
ude/gc.h
--- gcc-20040724.old/boehm-gc/include/gc.h	2003-07-31 06:52:36.000000000 +0=
200
+++ gcc-20040724/boehm-gc/include/gc.h	2004-08-06 01:53:05.000000000 +0200
@@ -466,7 +466,7 @@
 #   define GC_RETURN_ADDR (GC_word)__return_address
 #endif
=20
-#ifdef __linux__
+#if defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
 # include <features.h>
 # if (__GLIBC__ =3D=3D 2 && __GLIBC_MINOR__ >=3D 1 || __GLIBC__ > 2) \
      && !defined(__ia64__)
@@ -490,7 +490,8 @@
 /* This may also be desirable if it is possible but expensive to	*/
 /* retrieve the call chain.						*/
 #if (defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) \
-     || defined(__FreeBSD__)) & !defined(GC_CAN_SAVE_CALL_STACKS)
+     || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
+     ) & !defined(GC_CAN_SAVE_CALL_STACKS)
 # define GC_ADD_CALLER
 # if __GNUC__ >=3D 3 || (__GNUC__ =3D=3D 2 && __GNUC_MINOR__ >=3D 95)=20
     /* gcc knows how to retrieve return address, but we don't know */
diff -Nur gcc-20040724.old/boehm-gc/include/private/gcconfig.h gcc-20040724=
/boehm-gc/include/private/gcconfig.h
--- gcc-20040724.old/boehm-gc/include/private/gcconfig.h	2004-04-06 20:05:0=
5.000000000 +0200
+++ gcc-20040724/boehm-gc/include/private/gcconfig.h	2004-08-06 01:53:05.00=
0000000 +0200
@@ -44,6 +44,14 @@
 #  endif
 # endif
=20
+/* And one for Glibc: */
+#if defined(LINUX) || defined(__GNU__) || defined(__GLIBC__)
+# include <features.h>
+#endif
+#ifdef __GLIBC__
+# define GLIBC
+#endif
+
 /* And one for NetBSD: */
 # if defined(__NetBSD__)
 #    define NETBSD
@@ -58,6 +66,9 @@
 # if defined(__FreeBSD__)
 #    define FREEBSD
 # endif
+# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#    define KFREEBSD
+# endif
=20
 /* Determine the machine type: */
 # if defined(__arm__) || defined(__thumb__)
@@ -299,7 +310,7 @@
 #   define OPENBSD
 #   define mach_type_known
 # endif
-# if defined(FREEBSD) && (defined(i386) || defined(__i386__))
+# if defined(KFREEBSD) && (defined(i386) || defined(__i386__))
 #   define I386
 #   define mach_type_known
 # endif
@@ -1162,13 +1173,25 @@
 #	endif
 #	define SIG_SUSPEND SIGUSR1
 #	define SIG_THR_RESTART SIGUSR2
+	extern char etext[];
+	extern char * GC_FreeBSDGetDataStart();
+#	define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext)
+#   endif
+#   if defined(GLIBC) && defined(KFREEBSD)
+#	define OS_TYPE "GNU/kFreeBSD"
+#	if !defined(GC_LINUX_THREADS) && !defined(REDIRECT_MALLOC)
+#	    define MPROTECT_VDB
+#	endif
+#	define SIG_SUSPEND 57 /* arbitrary signal number <=3D 128 */
+#	define SIG_THR_RESTART 58 /* arbitrary signal number <=3D 128 */
+#	define SEARCH_FOR_DATA_START
+#	define DATAEND (sbrk (0))
+#   endif
+#   ifdef KFREEBSD
 #	define FREEBSD_STACKBOTTOM
 #	ifdef __ELF__
 #	    define DYNAMIC_LOADING
 #	endif
-	extern char etext[];
-	extern char * GC_FreeBSDGetDataStart();
-#	define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext)
 #   endif
 #   ifdef NETBSD
 #	define OS_TYPE "NETBSD"
diff -Nur gcc-20040724.old/boehm-gc/os_dep.c gcc-20040724/boehm-gc/os_dep.c
--- gcc-20040724.old/boehm-gc/os_dep.c	2004-07-07 06:31:15.000000000 +0200
+++ gcc-20040724/boehm-gc/os_dep.c	2004-08-06 01:53:05.000000000 +0200
@@ -80,7 +80,7 @@
 #   define NEED_FIND_LIMIT
 # endif
=20
-#if defined(FREEBSD) && defined(I386)
+#if defined(KFREEBSD) && defined(I386)
 #  include <machine/trap.h>
 #  if !defined(PCR)
 #    define NEED_FIND_LIMIT
@@ -121,7 +121,7 @@
 # include <fcntl.h>
 #endif
=20
-#if defined(SUNOS5SIGS) || defined (HURD) || defined(LINUX)
+#if defined(SUNOS5SIGS) || defined(LINUX) || defined(GLIBC)
 # ifdef SUNOS5SIGS
 #  include <sys/siginfo.h>
 # endif
@@ -311,7 +311,7 @@
   /* for recent Linux versions.  This seems to be the easiest way to	*/
   /* cover all versions.						*/
=20
-# ifdef LINUX
+# if defined(LINUX) || defined(GLIBC)
     /* Some Linux distributions arrange to define __data_start.  Some	*/
     /* define data_start as a weak symbol.  The latter is technically	*/
     /* broken, since the user program may define data_start, in which	*/
@@ -321,7 +321,7 @@
     extern int __data_start[];
 #   pragma weak data_start
     extern int data_start[];
-# endif /* LINUX */
+# endif /* LINUX || GLIBC */
   extern int _end[];
=20
   ptr_t GC_data_start;
@@ -330,7 +330,7 @@
   {
     extern ptr_t GC_find_limit();
=20
-#   ifdef LINUX
+#   if defined(LINUX) || defined(GLIBC)
       /* Try the easy approaches first:	*/
       if ((ptr_t)__data_start !=3D 0) {
 	  GC_data_start =3D (ptr_t)(__data_start);
@@ -340,7 +340,7 @@
 	  GC_data_start =3D (ptr_t)(data_start);
 	  return;
       }
-#   endif /* LINUX */
+#   endif /* LINUX || GLIBC */
     GC_data_start =3D GC_find_limit((ptr_t)(_end), FALSE);
   }
 #endif
@@ -2175,13 +2175,13 @@
 #endif /* SUNOS4 || FREEBSD */
=20
 #if defined(SUNOS5SIGS) || defined(OSF1) || defined(LINUX) \
-    || defined(HURD)
+    || defined(GLIBC)
 # ifdef __STDC__
     typedef void (* SIG_PF)(int);
 # else
     typedef void (* SIG_PF)();
 # endif
-#endif /* SUNOS5SIGS || OSF1 || LINUX || HURD */
+#endif /* SUNOS5SIGS || OSF1 || LINUX || GLIBC */
=20
 #if defined(MSWIN32)
     typedef LPTOP_LEVEL_EXCEPTION_FILTER SIG_PF;
@@ -2301,7 +2301,7 @@
=20
 /*ARGSUSED*/
 #if !defined(DARWIN)
-# if defined (SUNOS4) || defined(FREEBSD)
+# if defined (SUNOS4) || defined(KFREEBSD)
     void GC_write_fault_handler(sig, code, scp, addr)
     int sig, code;
     struct sigcontext *scp;
@@ -2312,11 +2312,11 @@
               	    || (FC_CODE(code) =3D=3D FC_OBJERR \
               	       && FC_ERRNO(code) =3D=3D FC_PROT))
 #   endif
-#   ifdef FREEBSD
+#   ifdef KFREEBSD
 #     define SIG_OK (sig =3D=3D SIGBUS)
 #     define CODE_OK (code =3D=3D BUS_PAGE_FAULT)
 #   endif
-# endif /* SUNOS4 || FREEBSD */
+# endif /* SUNOS4 || KFREEBSD */
=20
 # if defined(IRIX5) || defined(OSF1) || defined(HURD)
 #   include <errno.h>
@@ -3831,7 +3831,7 @@
 /* I suspect the following works for most X86 *nix variants, so 	*/
 /* long as the frame pointer is explicitly stored.  In the case of gcc,	*/
 /* compiler flags (e.g. -fomit-frame-pointer) determine whether it is.	*/
-#if defined(I386) && defined(LINUX) && defined(SAVE_CALL_CHAIN)
+#if defined(I386) && (defined(LINUX) || defined(GLIBC)) && defined(SAVE_CA=
LL_CHAIN)
 #   include <features.h>
=20
     struct frame {
@@ -3842,7 +3842,7 @@
 #endif
=20
 #if defined(SPARC)
-#  if defined(LINUX)
+#  if defined(LINUX) || defined(GLIBC)
 #    include <features.h>
=20
      struct frame {

--ZPt4rx8FFjLCG7dd--

--uQr8t48UFsdbeI+V
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/kFreeBSD)

iD8DBQFBE+HvC19io6rUCv8RApElAJ0Y1OLwNPNaYxYMlC3Hdg9jMuFRKwCfbeAs
JLYKQ846S9tn9J9R+KDSxGU=
=3eIm
-----END PGP SIGNATURE-----

--uQr8t48UFsdbeI+V--

---------------------------------------
Received: (at 264025-done) by bugs.debian.org; 22 Sep 2004 07:29:08 +0000
>From doko@cs.tu-berlin.de Wed Sep 22 00:29:08 2004
Return-path: <doko@cs.tu-berlin.de>
Received: from mail.cs.tu-berlin.de [130.149.17.13] (root)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CA1Yq-0000wn-00; Wed, 22 Sep 2004 00:29:08 -0700
Received: from mailhost.cs.tu-berlin.de (postfix@mail.cs.tu-berlin.de [130.149.17.13])
	by mail.cs.tu-berlin.de (8.9.3p2/8.9.3) with ESMTP id JAA00700;
	Wed, 22 Sep 2004 09:29:05 +0200 (MEST)
Received: from localhost (localhost [127.0.0.1])
	by mailhost.cs.tu-berlin.de (Postfix) with ESMTP id E66D8F218;
	Wed, 22 Sep 2004 09:29:04 +0200 (MEST)
Received: from mailhost.cs.tu-berlin.de ([127.0.0.1])
 by localhost (bueno [127.0.0.1]) (amavisd-new, port 10224) with ESMTP
 id 19663-45; Wed, 22 Sep 2004 09:29:04 +0200 (MEST)
Received: from bolero.cs.tu-berlin.de (bolero.cs.tu-berlin.de [130.149.19.1])
	by mailhost.cs.tu-berlin.de (Postfix) with ESMTP;
	Wed, 22 Sep 2004 09:29:04 +0200 (MEST)
Received: (from doko@localhost)
	by bolero.cs.tu-berlin.de (8.12.10+Sun/8.12.8/Submit) id i8M7T430009170;
	Wed, 22 Sep 2004 09:29:04 +0200 (MEST)
From: Matthias Klose <doko@cs.tu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <16721.10688.452056.602359@gargle.gargle.HOWL>
Date: Wed, 22 Sep 2004 09:29:04 +0200
To: 261693-done@bugs.debian.org, 264025-done@bugs.debian.org,
        265939-done@bugs.debian.org
Subject: Re: Fixed in upload of gcc-4.0 4.0-0pre0 to experimental
In-Reply-To: <[🔎] E1CA1LH-0005Fd-00@newraff.debian.org>
References: <[🔎] E1CA1LH-0005Fd-00@newraff.debian.org>
X-Mailer: VM 7.03 under 21.4 (patch 6) "Common Lisp" XEmacs Lucid
X-Virus-Scanned: by amavisd-new at cs.tu-berlin.de
Delivered-To: 264025-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-0.1 required=4.0 tests=BAYES_44 autolearn=no 
	version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 
X-CrossAssassin-Score: 2

>  gcc-4.0 (4.0-0pre0) experimental; urgency=low
>  .
>    * gcc-4.0 snapshot, taken from the HEAD branch CVS 20040912.
>  .
>    * Matthias Klose <doko@debian.org>
>  .
>      - Integrate accumulated packaging patches from gcc-3.4.
>      - Rename libstdc++6-* packages to libstdc++6-4-* (closes: #261693).
>      - libffi4-dev: conflict with libffi3-dev (closes: #265939).
>  .
>    * Robert Millan <rmh@debian.org>
>  .
>      * control.m4:
>        - s/locale_no_archs !hurd-i386/locale_no_archs/g
>          (This is now handled in rules.defs. [1])
>        - s/procps [check_no_archs]/procps [linux_gnu_archs]/g [2]
>        - Add type-handling to build-deps. [3]
>      * rules.conf:
>        - Don't require (>= $(libc_ver)) for libc0.1-dev. [4]
>        - Generate *_no_archs variables with type-handling and use them for
>          for m4's -D parameters. [3]
>      * rules.defs:
>        - use filter instead of findstring [1].
>        - s/netbsd-elf-gnu/netbsdelf-gnu/g [5].
>        - enable java for kfreebsd-gnu [6]
>        - enable ffi for kfreebsd-gnu and knetbsd-gnu [6]
>        - enable libgc for kfreebsd-gnu [6]
>        - enable checks for kfreebsd-gnu and knetbsd-gnu [7]
>        - enable locales for kfreebsd-gnu and gnu [1] [8].
>      * Closes: #264025.



Reply to: