Package: gcc-4.1 Version: 4.1.2-4 Severity: important Please find below an update of the patch for GNU/kFreeBSD, which fixes a few things: - fix the kbsd-gnu.dpatch wrt hash-style. Please DON'T APPLY this patch if you reenable hash-style=both in the next upload - fix a small typo in debian/multiarch.inc which make the build fails on kfreebsd-amd64 - fix the detection of stackguard detection in the GNU libc for non Linux architectures. It should also work for Hurd if/when the GNU libc support stackguard on this architecture (I haven't checked yet).
diff -u gcc-4.1-4.1.2/debian/patches/kbsd-gnu.dpatch gcc-4.1-4.1.2/debian/patches/kbsd-gnu.dpatch --- gcc-4.1-4.1.2/debian/patches/kbsd-gnu.dpatch +++ gcc-4.1-4.1.2/debian/patches/kbsd-gnu.dpatch @@ -79,8 +79,8 @@ + { "dynamic_linker64", DYNAMIC_LINKER64 } + #undef LINK_SPEC --#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} --hash-style=both \ -+#define LINK_SPEC "%{!m32:-m %(link_emulation64)} %{m32:-m %(link_emulation)} --hash-style=both \ +-#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ ++#define LINK_SPEC "%{!m32:-m %(link_emulation64)} %{m32:-m %(link_emulation)} \ %{shared:-shared} \ %{!shared: \ %{!static: \ diff -u gcc-4.1-4.1.2/debian/multiarch.inc gcc-4.1-4.1.2/debian/multiarch.inc --- gcc-4.1-4.1.2/debian/multiarch.inc +++ gcc-4.1-4.1.2/debian/multiarch.inc @@ -34,7 +34,7 @@ #endif #if defined(__x86_64_kfreebsd_gnu__) - { "32", "i486-kfreebsd_gnu"}, + { "32", "i486-kfreebsd-gnu"}, #endif diff -u gcc-4.1-4.1.2/debian/rules.patch gcc-4.1-4.1.2/debian/rules.patch --- gcc-4.1-4.1.2/debian/rules.patch +++ gcc-4.1-4.1.2/debian/rules.patch @@ -120,6 +120,10 @@ debian_patches += gcc-ssp-default endif +ifeq ($(with_ssp),yes) + debian_patches += libssp-gnu +endif + ifeq ($(with_multiarch_lib),yes) debian_patches += multiarch-lib endif --- gcc-4.1-4.1.2.orig/debian/patches/libssp-gnu.dpatch +++ gcc-4.1-4.1.2/debian/patches/libssp-gnu.dpatch @@ -0,0 +1,51 @@ +#! /bin/sh -e + +# DP: GNU/k*BSD support +# Author: Aurelien Jarno <[EMAIL PROTECTED]> +# Status: Submitted: http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01962.html + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$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. + +--- src/gcc/configure.ac.orig 2007-04-28 14:51:34.000000000 +0200 ++++ src/gcc/configure.ac 2007-04-28 14:52:13.000000000 +0200 +@@ -3093,7 +3093,7 @@ + + # Test for stack protector support in target C library. + case "$target" in +- *-*-linux*) ++ *-*-*-gnu* | *-*-gnu) + AC_CACHE_CHECK(__stack_chk_fail in target GNU C library, + gcc_cv_libc_provides_ssp, + [gcc_cv_libc_provides_ssp=no +--- src/gcc/configure.orig 2007-04-28 14:51:38.000000000 +0200 ++++ src/gcc/configure 2007-04-28 14:52:02.000000000 +0200 +@@ -16693,7 +16693,7 @@ + + # Test for stack protector support in target C library. + case "$target" in +- *-*-linux*) ++ *-*-*-gnu* | *-*-gnu) + { echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5 + echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6; } + if test "${gcc_cv_libc_provides_ssp+set}" = set; then -- System Information: Debian Release: 4.0 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-3-xen-amd64 Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]