diff options
author | vapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-03-30 05:44:15 +0000 |
---|---|---|
committer | vapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-03-30 05:44:15 +0000 |
commit | f7b12a492d021b587e29e7614adcb9d9177e306c (patch) | |
tree | 0a00f3190ef9bc4df6e93a4a973080d53b5a66dc | |
parent | ecf068bdc49e97467148d7a19a33ed2254b5b4d6 (diff) | |
download | busybox-w32-f7b12a492d021b587e29e7614adcb9d9177e306c.tar.gz busybox-w32-f7b12a492d021b587e29e7614adcb9d9177e306c.tar.bz2 busybox-w32-f7b12a492d021b587e29e7614adcb9d9177e306c.zip |
introduce the concept of LDLIBS for additional libraries so that when we do the final link, the objects/libraries are in the correct order
git-svn-id: svn://busybox.net/trunk/busybox@18280 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | Makefile.flags | 6 |
2 files changed, 7 insertions, 4 deletions
@@ -302,6 +302,8 @@ AFLAGS_KERNEL = | |||
302 | CFLAGS := $(CFLAGS) | 302 | CFLAGS := $(CFLAGS) |
303 | CPPFLAGS := $(CPPFLAGS) | 303 | CPPFLAGS := $(CPPFLAGS) |
304 | AFLAGS := $(AFLAGS) | 304 | AFLAGS := $(AFLAGS) |
305 | LDFLAGS := $(LDFLAGS) | ||
306 | LDLIBS := | ||
305 | 307 | ||
306 | # Read KERNELRELEASE from .kernelrelease (if it exists) | 308 | # Read KERNELRELEASE from .kernelrelease (if it exists) |
307 | KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null) | 309 | KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null) |
@@ -565,7 +567,8 @@ quiet_cmd_busybox__ ?= LINK $@ | |||
565 | cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \ | 567 | cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \ |
566 | -o $@ -Wl,-M \ | 568 | -o $@ -Wl,-M \ |
567 | -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ | 569 | -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ |
568 | -Wl,--start-group $(busybox-all) -Wl,--end-group | 570 | -Wl,--start-group $(busybox-all) -Wl,--end-group \ |
571 | $(LDLIBS) | ||
569 | 572 | ||
570 | # Generate System.map | 573 | # Generate System.map |
571 | quiet_cmd_sysmap = SYSMAP | 574 | quiet_cmd_sysmap = SYSMAP |
diff --git a/Makefile.flags b/Makefile.flags index 487300de2..e4cdc459e 100644 --- a/Makefile.flags +++ b/Makefile.flags | |||
@@ -56,15 +56,15 @@ LDFLAGS += -static | |||
56 | endif | 56 | endif |
57 | 57 | ||
58 | ifeq ($(CONFIG_SELINUX),y) | 58 | ifeq ($(CONFIG_SELINUX),y) |
59 | LDFLAGS += -lselinux -lsepol | 59 | LDLIBS += -lselinux -lsepol |
60 | endif | 60 | endif |
61 | 61 | ||
62 | ifeq ($(CONFIG_EFENCE),y) | 62 | ifeq ($(CONFIG_EFENCE),y) |
63 | LDFLAGS += -lefence | 63 | LDLIBS += -lefence |
64 | endif | 64 | endif |
65 | 65 | ||
66 | ifeq ($(CONFIG_DMALLOC),y) | 66 | ifeq ($(CONFIG_DMALLOC),y) |
67 | LDFLAGS += -ldmalloc | 67 | LDLIBS += -ldmalloc |
68 | endif | 68 | endif |
69 | 69 | ||
70 | #LDFLAGS += -nostdlib | 70 | #LDFLAGS += -nostdlib |