update the other patch
authorBdale Garbee <bdale@gag.com>
Fri, 29 Jun 2012 17:13:28 +0000 (11:13 -0600)
committerBdale Garbee <bdale@gag.com>
Fri, 29 Jun 2012 17:13:28 +0000 (11:13 -0600)
debian/patches/cross-build.diff

index f632a23a0f96adb28581d72e91152100f88f262c..fc607cedbd40064243df4834f241b20b579ec635 100644 (file)
@@ -1,35 +1,60 @@
-Description: Upstream changes introduced in version 3.12-3
- This patch has been created by dpkg-source during the package build.
- Here's the last changelog entry, hopefully it gives details on why
- those changes were made:
- .
- elilo (3.12-3) unstable; urgency=low
- .
-   * fix paths and options to build both 32 and 64 bit versions on either
-     flavor of build host, closes: #574713
-   * don't generate noise when following symlink since that's now the normal
-     situation, closes: #581068
- .
- The person named in the Author field signed this changelog entry.
-Author: Bdale Garbee <bdale@gag.com>
-Bug-Debian: http://bugs.debian.org/574713
-Bug-Debian: http://bugs.debian.org/581068
-
----
-The information above should follow the Patch Tagging Guidelines, please
-checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
-are templates for supplementary fields that you might want to add:
-
-Origin: <vendor|upstream|other>, <url of original patch>
-Bug: <url in upstream bugtracker>
-Bug-Debian: http://bugs.debian.org/<bugnumber>
-Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
-Forwarded: <no|not-needed|url proving that it has been forwarded>
-Reviewed-By: <name and email of someone who approved the patch>
-Last-Update: <YYYY-MM-DD>
-
---- elilo-3.12.orig/Makefile
-+++ elilo-3.12/Makefile
+diff --git a/Make.defaults b/Make.defaults
+index e541ea8..7812807 100644
+--- a/Make.defaults
++++ b/Make.defaults
+@@ -62,13 +62,15 @@ EFICRT0       = /usr/lib
+ CDIR    := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
+ TOPDIR  =
+-ARCH     = $(shell uname -m | sed s,i[3456789]86,ia32,)
++HOSTARCH   = $(shell dpkg-architecture -qDEB_BUILD_ARCH | sed s,i[3456789]86,ia32, | sed s,amd64,x86_64, )
++ARCH     := $(shell dpkg-architecture -qDEB_BUILD_ARCH | sed s,i[3456789]86,ia32, | sed s,amd64,x86_64, )
+ INCDIR           = -I. -I$(TOPDIR) -I$(EFIINC) -I$(EFIINC)/$(ARCH) -I$(EFIINC)/protocol -I$(TOPDIR)/efi110
+ CPPFLAGS   = -DCONFIG_$(ARCH) 
+ OPTIMFLAGS = -O2 
+ DEBUGFLAGS = -Wall
+-CFLAGS     = $(OPTIMFLAGS) -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar $(DEBUGFLAGS)
++CFLAGS     = $(ARCH3264) $(OPTIMFLAGS) -fpic -fshort-wchar $(DEBUGFLAGS)
++ASFLAGS    = $(ARCH3264)
+ LDFLAGS          = -nostdlib -znocombreloc
+ INSTALL          = install
+@@ -108,10 +110,30 @@ OBJCOPY          = $(prefix)objcopy
+ # Use Modified binutils that supports x86_64 using UEFI ABI
+ ifeq ($(ARCH), x86_64)
++  ifeq ($(HOSTARCH), ia32)
++      ARCH3264 = -m64
++      LD3264 = -melf_x86_64
++
++      GNUEFILIB := $(GNUEFILIB)64
++      EFILIB    := $(EFILIB)64
++      EFICRT0   := $(EFICRT0)64
++  endif
++
+         CFLAGS   += -DEFI_FUNCTION_WRAPPER
+       OBJCOPY   = /usr/bin/objcopy
+ endif
++ifeq ($(ARCH), ia32)
++  ifeq ($(HOSTARCH), x86_64)
++      ARCH3264 = -m32
++      LD3264 = -melf_i386
++
++      GNUEFILIB := /usr/lib32
++      EFILIB    := /usr/lib32
++      EFICRT0   := /usr/lib32
++  endif
++endif
++
+ ifeq ($(ARCH),ia64)
+  GCC_VERSION=$(shell $(CROSS_COMPILE)$(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
+diff --git a/Makefile b/Makefile
+index f0efebd..9d82cbf 100644
+--- a/Makefile
++++ b/Makefile
 @@ -25,15 +25,19 @@
  # to use this program.
  #
@@ -69,8 +94,10 @@ Last-Update: <YYYY-MM-DD>
  
 -include Make.rules
 +include $(SRCDIR)/Make.rules
---- elilo-3.12.orig/devschemes/Makefile
-+++ elilo-3.12/devschemes/Makefile
+diff --git a/choosers/Makefile b/choosers/Makefile
+index 9915f48..85d31c7 100644
+--- a/choosers/Makefile
++++ b/choosers/Makefile
 @@ -23,10 +23,15 @@
  # to use this program.
  #
@@ -88,19 +115,22 @@ Last-Update: <YYYY-MM-DD>
  
 -TOPDIR=$(CDIR)/..
  
- FILES=simple.o
+ FILES=
  
-@@ -40,7 +45,7 @@ all: $(TARGET)
- #      without doing make clean.
- #
- $(TARGET): $(FILES)
--      $(LD) -r -o $@ $(FILES)
-+      $(LD) $(LD3264) -r -o $@ $(FILES)
+@@ -47,7 +52,8 @@ $(TARGET): $(TOPDIR)/Make.defaults $(FILES)
+               echo "You need to define at least one chooser in Make.defaults"; \
+               exit 1; \
+       fi
+-      $(LD) -o $@ -r $(FILES)
++      $(LD) $(LD3264) -o $@ -r $(FILES)
++
  
  clean:
        $(RM) -f $(TARGET) $(FILES)
---- elilo-3.12.orig/ia64/Makefile
-+++ elilo-3.12/ia64/Makefile
+diff --git a/devschemes/Makefile b/devschemes/Makefile
+index 6ac05af..5328cb1 100644
+--- a/devschemes/Makefile
++++ b/devschemes/Makefile
 @@ -23,10 +23,15 @@
  # to use this program.
  #
@@ -118,10 +148,21 @@ Last-Update: <YYYY-MM-DD>
  
 -TOPDIR=$(CDIR)/..
  
- FILES=system.o config.o fpswa.o plain_loader.o gzip_loader.o \
-       gzip.o memset.o memcpy.o setjmp.o longjmp.o
---- elilo-3.12.orig/choosers/Makefile
-+++ elilo-3.12/choosers/Makefile
+ FILES=simple.o
+@@ -40,7 +45,7 @@ all: $(TARGET)
+ #      without doing make clean.
+ #
+ $(TARGET): $(FILES)
+-      $(LD) -r -o $@ $(FILES)
++      $(LD) $(LD3264) -r -o $@ $(FILES)
+ clean:
+       $(RM) -f $(TARGET) $(FILES)
+diff --git a/fs/Makefile b/fs/Makefile
+index 8e422b2..0bb303f 100644
+--- a/fs/Makefile
++++ b/fs/Makefile
 @@ -23,10 +23,15 @@
  # to use this program.
  #
@@ -140,23 +181,20 @@ Last-Update: <YYYY-MM-DD>
 -TOPDIR=$(CDIR)/..
  
  FILES=
-@@ -43,11 +48,11 @@ TARGET=choosers.o
- all: $(TARGET)
- $(TARGET): check-choosers $(TOPDIR)/Make.defaults $(FILES)
--      $(LD) -o $@ -r $(FILES)
-+      $(LD) $(LD3264) -o $@ -r $(FILES)
+ ifeq ($(CONFIG_localfs),y)
+@@ -59,7 +64,7 @@ $(TARGET): $(TOPDIR)/Make.defaults $(FILES)
+               echo "You need to define at least one filesystem in Make.defaults"; \
+               exit 1; \
+       fi
+-      $(LD) -r -o $@ $(FILES)
++      $(LD) $(LD3264) -r -o $@ $(FILES)
  
  clean:
        $(RM) -f $(TARGET) $(FILES)
--      
-+
- check-choosers:
-       @if [ -n "$(FILES)" ]; then \
-               exit 0; \
---- elilo-3.12.orig/ia32/Makefile
-+++ elilo-3.12/ia32/Makefile
+diff --git a/ia32/Makefile b/ia32/Makefile
+index 353ae67..c5f421b 100644
+--- a/ia32/Makefile
++++ b/ia32/Makefile
 @@ -23,10 +23,15 @@
  # to use this program.
  #
@@ -193,8 +231,10 @@ Last-Update: <YYYY-MM-DD>
  
  clean:
        $(RM) -f $(TARGET) $(FILES)
---- elilo-3.12.orig/x86_64/Makefile
-+++ elilo-3.12/x86_64/Makefile
+diff --git a/ia64/Makefile b/ia64/Makefile
+index a243d0f..bee0a2b 100644
+--- a/ia64/Makefile
++++ b/ia64/Makefile
 @@ -23,10 +23,15 @@
  # to use this program.
  #
@@ -212,27 +252,12 @@ Last-Update: <YYYY-MM-DD>
  
 -TOPDIR=$(CDIR)/..
  
- FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o
- #FILES=system.o config.o plain_loader.o
-@@ -38,13 +43,13 @@ all: $(TARGET)
- system.o: rmswitch.h
- rmswitch.h: bin_to_h.c rmswitch.S
--      $(CC) -o bin_to_h bin_to_h.c
--      $(AS) -o rmswitch.o rmswitch.S
-+      $(CC) -o bin_to_h $(SRCDIR)/bin_to_h.c
-+      $(AS) -o rmswitch.o $(SRCDIR)/rmswitch.S
-       $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o
-       ./bin_to_h <rmswitch >rmswitch.h
- $(TARGET): $(FILES)
--      $(LD) -r -o $@ $(FILES)
-+      $(LD) $(LD3264) -r -o $@ $(FILES)
- clean:
-       $(RM) -f $(TARGET) $(FILES)
---- elilo-3.12.orig/tools/Makefile
-+++ elilo-3.12/tools/Makefile
+ FILES=system.o config.o fpswa.o plain_loader.o gzip_loader.o \
+       gzip.o memset.o memcpy.o setjmp.o longjmp.o
+diff --git a/tools/Makefile b/tools/Makefile
+index 8858224..97083d7 100644
+--- a/tools/Makefile
++++ b/tools/Makefile
 @@ -23,10 +23,15 @@
  # to use this program.
  #
@@ -252,8 +277,10 @@ Last-Update: <YYYY-MM-DD>
  
  FILES=eliloalt.o
  TARGET=eliloalt
---- elilo-3.12.orig/fs/Makefile
-+++ elilo-3.12/fs/Makefile
+diff --git a/x86_64/Makefile b/x86_64/Makefile
+index 4af4b8d..7ade312 100644
+--- a/x86_64/Makefile
++++ b/x86_64/Makefile
 @@ -23,10 +23,15 @@
  # to use this program.
  #
@@ -271,12 +298,20 @@ Last-Update: <YYYY-MM-DD>
  
 -TOPDIR=$(CDIR)/..
  
- FILES=
- ifeq ($(CONFIG_localfs),y)
-@@ -55,7 +60,7 @@ all: $(TARGET)
- #      without doing make clean.
- #
- $(TARGET): check-filesystems $(TOPDIR)/Make.defaults $(FILES)
+ FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o
+ #FILES=system.o config.o plain_loader.o
+@@ -38,13 +43,13 @@ all: $(TARGET)
+ system.o: rmswitch.h
+ rmswitch.h: bin_to_h.c rmswitch.S
+-      $(CC) -o bin_to_h bin_to_h.c
+-      $(AS) -o rmswitch.o rmswitch.S
++      $(CC) -o bin_to_h $(SRCDIR)/bin_to_h.c
++      $(AS) -o rmswitch.o $(SRCDIR)/rmswitch.S
+       $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o
+       ./bin_to_h <rmswitch >rmswitch.h
+ $(TARGET): $(FILES)
 -      $(LD) -r -o $@ $(FILES)
 +      $(LD) $(LD3264) -r -o $@ $(FILES)