summaryrefslogtreecommitdiffstats
path: root/board/amcc
diff options
context:
space:
mode:
authorSebastien Carlier <sebastien.carlier@gmail.com>2010-11-05 15:48:07 +0100
committerWolfgang Denk <wd@denx.de>2010-11-17 21:02:18 +0100
commit6d8962e814c15807dd6ac5757904be2a02d187b8 (patch)
treeb899a91461cdc9b35a424cb45a28864da7889137 /board/amcc
parentd7b1970015e62d37b26bb6b94b64ae36728c63cc (diff)
downloadblackbird-obmc-uboot-6d8962e814c15807dd6ac5757904be2a02d187b8.tar.gz
blackbird-obmc-uboot-6d8962e814c15807dd6ac5757904be2a02d187b8.zip
Switch from archive libraries to partial linking
Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries when linking with recent versions of binutils. As stated in the System V ABI, "the link editor does not extract archive members to resolve undefined weak symbols". This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives, which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols as intended. This approach is also used by Linux, from which the gmake function cmd_link_o_target (defined in config.mk and used in all Makefiles) is inspired. The name of each former library archive is preserved except for extensions which change from ".a" to ".o". This commit updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some features but include source files that depend these disabled features in the build, resulting in undefined symbols. Known such cases include: - disabling CMD_NET but not CMD_NFS; - enabling CONFIG_OF_LIBFDT but not CONFIG_QE. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
Diffstat (limited to 'board/amcc')
-rw-r--r--board/amcc/acadia/Makefile4
-rw-r--r--board/amcc/bamboo/Makefile4
-rw-r--r--board/amcc/bluestone/Makefile4
-rw-r--r--board/amcc/bubinga/Makefile4
-rw-r--r--board/amcc/canyonlands/Makefile4
-rw-r--r--board/amcc/ebony/Makefile4
-rw-r--r--board/amcc/katmai/Makefile4
-rw-r--r--board/amcc/kilauea/Makefile4
-rw-r--r--board/amcc/luan/Makefile4
-rw-r--r--board/amcc/makalu/Makefile4
-rw-r--r--board/amcc/ocotea/Makefile4
-rw-r--r--board/amcc/redwood/Makefile4
-rw-r--r--board/amcc/sequoia/Makefile4
-rw-r--r--board/amcc/taihu/Makefile4
-rw-r--r--board/amcc/taishan/Makefile4
-rw-r--r--board/amcc/walnut/Makefile4
-rw-r--r--board/amcc/yosemite/Makefile4
-rw-r--r--board/amcc/yucca/Makefile4
18 files changed, 36 insertions, 36 deletions
diff --git a/board/amcc/acadia/Makefile b/board/amcc/acadia/Makefile
index 9abb29d85f..b2772870a9 100644
--- a/board/amcc/acadia/Makefile
+++ b/board/amcc/acadia/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS = $(BOARD).o cmd_acadia.o memory.o pll.o
SOBJS =
@@ -33,7 +33,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/amcc/bamboo/Makefile b/board/amcc/bamboo/Makefile
index 0649799889..7c0f50f2c7 100644
--- a/board/amcc/bamboo/Makefile
+++ b/board/amcc/bamboo/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS = $(BOARD).o flash.o
SOBJS = init.o
@@ -33,7 +33,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(OBJS) $(SOBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+ $(call cmd_link_o_target, $(OBJS) $(SOBJS))
clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/amcc/bluestone/Makefile b/board/amcc/bluestone/Makefile
index 41751c870b..bcc52523a9 100644
--- a/board/amcc/bluestone/Makefile
+++ b/board/amcc/bluestone/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS-y := $(BOARD).o
SOBJS := init.o
@@ -34,7 +34,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(OBJS) $(SOBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+ $(call cmd_link_o_target, $(OBJS) $(SOBJS))
clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/amcc/bubinga/Makefile b/board/amcc/bubinga/Makefile
index 1939d51688..9f63df1501 100644
--- a/board/amcc/bubinga/Makefile
+++ b/board/amcc/bubinga/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS = $(BOARD).o flash.o
@@ -32,7 +32,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(OBJS) $(SOBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/amcc/canyonlands/Makefile b/board/amcc/canyonlands/Makefile
index 12f8a642e7..c8ecaf9ffe 100644
--- a/board/amcc/canyonlands/Makefile
+++ b/board/amcc/canyonlands/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS-y := $(BOARD).o
COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
@@ -35,7 +35,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(OBJS) $(SOBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+ $(call cmd_link_o_target, $(OBJS) $(SOBJS))
clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/amcc/ebony/Makefile b/board/amcc/ebony/Makefile
index 6ab1a26b15..b5d0fe56a7 100644
--- a/board/amcc/ebony/Makefile
+++ b/board/amcc/ebony/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS = $(BOARD).o flash.o
SOBJS = init.o
@@ -33,7 +33,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(OBJS) $(SOBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/amcc/katmai/Makefile b/board/amcc/katmai/Makefile
index 168bab5d2f..466b1902e8 100644
--- a/board/amcc/katmai/Makefile
+++ b/board/amcc/katmai/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS-y := $(BOARD).o
COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
@@ -35,7 +35,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/amcc/kilauea/Makefile b/board/amcc/kilauea/Makefile
index 751e9f39fd..726c3ce4f1 100644
--- a/board/amcc/kilauea/Makefile
+++ b/board/amcc/kilauea/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS-y := $(BOARD).o
COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
@@ -33,7 +33,7 @@ SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
$(LIB): $(obj).depend $(OBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
clean:
rm -f $(OBJS)
diff --git a/board/amcc/luan/Makefile b/board/amcc/luan/Makefile
index 6ab1a26b15..b5d0fe56a7 100644
--- a/board/amcc/luan/Makefile
+++ b/board/amcc/luan/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS = $(BOARD).o flash.o
SOBJS = init.o
@@ -33,7 +33,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(OBJS) $(SOBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/amcc/makalu/Makefile b/board/amcc/makalu/Makefile
index dc3edc11aa..e10fadba25 100644
--- a/board/amcc/makalu/Makefile
+++ b/board/amcc/makalu/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS = $(BOARD).o cmd_pll.o
SOBJS = init.o
@@ -32,7 +32,7 @@ SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
$(LIB): $(obj).depend $(OBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
clean:
rm -f $(OBJS)
diff --git a/board/amcc/ocotea/Makefile b/board/amcc/ocotea/Makefile
index 6ab1a26b15..b5d0fe56a7 100644
--- a/board/amcc/ocotea/Makefile
+++ b/board/amcc/ocotea/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS = $(BOARD).o flash.o
SOBJS = init.o
@@ -33,7 +33,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(OBJS) $(SOBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/amcc/redwood/Makefile b/board/amcc/redwood/Makefile
index 5793307d6d..8759001185 100644
--- a/board/amcc/redwood/Makefile
+++ b/board/amcc/redwood/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS = $(BOARD).o
SOBJS = init.o
@@ -33,7 +33,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/amcc/sequoia/Makefile b/board/amcc/sequoia/Makefile
index 8da3bd5114..50851381ee 100644
--- a/board/amcc/sequoia/Makefile
+++ b/board/amcc/sequoia/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS-y = $(BOARD).o sdram.o
COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
@@ -35,7 +35,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(OBJS) $(SOBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+ $(call cmd_link_o_target, $(OBJS) $(SOBJS))
clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/amcc/taihu/Makefile b/board/amcc/taihu/Makefile
index 0b9f970ead..9b2e7e4b03 100644
--- a/board/amcc/taihu/Makefile
+++ b/board/amcc/taihu/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS = $(BOARD).o flash.o lcd.o update.o
@@ -31,7 +31,7 @@ SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
$(LIB): $(OBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
clean:
rm -f $(OBJS)
diff --git a/board/amcc/taishan/Makefile b/board/amcc/taishan/Makefile
index 9d20e0f6bf..099cf9d6bb 100644
--- a/board/amcc/taishan/Makefile
+++ b/board/amcc/taishan/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS = $(BOARD).o lcd.o update.o showinfo.o
SOBJS = init.o
@@ -33,7 +33,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(OBJS) $(SOBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/amcc/walnut/Makefile b/board/amcc/walnut/Makefile
index 1939d51688..9f63df1501 100644
--- a/board/amcc/walnut/Makefile
+++ b/board/amcc/walnut/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS = $(BOARD).o flash.o
@@ -32,7 +32,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(OBJS) $(SOBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/amcc/yosemite/Makefile b/board/amcc/yosemite/Makefile
index b93f2c3890..5b0ffc2920 100644
--- a/board/amcc/yosemite/Makefile
+++ b/board/amcc/yosemite/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS = $(BOARD).o
SOBJS = init.o
@@ -33,7 +33,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(OBJS) $(SOBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/amcc/yucca/Makefile b/board/amcc/yucca/Makefile
index 0ff522c31c..d9fb7134d7 100644
--- a/board/amcc/yucca/Makefile
+++ b/board/amcc/yucca/Makefile
@@ -23,7 +23,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).o
COBJS = $(BOARD).o flash.o cmd_yucca.o
SOBJS = init.o
@@ -33,7 +33,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
clean:
rm -f $(SOBJS) $(OBJS)
OpenPOWER on IntegriCloud