r2159 - / trunk/patches

jim at linuxfromscratch.org jim at linuxfromscratch.org
Sat Jul 29 12:40:03 PDT 2006


Author: jim
Date: 2006-07-29 13:40:02 -0600 (Sat, 29 Jul 2006)
New Revision: 2159

Added:
   trunk/patches/e2fsprogs-1.39-cross-1.patch
Modified:
   /
Log:
 r4953 at server (orig r2284):  ken | 2006-07-29 11:16:04 -0700
 Allow e2fsprogs-1.39 to cross-compile for ppc64 from a host using 'long long' 64-bit types.



Property changes on: 
___________________________________________________________________
Name: svk:merge
   - b6734a72-470d-0410-b049-f317dca95413:/:2281
   + b6734a72-470d-0410-b049-f317dca95413:/:2284

Added: trunk/patches/e2fsprogs-1.39-cross-1.patch
===================================================================
--- trunk/patches/e2fsprogs-1.39-cross-1.patch	                        (rev 0)
+++ trunk/patches/e2fsprogs-1.39-cross-1.patch	2006-07-29 19:40:02 UTC (rev 2159)
@@ -0,0 +1,315 @@
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2006-07-29
+Initial Package Version: 1.39
+Origin: Self.
+Upstream status: not submitted, pending comments on bug 1529730 for e2fsprogs.
+Description:
+ Revert changes to two .h.in files which prevent cross-compilation for powerpc64
+from x86 and x86_64.  I believe the problem will appear whenever the machine
+doing the build uses long long for __{s,u}64and the target uses long, and perhaps
+also the other way around.  The following arches that are in the book use long:
+alpha, mips64, ppc64, sparc64.  None except ppc64 have reported this, so perhaps
+there is something different there.
+
+--- e2fsprogs-1.39/lib/ext2fs/ext2_types.h.in	2006-04-09 02:39:39.000000000 +0100
++++ e2fsprogs-1.38/lib/ext2fs/ext2_types.h.in	2004-04-03 16:20:26.000000000 +0100
+@@ -7,128 +7,55 @@
+ 	!defined(_EXT2_TYPES_H))
+ #define _EXT2_TYPES_H
+ 
+- at ASM_TYPES_HEADER@
+-
+-#ifdef __U8_TYPEDEF
+-typedef __U8_TYPEDEF __u8;
+-#else
+ typedef unsigned char __u8;
+-#endif
+-
+-#ifdef __S8_TYPEDEF
+-typedef __S8_TYPEDEF __s8;
+-#else
+ typedef signed char __s8;
+-#endif
+ 
+-#ifdef __U16_TYPEDEF
+-typedef __U16_TYPEDEF __u16;
++#if (@SIZEOF_INT@ == 8)
++typedef int		__s64;
++typedef unsigned int	__u64;
+ #else
+-#if (@SIZEOF_INT@ == 2)
+-typedef	unsigned int	__u16;
++#if (@SIZEOF_LONG@ == 8)
++typedef long		__s64;
++typedef unsigned long	__u64;
+ #else
+-#if (@SIZEOF_SHORT@ == 2)
+-typedef	unsigned short	__u16;
++#if (@SIZEOF_LONG_LONG@ == 8)
++#if defined(__GNUC__)
++typedef __signed__ long long 	__s64;
+ #else
+-  ?==error: undefined 16 bit type
+-#endif /* SIZEOF_SHORT == 2 */
+-#endif /* SIZEOF_INT == 2 */
+-#endif /* __U16_TYPEDEF */
++typedef signed long long 	__s64;
++#endif /* __GNUC__ */
++typedef unsigned long long	__u64;
++#endif /* SIZEOF_LONG_LONG == 8 */
++#endif /* SIZEOF_LONG == 8 */
++#endif /* SIZEOF_INT == 8 */
+ 
+-#ifdef __S16_TYPEDEF
+-typedef __S16_TYPEDEF __s16;
+-#else
+ #if (@SIZEOF_INT@ == 2)
+ typedef	int		__s16;
++typedef	unsigned int	__u16;
+ #else
+ #if (@SIZEOF_SHORT@ == 2)
+ typedef	short		__s16;
++typedef	unsigned short	__u16;
+ #else
+   ?==error: undefined 16 bit type
+ #endif /* SIZEOF_SHORT == 2 */
+ #endif /* SIZEOF_INT == 2 */
+-#endif /* __S16_TYPEDEF */
+-
+-
+-#ifdef __U32_TYPEDEF
+-typedef __U32_TYPEDEF __u32;
+-#else
+-#if (@SIZEOF_INT@ == 4)
+-typedef	unsigned int	__u32;
+-#else
+-#if (@SIZEOF_LONG@ == 4)
+-typedef	unsigned long	__u32;
+-#else
+-#if (@SIZEOF_SHORT@ == 4)
+-typedef	unsigned short	__u32;
+-#else
+- ?== error: undefined 32 bit type
+-#endif /* SIZEOF_SHORT == 4 */
+-#endif /* SIZEOF_LONG == 4 */
+-#endif /* SIZEOF_INT == 4 */
+-#endif /* __U32_TYPEDEF */
+ 
+-#ifdef __S32_TYPEDEF
+-typedef __S32_TYPEDEF __s32;
+-#else
+ #if (@SIZEOF_INT@ == 4)
+ typedef	int		__s32;
++typedef	unsigned int	__u32;
+ #else
+ #if (@SIZEOF_LONG@ == 4)
+ typedef	long		__s32;
++typedef	unsigned long	__u32;
+ #else
+ #if (@SIZEOF_SHORT@ == 4)
+ typedef	short		__s32;
++typedef	unsigned short	__u32;
+ #else
+  ?== error: undefined 32 bit type
+ #endif /* SIZEOF_SHORT == 4 */
+ #endif /* SIZEOF_LONG == 4 */
+ #endif /* SIZEOF_INT == 4 */
+-#endif /* __S32_TYPEDEF */
+-
+-#ifdef __U64_TYPEDEF
+-typedef __U64_TYPEDEF __u64;
+-#else
+-#if (@SIZEOF_INT@ == 8)
+-typedef unsigned int	__u64;
+-#else
+-#if (@SIZEOF_LONG@ == 8)
+-typedef unsigned long	__u64;
+-#else
+-#if (@SIZEOF_LONG_LONG@ == 8)
+-typedef unsigned long long	__u64;
+-#endif /* SIZEOF_LONG_LONG == 8 */
+-#endif /* SIZEOF_LONG == 8 */
+-#endif /* SIZEOF_INT == 8 */
+-#endif /* __U64_TYPEDEF */
+-
+-#ifdef __S64_TYPEDEF
+-typedef __S64_TYPEDEF __s64;
+-#else
+-#if (@SIZEOF_INT@ == 8)
+-typedef int		__s64;
+-#else
+-#if (@SIZEOF_LONG@ == 8)
+-typedef long		__s64;
+-#else
+-#if (@SIZEOF_LONG_LONG@ == 8)
+-#if defined(__GNUC__)
+-typedef __signed__ long long 	__s64;
+-#else
+-typedef signed long long 	__s64;
+-#endif /* __GNUC__ */
+-#endif /* SIZEOF_LONG_LONG == 8 */
+-#endif /* SIZEOF_LONG == 8 */
+-#endif /* SIZEOF_INT == 8 */
+-#endif /* __S64_TYPEDEF */
+-
+-#undef __S8_TYPEDEF
+-#undef __U8_TYPEDEF
+-#undef __S16_TYPEDEF
+-#undef __U16_TYPEDEF
+-#undef __S32_TYPEDEF
+-#undef __U32_TYPEDEF
+-#undef __S64_TYPEDEF
+-#undef __U64_TYPEDEF
+ 
+ #endif /* _*_TYPES_H */
+--- e2fsprogs-1.39/lib/blkid/blkid_types.h.in	2006-04-09 02:43:44.000000000 +0100
++++ e2fsprogs-1.38/lib/blkid/blkid_types.h.in	2004-03-30 07:55:10.000000000 +0100
+@@ -7,128 +7,55 @@
+ 	!defined(_EXT2_TYPES_H))
+ #define _BLKID_TYPES_H
+ 
+- at ASM_TYPES_HEADER@
+-
+-#ifdef __U8_TYPEDEF
+-typedef __U8_TYPEDEF __u8;
+-#else
+ typedef unsigned char __u8;
+-#endif
+-
+-#ifdef __S8_TYPEDEF
+-typedef __S8_TYPEDEF __s8;
+-#else
+ typedef signed char __s8;
+-#endif
+ 
+-#ifdef __U16_TYPEDEF
+-typedef __U16_TYPEDEF __u16;
++#if (@SIZEOF_INT@ == 8)
++typedef int		__s64;
++typedef unsigned int	__u64;
+ #else
+-#if (@SIZEOF_INT@ == 2)
+-typedef	unsigned int	__u16;
++#if (@SIZEOF_LONG@ == 8)
++typedef long		__s64;
++typedef unsigned long	__u64;
+ #else
+-#if (@SIZEOF_SHORT@ == 2)
+-typedef	unsigned short	__u16;
++#if (@SIZEOF_LONG_LONG@ == 8)
++#if defined(__GNUC__)
++typedef __signed__ long long 	__s64;
+ #else
+-  ?==error: undefined 16 bit type
+-#endif /* SIZEOF_SHORT == 2 */
+-#endif /* SIZEOF_INT == 2 */
+-#endif /* __U16_TYPEDEF */
++typedef signed long long 	__s64;
++#endif /* __GNUC__ */
++typedef unsigned long long	__u64;
++#endif /* SIZEOF_LONG_LONG == 8 */
++#endif /* SIZEOF_LONG == 8 */
++#endif /* SIZEOF_INT == 8 */
+ 
+-#ifdef __S16_TYPEDEF
+-typedef __S16_TYPEDEF __s16;
+-#else
+ #if (@SIZEOF_INT@ == 2)
+ typedef	int		__s16;
++typedef	unsigned int	__u16;
+ #else
+ #if (@SIZEOF_SHORT@ == 2)
+ typedef	short		__s16;
++typedef	unsigned short	__u16;
+ #else
+   ?==error: undefined 16 bit type
+ #endif /* SIZEOF_SHORT == 2 */
+ #endif /* SIZEOF_INT == 2 */
+-#endif /* __S16_TYPEDEF */
+-
+-
+-#ifdef __U32_TYPEDEF
+-typedef __U32_TYPEDEF __u32;
+-#else
+-#if (@SIZEOF_INT@ == 4)
+-typedef	unsigned int	__u32;
+-#else
+-#if (@SIZEOF_LONG@ == 4)
+-typedef	unsigned long	__u32;
+-#else
+-#if (@SIZEOF_SHORT@ == 4)
+-typedef	unsigned short	__u32;
+-#else
+- ?== error: undefined 32 bit type
+-#endif /* SIZEOF_SHORT == 4 */
+-#endif /* SIZEOF_LONG == 4 */
+-#endif /* SIZEOF_INT == 4 */
+-#endif /* __U32_TYPEDEF */
+ 
+-#ifdef __S32_TYPEDEF
+-typedef __S32_TYPEDEF __s32;
+-#else
+ #if (@SIZEOF_INT@ == 4)
+ typedef	int		__s32;
++typedef	unsigned int	__u32;
+ #else
+ #if (@SIZEOF_LONG@ == 4)
+ typedef	long		__s32;
++typedef	unsigned long	__u32;
+ #else
+ #if (@SIZEOF_SHORT@ == 4)
+ typedef	short		__s32;
++typedef	unsigned short	__u32;
+ #else
+  ?== error: undefined 32 bit type
+ #endif /* SIZEOF_SHORT == 4 */
+ #endif /* SIZEOF_LONG == 4 */
+ #endif /* SIZEOF_INT == 4 */
+-#endif /* __S32_TYPEDEF */
+-
+-#ifdef __U64_TYPEDEF
+-typedef __U64_TYPEDEF __u64;
+-#else
+-#if (@SIZEOF_INT@ == 8)
+-typedef unsigned int	__u64;
+-#else
+-#if (@SIZEOF_LONG@ == 8)
+-typedef unsigned long	__u64;
+-#else
+-#if (@SIZEOF_LONG_LONG@ == 8)
+-typedef unsigned long long	__u64;
+-#endif /* SIZEOF_LONG_LONG == 8 */
+-#endif /* SIZEOF_LONG == 8 */
+-#endif /* SIZEOF_INT == 8 */
+-#endif /* __U64_TYPEDEF */
+-
+-#ifdef __S64_TYPEDEF
+-typedef __S64_TYPEDEF __s64;
+-#else
+-#if (@SIZEOF_INT@ == 8)
+-typedef int		__s64;
+-#else
+-#if (@SIZEOF_LONG@ == 8)
+-typedef long		__s64;
+-#else
+-#if (@SIZEOF_LONG_LONG@ == 8)
+-#if defined(__GNUC__)
+-typedef __signed__ long long 	__s64;
+-#else
+-typedef signed long long 	__s64;
+-#endif /* __GNUC__ */
+-#endif /* SIZEOF_LONG_LONG == 8 */
+-#endif /* SIZEOF_LONG == 8 */
+-#endif /* SIZEOF_INT == 8 */
+-#endif /* __S64_TYPEDEF */
+-
+-#undef __S8_TYPEDEF
+-#undef __U8_TYPEDEF
+-#undef __S16_TYPEDEF
+-#undef __U16_TYPEDEF
+-#undef __S32_TYPEDEF
+-#undef __U32_TYPEDEF
+-#undef __S64_TYPEDEF
+-#undef __U64_TYPEDEF
+ 
+ #endif /* _*_TYPES_H */




More information about the cross-lfs mailing list