Skip to content

Commit ffe7f7a

Browse files
committed
re PR sanitizer/56781 (boostrap-asan failure: fixincl fails to link (missing -lasan))
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
1 parent 7989635 commit ffe7f7a

File tree

5 files changed

+25
-6
lines changed

5 files changed

+25
-6
lines changed

ChangeLog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2014-04-17 Jakub Jelinek <[email protected]>
2+
3+
PR sanitizer/56781
4+
* libtool-ldflags: Also prefix -static-lib*, -shared-lib*
5+
and -B* options with -Xcompiler.
6+
17
2014-04-04 Eric Botcazou <[email protected]>
28

39
PR bootstrap/60620

libtool-ldflags

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Script to translate LDFLAGS into a form suitable for use with libtool.
44

5-
# Copyright (C) 2005 Free Software Foundation, Inc.
5+
# Copyright (C) 2005-2014 Free Software Foundation, Inc.
66
#
77
# This file is free software; you can redistribute it and/or modify
88
# it under the terms of the GNU General Public License as published by
@@ -36,14 +36,15 @@ prev_arg=
3636
for arg
3737
do
3838
case $arg in
39-
-f*|--*)
39+
-f*|--*|-static-lib*|-shared-lib*|-B*)
4040
# Libtool does not ascribe any special meaning options
4141
# that begin with -f or with a double-dash. So, it will
4242
# think these options are linker options, and prefix them
4343
# with "-Wl,". Then, the compiler driver will ignore the
4444
# options. So, we prefix these options with -Xcompiler to
4545
# make clear to libtool that they are in fact compiler
46-
# options.
46+
# options. Similarly for e.g. -static-libstdc++, or
47+
# -B/some/path.
4748
case $prev_arg in
4849
-Xpreprocessor|-Xcompiler|-Xlinker)
4950
# This option is already prefixed; don't prefix it again.

lto-plugin/ChangeLog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2014-04-17 Jakub Jelinek <[email protected]>
2+
3+
PR sanitizer/56781
4+
* Makefile.am (LTLDFLAGS, liblto_plugin_la_LINK): New variables.
5+
* Makefile.in: Regenerated.
6+
17
2014-04-02 Richard Biener <[email protected]>
28

39
* lto-plugin.c (onload): Fail to load if -fno-use-linker-plugin

lto-plugin/Makefile.am

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
1818

1919
# Can be removed when libiberty becomes a normal convenience library
2020
Wc=-Wc,
21+
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
2122

2223
liblto_plugin_la_SOURCES = lto-plugin.c
2324
liblto_plugin_la_LIBADD = \
@@ -28,6 +29,9 @@ liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
2829
$(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
2930
liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \
3031
../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)
32+
liblto_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
33+
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
34+
$(liblto_plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
3135

3236
all-local: $(in_gcc_libs)
3337

lto-plugin/Makefile.in

+5-3
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ am__installdirs = "$(DESTDIR)$(libexecsubdir)"
8484
LTLIBRARIES = $(libexecsub_LTLIBRARIES)
8585
am_liblto_plugin_la_OBJECTS = lto-plugin.lo
8686
liblto_plugin_la_OBJECTS = $(am_liblto_plugin_la_OBJECTS)
87-
liblto_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
88-
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
89-
$(liblto_plugin_la_LDFLAGS) $(LDFLAGS) -o $@
9087
DEFAULT_INCLUDES = -I.@am__isrc@
9188
depcomp =
9289
am__depfiles_maybe =
@@ -239,6 +236,7 @@ in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
239236

240237
# Can be removed when libiberty becomes a normal convenience library
241238
Wc = -Wc,
239+
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
242240
liblto_plugin_la_SOURCES = lto-plugin.c
243241
liblto_plugin_la_LIBADD = \
244242
$(if $(wildcard ../libiberty/pic/libiberty.a),$(Wc)../libiberty/pic/libiberty.a,)
@@ -251,6 +249,10 @@ liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
251249
liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \
252250
../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)
253251

252+
liblto_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
253+
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
254+
$(liblto_plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
255+
254256
all: config.h
255257
$(MAKE) $(AM_MAKEFLAGS) all-am
256258

0 commit comments

Comments
 (0)