This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]