[PATCH] Add CFLAGS to compile mips purgatory

Maxim Uvarov muvarov at gmail.com
Wed Sep 1 08:19:32 EDT 2010


Required in case if "-mabi=64" option was specified to build 64 bit mips
application, if not compiler tries to link 64 bit binaries with 32 bit
system libraries.
Signed-off-by: Maxim Uvarov <muvarov at gmail.com>
---

 kexec/Makefile     |    2 +-
 purgatory/Makefile |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kexec/Makefile b/kexec/Makefile
index 77f37ae..23385fc 100644
--- a/kexec/Makefile
+++ b/kexec/Makefile
@@ -77,7 +77,7 @@ KEXEC_MANPAGE = $(MANDIR)/man8/kexec.8
 
 $(KEXEC): $(KEXEC_OBJS) $(UTIL_LIB)
 	@$(MKDIR) -p $(@D)
-	$(LINK.o) -o $@ $^ $(LIBS)
+	$(LINK.o) -o $@ $^ $(CFLAGS) $(LIBS)
 
 $(KEXEC): CPPFLAGS+=-I$(srcdir)/kexec/arch/$(ARCH)/include
 
diff --git a/purgatory/Makefile b/purgatory/Makefile
index aa3a788..ea0c19a 100644
--- a/purgatory/Makefile
+++ b/purgatory/Makefile
@@ -61,7 +61,7 @@ $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
 
 $(PURGATORY): $(PURGATORY_OBJS)
 	$(MKDIR) -p $(@D)
-	$(CC) $(LDFLAGS) -o $@ $^
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
 
 #	$(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) --no-undefined -e purgatory_start -r -o $@ $(PURGATORY_OBJS) $(UTIL_LIB)
 


Best regards,
Maxim Uvarov.





More information about the kexec mailing list