]> gcc.gnu.org Git - gcc.git/commitdiff
re PR sanitizer/56781 (boostrap-asan failure: fixincl fails to link (missing -lasan))
authorJakub Jelinek <jakub@redhat.com>
Thu, 17 Apr 2014 12:23:28 +0000 (14:23 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 17 Apr 2014 12:23:28 +0000 (14:23 +0200)
PR sanitizer/56781
* libtool-ldflags: Also prefix -static-lib*, -shared-lib*
and -B* options with -Xcompiler.
lto-plugin/
* Makefile.am (LTLDFLAGS, liblto_plugin_la_LINK): New variables.
* Makefile.in: Regenerated.

From-SVN: r209475

ChangeLog
libtool-ldflags
lto-plugin/ChangeLog
lto-plugin/Makefile.am
lto-plugin/Makefile.in

index 5ddacbe69943b727c4df5566241ad51d825c6f62..3fadbd3899067b87190c495590677c2167e8d21c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-04-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR sanitizer/56781
+       * libtool-ldflags: Also prefix -static-lib*, -shared-lib*
+       and -B* options with -Xcompiler.
+
 2014-04-04  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR bootstrap/60620
index e32e37bf10dd5a5af7648b64ae648e80bcf44b5f..5de9e2978d4047f550f37baf89cb44d0b74f0313 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Script to translate LDFLAGS into a form suitable for use with libtool.
 
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005-2014 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,14 +36,15 @@ prev_arg=
 for arg
 do
     case $arg in
-       -f*|--*)
+       -f*|--*|-static-lib*|-shared-lib*|-B*)
            # Libtool does not ascribe any special meaning options
            # that begin with -f or with a double-dash.  So, it will
            # think these options are linker options, and prefix them
            # with "-Wl,".  Then, the compiler driver will ignore the
            # options.  So, we prefix these options with -Xcompiler to
            # make clear to libtool that they are in fact compiler
-           # options.
+           # options.  Similarly for e.g. -static-libstdc++, or
+           # -B/some/path.
            case $prev_arg in
                -Xpreprocessor|-Xcompiler|-Xlinker)
                    # This option is already prefixed; don't prefix it again.
index de0db1db442c9ca949cc1991434ec92746dbf6f3..a8015423b30833fa0f9f5ab4b84507e52ece3db6 100644 (file)
@@ -1,3 +1,9 @@
+2014-04-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR sanitizer/56781
+       * Makefile.am (LTLDFLAGS, liblto_plugin_la_LINK): New variables.
+       * Makefile.in: Regenerated.
+
 2014-04-02  Richard Biener  <rguenther@suse.de>
 
        * lto-plugin.c (onload): Fail to load if -fno-use-linker-plugin
index e3391bcc547875b990f4c4ec35b5c43715bad2d3..507e0273fb44630231bb34a2fe5021939228baa9 100644 (file)
@@ -18,6 +18,7 @@ in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
 
 # Can be removed when libiberty becomes a normal convenience library
 Wc=-Wc,
+LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
 
 liblto_plugin_la_SOURCES = lto-plugin.c
 liblto_plugin_la_LIBADD = \
@@ -28,6 +29,9 @@ liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
        $(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
 liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \
        ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)
+liblto_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(liblto_plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
 
 all-local: $(in_gcc_libs)
 
index a70de62f5664b060adab301834c90a11d5cc274e..3739866d7a145803ab38e90964147452da324a1d 100644 (file)
@@ -84,9 +84,6 @@ am__installdirs = "$(DESTDIR)$(libexecsubdir)"
 LTLIBRARIES = $(libexecsub_LTLIBRARIES)
 am_liblto_plugin_la_OBJECTS = lto-plugin.lo
 liblto_plugin_la_OBJECTS = $(am_liblto_plugin_la_OBJECTS)
-liblto_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(liblto_plugin_la_LDFLAGS) $(LDFLAGS) -o $@
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp =
 am__depfiles_maybe =
@@ -239,6 +236,7 @@ in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
 
 # Can be removed when libiberty becomes a normal convenience library
 Wc = -Wc,
+LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
 liblto_plugin_la_SOURCES = lto-plugin.c
 liblto_plugin_la_LIBADD = \
        $(if $(wildcard ../libiberty/pic/libiberty.a),$(Wc)../libiberty/pic/libiberty.a,)
@@ -251,6 +249,10 @@ liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
 liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \
        ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)
 
+liblto_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(liblto_plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
+
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
 
This page took 0.077934 seconds and 5 git commands to generate.