- 论坛徽章:
- 0
|
makefile内容:
LD_LIBS := $(LIB_DIR)/MyLib.a
CCLD_LIBS := -lm $(LD_LIBS)
CFLAGS = -Wpointer-arith -Wundef -Wall -Wstrict-prototypes -g -pipe
CFLAGS += -O$(OPTLEVEL)
LKFLAGS =-nostdlib -Wl,--gc-sections -Wl,-static
%.o: %.c
$(CC) $ < -c $(CFLAGS) $(BASE_INCLUDES) -o $@
.PHONY: all
all: $(EXPORT_BIN)
$(EXPORT_BIN): MainTask.o $(LD_LIBS)
@echo "Linking $(patsubst $(EXPORT_PATH)/%,%,$@) ..."
$(CC) $(CFLAGS) $(LKFLAGS) $ < -o $@ $(CCLD_LIBS)
展开:
arm-linux-gcc -Wpointer-arith -Wundef -Wall -Wstrict-prototypes -g -pipe -O0 -nostdlib -Wl,--gc-sections -Wl,-static MainTask.o -o MainTask -lm /usr/src/app/lib/MyLib.a
结果:
arm-linux/bin/ld: warning: cannot find entry symbol _start; defaulting to 00008074
请高手帮忙指出原因,感谢感谢! |
|