diff options
-rw-r--r-- | gold/ChangeLog | 9 | ||||
-rw-r--r-- | gold/Makefile.am | 4 | ||||
-rw-r--r-- | gold/Makefile.in | 12 | ||||
-rwxr-xr-x | gold/configure | 34 | ||||
-rw-r--r-- | gold/configure.ac | 20 | ||||
-rw-r--r-- | gold/testsuite/Makefile.in | 2 |
6 files changed, 77 insertions, 4 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index 2139fbf..283b9c5 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,12 @@ +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_. diff --git a/gold/Makefile.am b/gold/Makefile.am index df5e66c..c1c3588 100644 --- a/gold/Makefile.am +++ b/gold/Makefile.am @@ -151,12 +151,14 @@ 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) diff --git a/gold/Makefile.in b/gold/Makefile.in index 1c33fe6..ff6d7c2 100644 --- a/gold/Makefile.in +++ b/gold/Makefile.in @@ -101,7 +101,9 @@ am_ld_new_OBJECTS = $(am__objects_4) 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) \ @@ -251,6 +253,8 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GMSGFMT = @GMSGFMT@ +GOLD_LDADD = @GOLD_LDADD@ +GOLD_LDFLAGS = @GOLD_LDFLAGS@ GREP = @GREP@ INCINTL = @INCINTL@ INSTALL = @INSTALL@ @@ -488,12 +492,14 @@ libgold_a_SOURCES = $(CCFILES) $(HFILES) $(YFILES) $(DEFFILES) 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) \ @@ -601,7 +607,7 @@ incremental-dump$(EXEEXT): $(incremental_dump_OBJECTS) $(incremental_dump_DEPEND $(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) diff --git a/gold/configure b/gold/configure index e0a91f8..708f540 100755 --- a/gold/configure +++ b/gold/configure @@ -599,6 +599,8 @@ HAVE_ZLIB_FALSE HAVE_ZLIB_TRUE LIBOBJS LFS_CFLAGS +GOLD_LDADD +GOLD_LDFLAGS WARN_CXXFLAGS NO_WERROR WARN_CFLAGS @@ -777,6 +779,8 @@ enable_dependency_tracking enable_nls enable_werror enable_build_warnings +with_gold_ldflags +with_gold_ldadd enable_maintainer_mode ' ac_precious_vars='build_alias @@ -1431,6 +1435,8 @@ Optional Packages: --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 @@ -6619,6 +6625,34 @@ fi 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" diff --git a/gold/configure.ac b/gold/configure.ac index 685e85b..905dbaf 100644 --- a/gold/configure.ac +++ b/gold/configure.ac @@ -409,6 +409,26 @@ AM_BINUTILS_WARNINGS 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" diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in index cdb17c8..c00f0d0 100644 --- a/gold/testsuite/Makefile.in +++ b/gold/testsuite/Makefile.in @@ -1797,6 +1797,8 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GMSGFMT = @GMSGFMT@ +GOLD_LDADD = @GOLD_LDADD@ +GOLD_LDFLAGS = @GOLD_LDFLAGS@ GREP = @GREP@ INCINTL = @INCINTL@ INSTALL = @INSTALL@ |