|
@@ -686,13 +686,18 @@ $(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS)
|
686
|
686
|
$(Q)$(RANLIB) $@
|
687
|
687
|
blib : $(BLIB)
|
688
|
688
|
|
|
689
|
+# Command to generate build ID. Must be unique for each $(BIN)/%.tmp,
|
|
690
|
+# even within the same build run.
|
|
691
|
+#
|
|
692
|
+BUILD_ID_CMD := perl -e 'printf "0x%08x", int ( rand ( 0xffffffff ) );'
|
|
693
|
+
|
689
|
694
|
# Build an intermediate object file from the objects required for the
|
690
|
695
|
# specified target.
|
691
|
696
|
#
|
692
|
|
-$(BIN)/%.tmp : $(BLIB) $(MAKEDEPS) $(LDSCRIPT)
|
|
697
|
+$(BIN)/%.tmp : $(BLIB) $(MAKEDEPS) $(LDSCRIPT)
|
693
|
698
|
$(QM)$(ECHO) " [LD] $@"
|
694
|
699
|
$(Q)$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $(BLIB) -o $@ \
|
695
|
|
- -Map $(BIN)/$*.tmp.map
|
|
700
|
+ --defsym _build_id=`$(BUILD_ID_CMD)` -Map $(BIN)/$*.tmp.map
|
696
|
701
|
$(Q)$(OBJDUMP) -ht $@ | $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map
|
697
|
702
|
|
698
|
703
|
# Keep intermediate object file (useful for debugging)
|