configuration options.
* configure: Regenerate.
* Makefile.am: Handle GOLD_LDADD and GOLD_LDFLAGS.
* Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
+2011-09-23 Simon Baldwin <simonb@google.com>
+
+ * configure.ac: Add new --with-gold-ldadd and --with-gold-ldflags
+ configuration options.
+ * configure: Regenerate.
+ * Makefile.am: Handle GOLD_LDADD and GOLD_LDFLAGS.
+ * Makefile.in: Regenerate.
+ * testsuite/Makefile.in: Regenerate.
+
2011-09-19 Sriraman Tallam <tmsriram@google.com>
* plugin.h (should_defer_layout): Modify to check for any_claimed_.
sources_var = main.cc
deps_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(LIBINTL_DEP)
-ldadd_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(LIBINTL) \
+ldadd_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(GOLD_LDADD) $(LIBINTL) \
$(THREADSLIB) $(LIBDL)
+ldflags_var = $(GOLD_LDFLAGS)
ld_new_SOURCES = $(sources_var)
ld_new_DEPENDENCIES = $(deps_var)
ld_new_LDADD = $(ldadd_var)
+ld_new_LDFLAGS = $(ldflags_var)
EXTRA_ld_new_SOURCES = $(TARGETSOURCES)
ld_new_OBJECTS = $(am_ld_new_OBJECTS)
am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) libgold.a $(LIBIBERTY) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+ld_new_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(ld_new_LDFLAGS) \
+ $(LDFLAGS) -o $@
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_ld1_OBJECTS = $(am__objects_4)
ld1_OBJECTS = $(am_ld1_OBJECTS)
ld1_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(ld1_LDFLAGS) \
EXEEXT = @EXEEXT@
GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
+GOLD_LDADD = @GOLD_LDADD@
+GOLD_LDFLAGS = @GOLD_LDFLAGS@
GREP = @GREP@
INCINTL = @INCINTL@
INSTALL = @INSTALL@
libgold_a_LIBADD = $(LIBOBJS)
sources_var = main.cc
deps_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(LIBINTL_DEP)
-ldadd_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(LIBINTL) \
+ldadd_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(GOLD_LDADD) $(LIBINTL) \
$(THREADSLIB) $(LIBDL)
+ldflags_var = $(GOLD_LDFLAGS)
ld_new_SOURCES = $(sources_var)
ld_new_DEPENDENCIES = $(deps_var)
ld_new_LDADD = $(ldadd_var)
+ld_new_LDFLAGS = $(ldflags_var)
EXTRA_ld_new_SOURCES = $(TARGETSOURCES)
incremental_dump_SOURCES = incremental-dump.cc
incremental_dump_DEPENDENCIES = $(TARGETOBJS) libgold.a $(LIBIBERTY) \
$(CXXLINK) $(incremental_dump_OBJECTS) $(incremental_dump_LDADD) $(LIBS)
ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES)
@rm -f ld-new$(EXEEXT)
- $(CXXLINK) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
+ $(ld_new_LINK) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
ld1$(EXEEXT): $(ld1_OBJECTS) $(ld1_DEPENDENCIES)
@rm -f ld1$(EXEEXT)
$(ld1_LINK) $(ld1_OBJECTS) $(ld1_LDADD) $(LIBS)
HAVE_ZLIB_TRUE
LIBOBJS
LFS_CFLAGS
+GOLD_LDADD
+GOLD_LDFLAGS
WARN_CXXFLAGS
NO_WERROR
WARN_CFLAGS
enable_nls
enable_werror
enable_build_warnings
+with_gold_ldflags
+with_gold_ldadd
enable_maintainer_mode
'
ac_precious_vars='build_alias
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-sysroot=DIR search for usr/lib et al within DIR
+ --with-gold-ldflags=FLAGS additional link flags for gold
+ --with-gold-ldadd=LIBS additional libraries for gold
Some influential environment variables:
CC C compiler command
WARN_CXXFLAGS=`echo ${WARN_CFLAGS} | sed -e 's/-Wstrict-prototypes//' -e 's/-Wmissing-prototypes//' -e 's/-Wshadow//'`
+
+# Check whether --with-gold-ldflags was given.
+if test "${with_gold_ldflags+set}" = set; then :
+ withval=$with_gold_ldflags; if test "$withval" = "no" -o "$withval" = "yes"; then
+ GOLD_LDFLAGS=
+ else
+ GOLD_LDFLAGS=$withval
+ fi
+else
+ GOLD_LDFLAGS=
+fi
+
+
+
+
+# Check whether --with-gold-ldadd was given.
+if test "${with_gold_ldadd+set}" = set; then :
+ withval=$with_gold_ldadd; if test "$withval" = "no" -o "$withval" = "yes"; then
+ GOLD_LDADD=
+ else
+ GOLD_LDADD=$withval
+ fi
+else
+ GOLD_LDADD=
+fi
+
+
+
LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
WARN_CXXFLAGS=`echo ${WARN_CFLAGS} | sed -e 's/-Wstrict-prototypes//' -e 's/-Wmissing-prototypes//' -e 's/-Wshadow//'`
AC_SUBST(WARN_CXXFLAGS)
+AC_ARG_WITH(gold-ldflags,
+[ --with-gold-ldflags=FLAGS additional link flags for gold],
+[if test "$withval" = "no" -o "$withval" = "yes"; then
+ GOLD_LDFLAGS=
+ else
+ GOLD_LDFLAGS=$withval
+ fi],
+[GOLD_LDFLAGS=])
+AC_SUBST(GOLD_LDFLAGS)
+
+AC_ARG_WITH(gold-ldadd,
+[ --with-gold-ldadd=LIBS additional libraries for gold],
+[if test "$withval" = "no" -o "$withval" = "yes"; then
+ GOLD_LDADD=
+ else
+ GOLD_LDADD=$withval
+ fi],
+[GOLD_LDADD=])
+AC_SUBST(GOLD_LDADD)
+
dnl Force support for large files by default. This may need to be
dnl host dependent. If build == host, we can check getconf LFS_CFLAGS.
LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
EXEEXT = @EXEEXT@
GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
+GOLD_LDADD = @GOLD_LDADD@
+GOLD_LDFLAGS = @GOLD_LDFLAGS@
GREP = @GREP@
INCINTL = @INCINTL@
INSTALL = @INSTALL@