+ifeq ($(LINK_USING_CC),1)
+# Override the definition of LD here, since we're linking with CC
+LD := $(CC) $(CPU_CFLAGS)
+_CPU_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS))
+override EXTRA_LDFLAGS := $(call linkerprefix,$(EXTRA_LDFLAGS))
+else
+_CPU_LDFLAGS := $(CPU_LDFLAGS)
+endif
+
+# Translate DEPDIRS into LDLIBS
+# Ignore (sub)directory dependencies which do not provide an actual library
+_IGNORE_DIRS = librte_eal/% librte_compat
+_DEPDIRS = $(filter-out $(_IGNORE_DIRS),$(DEPDIRS))
+_LDDIRS = $(subst librte_ether,librte_ethdev,$(_DEPDIRS))
+LDLIBS += $(subst lib,-l,$(_LDDIRS))
+
+O_TO_A = $(AR) crDs $(LIB) $(OBJS-y)