Skip to contentSkip to conversation

kexec: Use target linker for purgatory

PATCH In review Geoff Levand 2 participants 5 messages Dec 21, 2007 – Feb 12, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kexec: Use target linker for purgatory

From: Geoff Levand <[email protected]>

Pugatory files need to be linked with the target linker, not the build linker.

---

purgatory/Makefile +1 -1
index a543cdb..e7d2f15 100644
@@ -42,7 +42,7 @@ $(PURGATORY): LDFLAGS+=--no-undefined -nostartfiles -nostdlib -nodefaultlibs \
 
 $(PURGATORY): $(PURGATORY_OBJS)
 	$(MKDIR) -p $(@D)
-	$(LD) $(LDFLAGS) -o $@ $^
+	$(CC) $(LDFLAGS) -o $@ $^
 
 #	$(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) --no-undefined -e purgatory_start -r -o $@ $(PURGATORY_OBJS) $(UTIL_LIB)
 

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#1 lore raw

Geoff,

purgatory/Makefile $(PURGATORY): LDFLAGS+=--no-undefined -nostartfiles -nostdlib -nodefaultlibs \ · line 45

Quoted 6 lines

Pugatory files need to be linked with the target linker, not the build linker.

purgatory/Makefile +1 -1
 	$(MKDIR) -p $(@D)
-	$(LD) $(LDFLAGS) -o $@ $^
+	$(CC) $(LDFLAGS) -o $@ $^

Shouldn't that be $(TARGET_CC) then?

Cheers,

Jeremy

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#2 lore raw
Quoted 10 lines · Jeremy Kerr

Geoff,

purgatory/Makefile $(PURGATORY): LDFLAGS+=--no-undefined -nostartfiles -nostdlib -nodefaultlibs \ · line 45

Quoted 6 lines

Pugatory files need to be linked with the target linker, not the build linker.

purgatory/Makefile +1 -1
 	$(MKDIR) -p $(@D)
-	$(LD) $(LDFLAGS) -o $@ $^
+	$(CC) $(LDFLAGS) -o $@ $^

Shouldn't that be $(TARGET_CC) then?

It follows the convention in that makefile. There is this:

  $(PURGATORY): CC=$(TARGET_CC)

-Geoff

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#4 lore raw
In reply to Geoff Levand

Hello...

This needs to be merged.

Quoted 13 lines · Geoff Levand

From: Geoff Levand <[email protected]>

Pugatory files need to be linked with the target linker, not the build linker.

---

purgatory/Makefile +0 -0
index a543cdb..e7d2f15 100644

purgatory/Makefile $(PURGATORY): LDFLAGS+=--no-undefined -nostartfiles -nostdlib -nodefaultlibs \ · line 48

Quoted 8 lines
purgatory/Makefile +1 -1
@@ -42,7 +42,7 @@ $(PURGATORY): LDFLAGS+=--no-undefined -nostartfiles -nostdlib -nodefaultlibs \
 
 $(PURGATORY): $(PURGATORY_OBJS)
 	$(MKDIR) -p $(@D)
-	$(LD) $(LDFLAGS) -o $@ $^
+	$(CC) $(LDFLAGS) -o $@ $^
 
 #	$(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) --no-undefined -e purgatory_start -r -o $@ $(PURGATORY_OBJS) $(UTIL_LIB)
 

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec