Changeset 4646710 in mainline for boot/Makefile.build


Ignore:
Timestamp:
2017-06-07T15:39:23Z (7 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
239e32b8
Parents:
22299ed
Message:

replace objcopy with mkarray.py
(objcopy is notoriously problematic due to the uncontrolable way how it generates the object files, with what flags, etc.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile.build

    r22299ed r4646710  
    9494
    9595OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
    96 COMPONENT_OBJECTS := $(addsuffix .co,$(basename $(MODULES)))
    9796
    9897all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(BOOT_OUTPUT)
     
    102101        rm -f $(RAW) $(MAP) $(ARCH_INCLUDE) $(GENARCH_INCLUDE)
    103102
     103ifneq ($(MAKECMDGOALS),clean)
    104104-include $(DEPEND)
     105endif
    105106
    106107$(BOOT_OUTPUT): $(RAW)
    107108        $(OBJCOPY) -O $(BFD_OUTPUT) $< $@
    108109
    109 $(RAW): $(OBJECTS) $(COMPONENT_OBJECTS) $(LINK)
    110         $(LD) -n $(LFLAGS) -T $(LINK) -M -Map $(MAP) -o $@ $(COMPONENT_OBJECTS) $(OBJECTS)
     110$(RAW): $(OBJECTS) $(LINK)
     111        $(LD) -n $(LFLAGS) -T $(LINK) -M -Map $(MAP) -o $@ $(OBJECTS)
    111112
    112 $(LINK): $(LINK).comp $(DEPEND)
    113         $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $(LINK).comp | grep -v "^\#" > $(LINK)
     113$(LINK): $(DEPEND)
     114        $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $(LINK).in | grep -v "^\#" > $(LINK)
    114115
    115116%.o: %.S $(DEPEND)
     
    125126endif
    126127
    127 $(DEPEND): $(ARCH_INCLUDE) $(GENARCH_INCLUDE) $(COMMON_HEADER_ARCH)
     128%.o: %.s $(DEPEND)
     129        $(AS) $(AFLAGS) -o $@ $<
     130ifeq ($(PRECHECK),y)
     131        $(JOBFILE) $(JOB) $< $@ as asm
     132endif
     133
     134$(DEPEND): $(ARCH_INCLUDE) $(GENARCH_INCLUDE) $(COMMON_HEADER_ARCH) $(PRE_DEPEND)
    128135        makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
    129136        -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
     137
     138$(COMPS).s: $(COMPS).zip
     139        unzip -p $< $@ > $@
     140
     141$(COMPS).h: $(COMPS).zip
     142        unzip -p $< $@ > $@
     143
     144$(COMPS)_desc.c: $(COMPS).zip
     145        unzip -p $< $@ > $@
     146
     147$(COMPS).zip: $(COMPONENTS)
     148        $(MKARRAY) --deflate $(COMPS) $(COMP) "$(AS_PROLOG)" ".section .components, \"a\"" $^
     149
     150$(INITRD).img:
     151ifeq ($(RDFMT),tmpfs)
     152        $(MKTMPFS) $(DIST_PATH) $@
     153endif
     154ifeq ($(RDFMT),fat)
     155        $(MKFAT) 1048576 $(DIST_PATH) $@
     156endif
     157ifeq ($(RDFMT),ext4fs)
     158        $(MKEXT4) 1048576 $(DIST_PATH) $@
     159endif
    130160
    131161$(ARCH_INCLUDE): arch/$(KARCH)/include/
Note: See TracChangeset for help on using the changeset viewer.