From: Friedrich Oslage <bluebird@gentoo.org>
To: sparclinux@vger.kernel.org
Subject: Compiling glibc with 2.6.28 linux headers
Date: Sat, 13 Dec 2008 15:55:02 +0000 [thread overview]
Message-ID: <4943DAD6.7070402@gentoo.org> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
when compiling glibc(2.9, 20081208 snapshot) with linux 2.6.28-rc8
headers I get a lot of errors like this one:
In file included from
/tmp/toolchain-build/rootfs/usr/include/asm/byteorder.h:49,
from
/tmp/toolchain-build/rootfs/usr/include/linux/atalk.h:4,
from ../sysdeps/unix/sysv/linux/netatalk/at.h:25,
from ../sysdeps/unix/sysv/linux/sa_len.c:22:
/tmp/toolchain-build/rootfs/usr/include/linux/byteorder.h:8:3: error:
#error Fix asm/byteorder.h to define one endianness
About a month ago arch/sparc/include/asm/byteorder.h was changed to
include the new linux/byteorder.h instead of the old
linux/byteorder/big_endian.h. The new one panics if both __LITTLE_ENDIAN
and __BIG_ENDIAN are defined.
But since glibc's string/endian.h(/usr/include/endian.h) always defines
__BIG_ENDIAN and __LITTLE_ENDIAN it may occur, depending on the
includes, that both are defined when asm/byteorder.h is included.
My assumption is that asm/byteorder.h should ensure that only one of
these is defined.
After applying the patch below compiling glibc works again. But when
compiling the kernel I get
In file included from drivers/scsi/qla2xxx/qla_dfs.c:7:
drivers/scsi/qla2xxx/qla_def.h:1487:7: warning: "__LITTLE_ENDIAN" is not
defined
Which sould be okay...I think the #elif should really be an #elif
defined but that's another thing ;)
Is this the right solution or did I miss anything?
Cheers,
Friedrich
- --- arch/sparc/include/asm/byteorder.h
+++ arch/sparc/include/asm/byteorder.h
@@ -5,6 +5,9 @@
#include <asm/asi.h>
#define __BIG_ENDIAN
+#ifdef __LITTLE_ENDIAN
+# undef __LITTLE_ENDIAN
+#endif
#ifdef CONFIG_SPARC32
#define __SWAB_64_THRU_32__
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAklD2tYACgkQknxn9PmJ76XvEACZAajpv/iRLAeEHXp7cIWBCEEX
V9kAnRZ0BBDwLrMENDsPsYMuPWpLDlKv
HUQ
-----END PGP SIGNATURE-----
next reply other threads:[~2008-12-13 15:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-13 15:55 Friedrich Oslage [this message]
2008-12-16 9:13 ` Compiling glibc with 2.6.28 linux headers David Miller
2008-12-16 9:13 ` David Miller
2008-12-17 1:22 ` Harvey Harrison
2008-12-17 1:22 ` Harvey Harrison
2008-12-18 1:46 ` [PATCH-2.6.28 final] byteorder: fix new headers for userspace Harvey Harrison
2008-12-18 1:46 ` Harvey Harrison
2008-12-18 20:09 ` Linus Torvalds
2008-12-18 20:09 ` Linus Torvalds
2008-12-18 20:47 ` Linus Torvalds
2008-12-18 20:47 ` Linus Torvalds
2008-12-18 20:53 ` Harvey Harrison
2008-12-18 20:53 ` Harvey Harrison
2008-12-19 8:08 ` Arjan van de Ven
2008-12-19 8:08 ` Arjan van de Ven
2008-12-19 16:37 ` Harvey Harrison
2008-12-19 16:37 ` Harvey Harrison
2009-01-06 10:23 ` Gerd Hoffmann
2009-01-06 10:23 ` Gerd Hoffmann
2009-01-06 16:41 ` Harvey Harrison
2009-01-06 16:41 ` Harvey Harrison
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4943DAD6.7070402@gentoo.org \
--to=bluebird@gentoo.org \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.