Your message dated Wed, 10 Mar 2021 08:00:41 +0100
with message-id <yehumfmdyefeg...@alf.mars>
and subject line Re: Bug#644662: Fails to build if GCC does not have libssp
support
has caused the Debian Bug report #644662,
regarding Fails to build if GCC does not have libssp support
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
644662: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=644662
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: eglibc
Version: 2.13-21
Severity: normal
Tags: upstream patch
The attached patch fixes detection of GCC -fstack-protector and libssp.
In order to properly detect whether or not GCC has -fstack-protect
support built in, you actually need to link something. Otherwise
GCC will accept the option and fail during the link due to missing
libssp.
This occurs in particular when trying to bootstrap a cross-compiler for
a new Debian port; the stage2 cross-compiler does not have libssp
support causing "undefined reference to `__stack_chk_guard'" errors
when building EGLIBC.
The fix is simply to remove the "-c" from the "-fstack-protector" test,
so it verifies whether or not GCC can actually link objects built with
that option.
This fix should also be forwarded upstream.
Cheers,
Kyle Moffett
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (700, 'testing'), (700, 'stable'), (600, 'unstable'), (500,
'stable-updates'), (500, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.39-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
diff -ruN eglibc-2.13/debian/patches/any/local-fix-libssp-detection.patch eglibc-2.13.new/debian/patches/any/local-fix-libssp-detection.patch
--- eglibc-2.13/debian/patches/any/local-fix-libssp-detection.patch 1969-12-31 19:00:00.000000000 -0500
+++ eglibc-2.13.new/debian/patches/any/local-fix-libssp-detection.patch 2011-10-06 19:35:30.000000000 -0400
@@ -0,0 +1,32 @@
+Fix detection of GCC -fstack-protect and libssp support
+
+In order to properly detect whether or not GCC has -fstack-protect
+support built in, you actually need to link something. Otherwise
+GCC will accept the option and fail during the link due to missing
+libssp.
+Index: eglibc-2.13/configure
+===================================================================
+--- eglibc-2.13.orig/configure 2011-10-06 19:31:36.000000000 -0400
++++ eglibc-2.13/configure 2011-10-06 19:33:13.000000000 -0400
+@@ -6942,7 +6942,7 @@
+ $as_echo_n "(cached) " >&6
+ else
+ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector
+- -o /dev/null -c -x c /dev/null 1>&5'
++ -o /dev/null -x c /dev/null 1>&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+Index: eglibc-2.13/configure.in
+===================================================================
+--- eglibc-2.13.orig/configure.in 2011-10-06 19:31:36.000000000 -0400
++++ eglibc-2.13/configure.in 2011-10-06 19:33:06.000000000 -0400
+@@ -1792,7 +1792,7 @@
+
+ AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl
+ if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector
+- -o /dev/null -c -x c /dev/null 1>&AS_MESSAGE_LOG_FD])
++ -o /dev/null -x c /dev/null 1>&AS_MESSAGE_LOG_FD])
+ then
+ libc_cv_ssp=yes
+ else
diff -ruN eglibc-2.13/debian/patches/series eglibc-2.13.new/debian/patches/series
--- eglibc-2.13/debian/patches/series 2011-10-07 17:40:39.000000000 -0400
+++ eglibc-2.13.new/debian/patches/series 2011-10-06 19:32:45.000000000 -0400
@@ -289,3 +289,4 @@
any/cvs-dlopen-tls.diff
any/submitted-glob_h-ifdef.diff
any/cvs-dl_close-scope-handling.diff
+any/local-fix-libssp-detection.patch
--- End Message ---
--- Begin Message ---
On Fri, Oct 07, 2011 at 06:12:48PM -0400, Kyle Moffett wrote:
> This occurs in particular when trying to bootstrap a cross-compiler for
> a new Debian port; the stage2 cross-compiler does not have libssp
> support causing "undefined reference to `__stack_chk_guard'" errors
> when building EGLIBC.
I believe that this bug is no longer relevant, because we no longer do a
three-stage bootstrap dance. The issue here is with stage2, but that's
the stage that got discarded. Only gcc stage1, glibc stage2 and gcc
stage3 are left. For that reason, I think this bug has become obsolete.
I'm closing it. Please reopen if you think this is in error.
Helmut
--- End Message ---