GNU bug report logs - #27489
glibc fails to build on i686

Previous Next

Package: guix;

Reported by: Ricardo Wurmus <rekado <at> elephly.net>

Date: Sun, 25 Jun 2017 19:21:01 UTC

Severity: normal

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 27489 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 27489 <at> debbugs.gnu.org
Subject: Re: bug#27489: glibc fails to build on i686
Date: Sun, 25 Jun 2017 21:23:44 -0400
Mark H Weaver <mhw <at> netris.org> writes:

> The problem is that glibc-CVE-2017-1000366-pt2.patch introduces a
> reference to 'strcspn' in rtld.c.  This causes the glibc build system to
> automatically add 'rtld-strcspn.os' and 'rtld-strcspn-c.os' to the list
> of objects to be built.  When 'rtld-strcspn-c.os' is built, "-msse4" is
> passed to the compiler (along with "-mno-sse" near the end).

I found a patch in Debian to address this issue:

--8<---------------cut here---------------start------------->8---
2017-06-14  Florian Weimer  <fweimer <at> redhat.com>

	* sysdeps/i386/i686/multiarch/strcspn-c.c: Add IS_IN (libc) guard.
	* sysdeps/i386/i686/multiarch/varshift.c: Likewise.

--- a/sysdeps/i386/i686/multiarch/strcspn-c.c
+++ b/sysdeps/i386/i686/multiarch/strcspn-c.c
@@ -1,2 +1,4 @@
-#define __strcspn_sse2 __strcspn_ia32
-#include <sysdeps/x86_64/multiarch/strcspn-c.c>
+#if IS_IN (libc)
+# define __strcspn_sse2 __strcspn_ia32
+# include <sysdeps/x86_64/multiarch/strcspn-c.c>
+#endif
--- a/sysdeps/i386/i686/multiarch/varshift.c
+++ b/sysdeps/i386/i686/multiarch/varshift.c
@@ -1 +1,3 @@
-#include <sysdeps/x86_64/multiarch/varshift.c>
+#if IS_IN (libc)
+# include <sysdeps/x86_64/multiarch/varshift.c>
+#endif
--8<---------------cut here---------------end--------------->8---

With this patch added, the grafted glibc builds successfully on i686.
I'm doing a few more tests, and then will push this in the next hour or
two.

      Mark




This bug report was last modified 7 years and 330 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.