Hi,
For building coreboot v3 on cygwin, these changes (among others that I still clean up) are needed. Otherwise, it doesn't find the symbols in the libraries (ld arguments are parsed right-to-left).
Regards, Patrick Georgi
Signed-Off-By: Patrick Georgi patrick@georgi-clan.de
Index: util/kconfig/lxdialog/Makefile =================================================================== --- util/kconfig/lxdialog/Makefile (revision 687) +++ util/kconfig/lxdialog/Makefile (working copy) @@ -24,8 +24,8 @@
$(obj)/util/kconfig/lxdialog/lxdialog: $(obj)/dochecklxdialog $(patsubst %,$(obj)/util/kconfig/lxdialog/%,$(lxdialog-objs)) $(Q)printf " HOSTCC $(subst $(shell pwd)/,,$(@))\n" - $(Q)$(HOSTCC) $(HOST_LOADLIBES) \ - $(patsubst %,$(obj)/util/kconfig/lxdialog/%,$(lxdialog-objs)) -o $@ + $(Q)$(HOSTCC) \ + $(patsubst %,$(obj)/util/kconfig/lxdialog/%,$(lxdialog-objs)) -o $@ $(HOST_LOADLIBES)
$(obj)/util/kconfig/lxdialog/%.o: $(src)/util/kconfig/lxdialog/%.c $(Q)mkdir -p $(obj)/util/kconfig/lxdialog/ Index: util/kconfig/Makefile =================================================================== --- util/kconfig/Makefile (revision 687) +++ util/kconfig/Makefile (working copy) @@ -102,11 +102,11 @@
$(obj)/util/kconfig/mconf: $(patsubst %,$(obj)/util/kconfig/%,$(mconf-objects)) $(Q)printf " HOSTCC $(subst $(shell pwd)/,,$(@))\n" - $(Q)$(HOSTCC) $(CURSESLIBS) $(INTLLIBS) -o $@ $^ + $(Q)$(HOSTCC) -o $@ $^ $(CURSESLIBS) $(INTLLIBS)
$(obj)/util/kconfig/conf: $(patsubst %,$(obj)/util/kconfig/%,$(conf-objects)) $(Q)printf " HOSTCC $(subst $(shell pwd)/,,$(@))\n" - $(Q)$(HOSTCC) $(CURSESLIBS) -o $@ $^ + $(Q)$(HOSTCC) -o $@ $^ $(CURSESLIBS)
$(obj)/util/kconfig/qconf: $(patsubst %,$(obj)/util/kconfig/%,$(qconf-objects)) $(Q)printf " HOSTCXX $(subst $(shell pwd)/,,$(@))\n"
For building coreboot v3 on cygwin, these changes (among others that I still clean up) are needed. Otherwise, it doesn't find the symbols in the libraries (ld arguments are parsed right-to-left).
No they're not. Object files are linked left to right; object files in archives are only included if any of their symbols are required. Because of that, in general, libraries should be last on the command line.
Patch looks good though.
Segher
On Tue, Jun 03, 2008 at 04:30:42PM +0200, Patrick Georgi wrote:
Signed-Off-By: Patrick Georgi patrick@georgi-clan.de
With the below question answered, this is:
Acked-by: Peter Stuge peter@stuge.se
Index: util/kconfig/lxdialog/Makefile
--- util/kconfig/lxdialog/Makefile (revision 687) +++ util/kconfig/lxdialog/Makefile (working copy) @@ -24,8 +24,8 @@
$(obj)/util/kconfig/lxdialog/lxdialog: $(obj)/dochecklxdialog $(patsubst %,$(obj)/util/kconfig/lxdialog/%,$(lxdialog-objs)) $(Q)printf " HOSTCC $(subst $(shell pwd)/,,$(@))\n"
- $(Q)$(HOSTCC) $(HOST_LOADLIBES) \
$(patsubst %,$(obj)/util/kconfig/lxdialog/%,$(lxdialog-objs)) -o $@
- $(Q)$(HOSTCC) \
$(patsubst %,$(obj)/util/kconfig/lxdialog/%,$(lxdialog-objs)) -o $@ $(HOST_LOADLIBES)
HOST_LOADLIB*E*S
Is that last E a typo?
$(obj)/util/kconfig/lxdialog/%.o: $(src)/util/kconfig/lxdialog/%.c $(Q)mkdir -p $(obj)/util/kconfig/lxdialog/ Index: util/kconfig/Makefile =================================================================== --- util/kconfig/Makefile (revision 687) +++ util/kconfig/Makefile (working copy) @@ -102,11 +102,11 @@
$(obj)/util/kconfig/mconf: $(patsubst %,$(obj)/util/kconfig/%,$(mconf-objects)) $(Q)printf " HOSTCC $(subst $(shell pwd)/,,$(@))\n"
- $(Q)$(HOSTCC) $(CURSESLIBS) $(INTLLIBS) -o $@ $^
- $(Q)$(HOSTCC) -o $@ $^ $(CURSESLIBS) $(INTLLIBS)
$(obj)/util/kconfig/conf: $(patsubst %,$(obj)/util/kconfig/%,$(conf-objects)) $(Q)printf " HOSTCC $(subst $(shell pwd)/,,$(@))\n"
- $(Q)$(HOSTCC) $(CURSESLIBS) -o $@ $^
- $(Q)$(HOSTCC) -o $@ $^ $(CURSESLIBS)
$(obj)/util/kconfig/qconf: $(patsubst %,$(obj)/util/kconfig/%,$(qconf-objects)) $(Q)printf " HOSTCXX $(subst $(shell pwd)/,,$(@))\n"
Peter Stuge schrieb:
With the below question answered, this is:
Acked-by: Peter Stuge peter@stuge.se
Thanks, r690.
HOST_LOADLIB*E*S
Is that last E a typo?
I think so (and see nothing that indicates otherwise) - I opted for the minimal patch, but I suppose fixing it (if only to avoid this question the next time a change affects that variable) is more sensible.
Thanks, Patrick