kexec-tools-klibc-static_2.0.1: set LD options for static. Fix
authorAndrea Adami <andrea.adami@gmail.com>
Wed, 30 Sep 2009 00:18:42 +0000 (02:18 +0200)
committerAndrea Adami <andrea.adami@gmail.com>
Wed, 30 Sep 2009 00:18:42 +0000 (02:18 +0200)
fuzzyness. WIP

recipes/kexec/files/kexec-tools-2-klibc.patch

index c9faf96..4065af7 100644 (file)
@@ -144,7 +144,7 @@ Index: kexec-tools-2.0.1/kexec/kexec.c
 ===================================================================
 --- kexec-tools-2.0.1.orig/kexec/kexec.c       2008-02-24 14:15:46.950825917 +0100
 +++ kexec-tools-2.0.1/kexec/kexec.c    2009-09-26 01:58:53.545624148 +0200
-@@ -38,9 +38,8 @@
+@@ -38,9 +38,9 @@
 
  #include "config.h"
 
@@ -152,11 +152,12 @@ Index: kexec-tools-2.0.1/kexec/kexec.c
 -#include <zlib.h>
 -#endif
 +#include "zlib.h"
++
 +
  #include <sha256.h>
  #include "kexec.h"
  #include "kexec-syscall.h"
-@@ -554,6 +554,6 @@
+@@ -555,6 +555,6 @@
  }
 
 -#if HAVE_LIBZ
@@ -227,9 +228,9 @@ Index: kexec-tools-2.0.1/kdump/kdump.c
 
 Index: kexec-tools-2.0.1/kexec/kexec.h
 ===================================================================
---- kexec-tools-2.0.1.orig/kexec/kexec.h.old   2008-05-16 13:28:19.000000000 +0200
+--- kexec-tools-2.0.1.orig/kexec/kexec.h       2008-05-16 13:28:19.000000000 +0200
 +++ kexec-tools-2.0.1/kexec/kexec.h    2009-09-16 17:32:15.000000000 +0200
-@@ -197,7 +197,7 @@
+@@ -203,7 +203,7 @@
  extern char *slurp_file(const char *filename, off_t *r_size);
  extern char *slurp_file_len(const char *filename, off_t size);
  extern char *slurp_decompress_file(const char *filename, off_t *r_size);
@@ -238,3 +239,40 @@ Index: kexec-tools-2.0.1/kexec/kexec.h
  extern void add_segment(struct kexec_info *info,
        const void *buf, size_t bufsz, unsigned long base, size_t memsz);
  extern void add_segment_phys_virt(struct kexec_info *info,
+
+Index: kexec-tools-2.0.1/Makefile.in
+===================================================================
+--- kexec-tools-2.0.1.orig/Makefile.in 2009-09-29 23:49:47.000000000 +0200
++++ kexec-tools-2.0.1/Makefile.in      2009-09-29 23:49:09.000000000 +0200
+@@ -46,7 +46,7 @@
+ # where necessary.
+ CPPFLAGS      = @CPPFLAGS@ -I$(srcdir)/include -I$(srcdir)/util_lib/include \
+                       -Iinclude/
+-CFLAGS                = @CFLAGS@ -fno-strict-aliasing -Wall -Wstrict-prototypes
++CFLAGS                = @CFLAGS@ -static -fno-strict-aliasing -Wall -Wstrict-prototypes
+ PURGATORY_EXTRA_CFLAGS = @PURGATORY_EXTRA_CFLAGS@
+ ASFLAGS               = @ASFLAGS@
+ LDFLAGS               = @LDFLAGS@
+
+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 @@
+ $(PURGATORY): CC=$(TARGET_CC)
+ $(PURGATORY): CFLAGS+=$(PURGATORY_EXTRA_CFLAGS) \
+                     $($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
+-                    -Os -fno-builtin -ffreestanding
++                    -Os -fno-builtin -ffreestanding -nostdinc
+
+ $(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
+
+ $(PURGATORY): $(PURGATORY_OBJS)