kexec-tools-klibc-static_2.0.1: rework patches. Still won't build. WIP
authorAndrea Adami <andrea.adami@gmail.com>
Fri, 2 Oct 2009 22:36:09 +0000 (00:36 +0200)
committerAndrea Adami <andrea.adami@gmail.com>
Fri, 2 Oct 2009 22:39:21 +0000 (00:39 +0200)
recipes/kexec/files/kexec-tools-2-headers.patch
recipes/kexec/files/kexec-tools-2-klibc.patch

index e28b8a1..091e12d 100644 (file)
@@ -65,11 +65,11 @@ Index: kexec-tools-2.0.1/purgatory/arch/arm/include/stdint.h
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
 +++ kexec-tools-2.0.1/purgatory/arch/arm/include/stdint.h      2006-02-06 18:28:37.031096672 +0100
-@@ -0,0 +1,16 @@
+@@ -0,0 +1,31 @@
 +#ifndef STDINT_H
 +#define STDINT_H
 +
-+typedef unsigned long      size_t;
++/*  +typedef unsigned long      size_t;  */
 +
 +typedef unsigned char      uint8_t;
 +typedef unsigned short     uint16_t;
@@ -81,4 +81,19 @@ Index: kexec-tools-2.0.1/purgatory/arch/arm/include/stdint.h
 +typedef signed int         int32_t;
 +typedef signed long long   int64_t;
 +
++/* Types for `void *' pointers.  */
++#if __WORDSIZE == 64
++# ifndef __intptr_t_defined
++typedef long int              intptr_t;
++#  define __intptr_t_defined
++# endif
++typedef unsigned long int     uintptr_t;
++#else
++# ifndef __intptr_t_defined
++typedef int                   intptr_t;
++#  define __intptr_t_defined
++# endif
++typedef unsigned int          uintptr_t;
++#endif
++
 +#endif /* STDINT_H */
index 4065af7..581d8a4 100644 (file)
@@ -254,11 +254,26 @@ Index: kexec-tools-2.0.1/Makefile.in
  ASFLAGS               = @ASFLAGS@
  LDFLAGS               = @LDFLAGS@
 
+Index: kexec-tools-2.0.1/util_lib/include/sha256.h
+===================================================================
+--- kexec-tools-2.0.1.orig/util_lib/include/sha256.h   2008-07-15 02:46:43.000000000 +0200
++++ kexec-tools-2.0.1/util_lib/include/sha256.h                2009-10-02 18:28:45.000000000 +0200
+@@ -1,7 +1,8 @@
+ #ifndef SHA256_H
+ #define SHA256_H
+
+-#include <sys/types.h>
++//#include <sys/types.h>
++#include <stddef.h>
+ #include <stdint.h>
+
+ typedef struct
+
 Index: kexec-tools-2.0.1/purgatory/Makefile
 ===================================================================
 --- kexec-tools-2.0.1.orig/purgatory/Makefile  2008-10-09 00:32:14.000000000 +0200
-+++ kexec-tools-2.0.1/purgatory/Makefile       2009-09-30 00:49:15.000000000 +0200
-@@ -47,15 +47,15 @@
++++ kexec-tools-2.0.1.orig/purgatory/Makefile  2009-10-03 00:28:45.000000000 +0200
+@@ -47,7 +47,7 @@
  $(PURGATORY): CC=$(TARGET_CC)
  $(PURGATORY): CFLAGS+=$(PURGATORY_EXTRA_CFLAGS) \
                      $($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
@@ -267,12 +282,13 @@ Index: kexec-tools-2.0.1/purgatory/Makefile
 
  $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
                        -I$(srcdir)/purgatory/include \
-                       -I$(srcdir)/purgatory/arch/$(ARCH)/include \
-                       -I$(srcdir)/util_lib/include \
-                       -I$(shell $(CC) -print-file-name=include)
- $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
--                      --no-undefined -nostartfiles -nostdlib -nodefaultlibs \
-+                      -Wl,--no-undefined -nostartfiles -nostdlib -nodefaultlibs \
-                       -e purgatory_start -r
+@@ -60,7 +60,8 @@
 
  $(PURGATORY): $(PURGATORY_OBJS)
+       $(MKDIR) -p $(@D)
+-      $(CC) $(LDFLAGS) -o $@ $^
++#     $(CC) $(LDFLAGS) -o $@ $^
++      $(LD) $(LDFLAGS) -o $@ $^
+
+ #     $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) --no-undefined -e purgatory_start -r -o $@ $(PURGATORY_OBJS) $(UTIL_LIB)
+