tools/xenmon/Makefile: Move LDFLAGS after $<
PATCH 1/1 tools/xenmon/Makefile: Move LDFLAGS after $<
Hello,
gcc expects libraries needed for object files to be specified after the object. Linking usually does not fail, unless it is optimized (for instance, using -Wl,-as-needed). See the attached build log for details.
The offending Makefile is tools/xenmon/Makefile, and patches for 3.3 and 3.0/3.1/3.2 are attached.
The related Gentoo bug is 135145 [ https://bugs.gentoo.org/135145 ].
Regards,
Robert
tools/xenmon/Makefile +2 -2
@@ -42,6 +42,6 @@ clean: %: %.c Makefile - $(CC) $(CFLAGS) $(LDFLAGS) -lxenctrl -o $@ $< + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lxenctrl xentrace_%: %.c Makefile - $(CC) $(CFLAGS) $(LDFLAGS) -lxenctrl -o $@ $< + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lxenctrl
tools/xenmon/Makefile +2 -2
@@ -42,6 +42,6 @@ clean: %: %.c Makefile - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< + $(CC) $(CFLAGS) $< $(LDFLAGS) -o $@ xentrace_%: %.c Makefile - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< + $(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel