|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] xenpaging: correct order of linker options to avoid
Fix link error in openSuSE 11.2.
The order of objects and linked libraries is important with recent toolchain
when --as-needed is used.
xc.o: In function `xc_wait_for_event_or_timeout':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:80:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:86:
undefined reference to `xc_evtchn_pending'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:89:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:93:
undefined reference to `xc_evtchn_unmask'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:96:
undefined reference to `xc_report_error'
xc.o: In function `xc_mem_paging_flush_ioemu_cache':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:57:
undefined reference to `xs_daemon_open'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:61:
undefined reference to `xs_write'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:63:
undefined reference to `xs_daemon_close'
xc.o: In function `get_platform_info':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xg_save_restore.h:52:
undefined reference to `xc_version'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xg_save_restore.h:55:
undefined reference to `xc_version'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xg_save_restore.h:58:
undefined reference to `xc_memory_op'
xc.o: In function `do_domctl':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xc_private.h:148:
undefined reference to `hcall_buf_prep'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xc_private.h:150:
undefined reference to `safe_strerror'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xc_private.h:150:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xc_private.h:159:
undefined reference to `do_xen_hypercall'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xc_private.h:162:
undefined reference to `xc_report'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xc_private.h:166:
undefined reference to `hcall_buf_release'
xenpaging.o: In function `xenpaging_resume_page':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:393:
undefined reference to `xc_mem_paging_resume'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:395:
undefined reference to `xc_evtchn_notify'
xenpaging.o: In function `xenpaging_evict_page':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:342:
undefined reference to `xc_map_foreign_pages'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:346:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:355:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:365:
undefined reference to `xc_mem_paging_evict'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:369:
undefined reference to `xc_report_error'
xenpaging.o: In function `evict_victim':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:457:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:461:
undefined reference to `xc_mem_paging_nominate'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:469:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:475:
undefined reference to `xc_report_error'
xenpaging.o: In function `xenpaging_teardown':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:244:
undefined reference to `xc_mem_event_disable'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:247:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:252:
undefined reference to `xc_evtchn_unbind'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:255:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:261:
undefined reference to `xc_evtchn_close'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:264:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:270:
undefined reference to `xc_interface_close'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:273:
undefined reference to `xc_report_error'
xenpaging.o: In function `xenpaging_init':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:76:
undefined reference to `xc_interface_open'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:80:
undefined reference to `xc_report'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:97:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:105:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:119:
undefined reference to `xc_mem_event_enable'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:125:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:127:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:132:
undefined reference to `xc_evtchn_open'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:135:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:140:
undefined reference to `xc_evtchn_bind_interdomain'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:145:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:155:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:163:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:171:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:175:
undefined reference to `xc_domain_getinfolist'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:179:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:190:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:193:
undefined reference to `xc_report'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:199:
undefined reference to `xc_report_error'
xenpaging.o: In function `main':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:529:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:539:
undefined reference to `xc_report'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:542:
undefined reference to `xc_report'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:551:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:556:
undefined reference to `xc_report'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:581:
undefined reference to `xc_report'
xenpaging.o: In function `xenpaging_populate_page':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:411:
undefined reference to `xc_mem_paging_prep'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:415:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:422:
undefined reference to `xc_map_foreign_pages'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:427:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:435:
undefined reference to `xc_report_error'
xenpaging.o: In function `main':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:589:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:602:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:611:
undefined reference to `xc_report'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:629:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:643:
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:648:
undefined reference to `xc_interface_close'
policy_default.o: In function `policy_choose_victim':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/policy_default.c:64:
undefined reference to `xc_report'
collect2: ld returned 1 exit status
make[3]: *** [xenpaging] Error 1
Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
v2: use XENPAGING_LIBS instead of moving LDFLAGS to the end of cmdline
tools/xenpaging/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- xen-unstable.hg-4.1.21864.orig/tools/xenpaging/Makefile
+++ xen-unstable.hg-4.1.21864/tools/xenpaging/Makefile
@@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk
CFLAGS += -I $(XEN_XC)
CFLAGS += -I ./
CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore)
-LDFLAGS += $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore)
+XENPAGING_LIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore)
POLICY = default
@@ -27,7 +27,7 @@ IBINS = xenpaging
all: $(IBINS)
xenpaging: $(OBJS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(XENPAGING_LIBS)
install: all
$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|