This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[LTO] PATCH: fix builds when using --with-libelf
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 13 Jul 2009 14:39:42 +1000
- Subject: [LTO] PATCH: fix builds when using --with-libelf
When building using --with-libelf, the lto1 binary was not linking.
With this patch, if $(LIBELFLIBS) is empty, make will just pass the
trailing -lelf instead. OK for the branch?
Ben
2009-07-13 Ben Elliston <bje@au.ibm.com>
* Make-lang.in ($(LTO_EXE)): Add $(LIBELFLIBS).
Index: Make-lang.in
===================================================================
--- Make-lang.in (revision 149541)
+++ Make-lang.in (working copy)
@@ -72,7 +72,7 @@ lto-warn = $(STRICT_WARN)
$(LTO_EXE): $(LTO_OBJS) $(BACKEND) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
- $(LTO_OBJS) $(BACKEND) $(BACKENDLIBS) $(LIBS) -lelf
+ $(LTO_OBJS) $(BACKEND) $(BACKENDLIBS) $(LIBS) $(LIBELFLIBS) -lelf
$(LTRANS_DRIVER_EXE): $(srcdir)/lto/ltrans-driver
cp $(srcdir)/lto/ltrans-driver $(LTRANS_DRIVER_EXE)