From 52a9db6bb874c9ce7a8b7e935ba3ebbefdf3f7d4 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 30 Mar 2007 05:44:15 +0000 Subject: introduce the concept of LDLIBS for additional libraries so that when we do the final link, the objects/libraries are in the correct order --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6a50a2859..4f45ae822 100644 --- a/Makefile +++ b/Makefile @@ -302,6 +302,8 @@ AFLAGS_KERNEL = CFLAGS := $(CFLAGS) CPPFLAGS := $(CPPFLAGS) AFLAGS := $(AFLAGS) +LDFLAGS := $(LDFLAGS) +LDLIBS := # Read KERNELRELEASE from .kernelrelease (if it exists) KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null) @@ -565,7 +567,8 @@ quiet_cmd_busybox__ ?= LINK $@ cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \ -o $@ -Wl,-M \ -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ - -Wl,--start-group $(busybox-all) -Wl,--end-group + -Wl,--start-group $(busybox-all) -Wl,--end-group \ + $(LDLIBS) # Generate System.map quiet_cmd_sysmap = SYSMAP -- cgit v1.2.3