diff options
Diffstat (limited to 'apps/plugins/plugins.make')
-rw-r--r-- | apps/plugins/plugins.make | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make index c6c399db48..0f6804d591 100644 --- a/apps/plugins/plugins.make +++ b/apps/plugins/plugins.make | |||
@@ -17,6 +17,10 @@ ROCKS := $(subst $(ROOTDIR),$(BUILDDIR),$(ROCKS)) | |||
17 | PLUGINLIB := $(BUILDDIR)/apps/plugins/libplugin.a | 17 | PLUGINLIB := $(BUILDDIR)/apps/plugins/libplugin.a |
18 | PLUGINLIB_SRC = $(call preprocess, $(APPSDIR)/plugins/lib/SOURCES) | 18 | PLUGINLIB_SRC = $(call preprocess, $(APPSDIR)/plugins/lib/SOURCES) |
19 | OTHER_SRC += $(PLUGINLIB_SRC) | 19 | OTHER_SRC += $(PLUGINLIB_SRC) |
20 | # include gcc-support routines for linking first if in SOURCES | ||
21 | ifneq "$(findstring gcc-support.c,$(PLUGINLIB_SRC))" "" | ||
22 | GCCSUPPORT_OBJ := $(BUILDDIR)/apps/plugins/lib/gcc-support.o | ||
23 | endif | ||
20 | 24 | ||
21 | PLUGINLIB_OBJ := $(PLUGINLIB_SRC:.c=.o) | 25 | PLUGINLIB_OBJ := $(PLUGINLIB_SRC:.c=.o) |
22 | PLUGINLIB_OBJ := $(PLUGINLIB_OBJ:.S=.o) | 26 | PLUGINLIB_OBJ := $(PLUGINLIB_OBJ:.S=.o) |
@@ -70,7 +74,7 @@ else | |||
70 | PLUGINLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$*.map | 74 | PLUGINLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$*.map |
71 | endif | 75 | endif |
72 | 76 | ||
73 | $(BUILDDIR)/%.rock: $(BUILDDIR)/%.o $(PLUGINLINK_LDS) | 77 | $(BUILDDIR)/%.rock: $(GCCSUPPORT_OBJ) $(BUILDDIR)/%.o $(PLUGINLINK_LDS) |
74 | $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(BUILDDIR)/$*.elf \ | 78 | $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(BUILDDIR)/$*.elf \ |
75 | $(filter %.o, $^) \ | 79 | $(filter %.o, $^) \ |
76 | $(filter %.a, $^) \ | 80 | $(filter %.a, $^) \ |