* Re: [PATCH 5/5] add libcc1
@ 2014-10-28 8:43 Uros Bizjak
2014-10-28 8:55 ` Phil Muldoon
2014-10-28 9:36 ` Jakub Jelinek
0 siblings, 2 replies; 15+ messages in thread
From: Uros Bizjak @ 2014-10-28 8:43 UTC (permalink / raw)
To: gcc-patches; +Cc: Tom Tromey, Jakub Jelinek, Jeff Law, pmuldoon
> This patch has now been committed.
Also breaks bootstap on x86_64-linux-gnu, CentOS 5.11:
gmake[4]: Entering directory `/home/uros/gcc-build/libcc1'
/bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I.
-I../../gcc-svn/trunk/libcc1 -I ../../gcc-svn/trunk/libcc1/../include
-I ../../gcc-svn/trunk/libcc1/../libgcc -I .././gcc
-I../../gcc-svn/trunk/libcc1/../gcc -I
../../gcc-svn/trunk/libcc1/../gcc/c -I
../../gcc-svn/trunk/libcc1/../gcc/c-family -I
../../gcc-svn/trunk/libcc1/../libcpp/include -W -Wall -Werror -Werror
-fvisibility=hidden -g -MT plugin.lo -MD -MP -MF .deps/plugin.Tpo -c
-o plugin.lo ../../gcc-svn/trunk/libcc1/plugin.cc
libtool: compile: g++ -DHAVE_CONFIG_H -I.
-I../../gcc-svn/trunk/libcc1 -I ../../gcc-svn/trunk/libcc1/../include
-I ../../gcc-svn/trunk/libcc1/../libgcc -I .././gcc
-I../../gcc-svn/trunk/libcc1/../gcc -I
../../gcc-svn/trunk/libcc1/../gcc/c -I
../../gcc-svn/trunk/libcc1/../gcc/c-family -I
../../gcc-svn/trunk/libcc1/../libcpp/include -W -Wall -Werror -Werror
-fvisibility=hidden -g -MT plugin.lo -MD -MP -MF .deps/plugin.Tpo -c
../../gcc-svn/trunk/libcc1/plugin.cc -fPIC -DPIC -o .libs/plugin.o
cc1plus: warnings being treated as errors
../../gcc-svn/trunk/libcc1/../gcc/hash-table.h: In instantiation of
‘hash_table<pointer_hash<tree_node>, xcallocator, true>’:
../../gcc-svn/trunk/libcc1/plugin.cc:171: instantiated from here
../../gcc-svn/trunk/libcc1/../gcc/hash-table.h:1161: warning: lowering
visibility of ‘void gt_ggc_mx(hash_table<T, xcallocator,
storage_tester<T,void>::value>*) [with T = T, Descriptor =
pointer_hash<tree_node>, Allocator = xcallocator]’ to match its type
../../gcc-svn/trunk/libcc1/../gcc/hash-table.h:1162: warning: lowering
visibility of ‘void gt_pch_nx(hash_table<T, xcallocator,
storage_tester<T,void>::value>*) [with T = T, Descriptor =
pointer_hash<tree_node>, Allocator = xcallocator]’ to match its type
../../gcc-svn/trunk/libcc1/../gcc/hash-table.h:1166: warning: lowering
visibility of ‘void gt_pch_nx(hash_map<T, U, V>*, void (*)(void*,
void*), void*) [with T = T, U = U, V = V, Descriptor =
pointer_hash<tree_node>, Allocator = xcallocator]’ to match its type
../../gcc-svn/trunk/libcc1/../gcc/hash-table.h:1169: warning: lowering
visibility of ‘void gt_pch_nx(hash_set<T, U>*, void (*)(void*, void*),
void*) [with T = T, U = U, Descriptor = pointer_hash<tree_node>,
Allocator = xcallocator]’ to match its type
../../gcc-svn/trunk/libcc1/../gcc/hash-table.h:1171: warning: lowering
visibility of ‘void gt_pch_nx(hash_table<T, xcallocator,
storage_tester<T,void>::value>*, void (*)(void*, void*), void*) [with
T = T, Descriptor = pointer_hash<tree_node>, Allocator = xcallocator]’
to match its type
gmake[4]: *** [plugin.lo] Error 1
gmake[4]: Leaving directory `/home/uros/gcc-build/libcc1'
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory `/home/uros/gcc-build/libcc1'
gmake[2]: *** [all-stage1-libcc1] Error 2
gmake[2]: Leaving directory `/home/uros/gcc-build'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/home/uros/gcc-build'
gmake: *** [all] Error 2
Uros.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] add libcc1 2014-10-28 8:43 [PATCH 5/5] add libcc1 Uros Bizjak @ 2014-10-28 8:55 ` Phil Muldoon 2014-10-28 9:21 ` Uros Bizjak 2014-10-28 9:36 ` Jakub Jelinek 1 sibling, 1 reply; 15+ messages in thread From: Phil Muldoon @ 2014-10-28 8:55 UTC (permalink / raw) To: Uros Bizjak, gcc-patches; +Cc: Tom Tromey, Jakub Jelinek, Jeff Law On 28/10/14 08:36, Uros Bizjak wrote: >> This patch has now been committed. > Also breaks bootstap on x86_64-linux-gnu, CentOS 5.11: > > gmake[4]: Entering directory `/home/uros/gcc-build/libcc1' > /bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. > -I../../gcc-svn/trunk/libcc1 -I ../../gcc-svn/trunk/libcc1/../include > -I ../../gcc-svn/trunk/libcc1/../libgcc -I .././gcc > -I../../gcc-svn/trunk/libcc1/../gcc -I Weird, I bootstrapped my build on x8664 Fedora 20 and saw no issues. Can you please provide me your build/configure parameters? Cheers Phil ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] add libcc1 2014-10-28 8:55 ` Phil Muldoon @ 2014-10-28 9:21 ` Uros Bizjak 0 siblings, 0 replies; 15+ messages in thread From: Uros Bizjak @ 2014-10-28 9:21 UTC (permalink / raw) To: Phil Muldoon; +Cc: gcc-patches, Tom Tromey, Jakub Jelinek, Jeff Law On Tue, Oct 28, 2014 at 9:50 AM, Phil Muldoon <pmuldoon@redhat.com> wrote: > On 28/10/14 08:36, Uros Bizjak wrote: >>> This patch has now been committed. >> Also breaks bootstap on x86_64-linux-gnu, CentOS 5.11: >> >> gmake[4]: Entering directory `/home/uros/gcc-build/libcc1' >> /bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. >> -I../../gcc-svn/trunk/libcc1 -I ../../gcc-svn/trunk/libcc1/../include >> -I ../../gcc-svn/trunk/libcc1/../libgcc -I .././gcc >> -I../../gcc-svn/trunk/libcc1/../gcc -I > > Weird, I bootstrapped my build on x8664 Fedora 20 and saw no issues. Can you please > provide me your build/configure parameters? This failure is in stage1 due to -Werror in combination with default CentOS gcc-4.1.x compiler: gcc version 4.1.2 20080704 (Red Hat 4.1.2-55) Stage1 libraries should not be compiled with -Werror, since the default system compiler can have issues with warnings. Uros. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] add libcc1 2014-10-28 8:43 [PATCH 5/5] add libcc1 Uros Bizjak 2014-10-28 8:55 ` Phil Muldoon @ 2014-10-28 9:36 ` Jakub Jelinek 2014-10-28 9:58 ` Uros Bizjak 1 sibling, 1 reply; 15+ messages in thread From: Jakub Jelinek @ 2014-10-28 9:36 UTC (permalink / raw) To: Uros Bizjak; +Cc: gcc-patches, Tom Tromey, Jeff Law, pmuldoon On Tue, Oct 28, 2014 at 09:36:45AM +0100, Uros Bizjak wrote: > > This patch has now been committed. > > Also breaks bootstap on x86_64-linux-gnu, CentOS 5.11: For -Werror, I'd think that should fix that, WARN_FLAGS should already contain -Werror during stage2/stage3 unless --disable-werror. Untested though. --- libcc1/Makefile.am 2014-10-28 09:07:57.443711725 +0100 +++ libcc1/Makefile.am 2014-10-28 10:32:09.712135034 +0100 @@ -22,8 +22,7 @@ AM_CPPFLAGS = -I $(srcdir)/../include -I -I $(gcc_build_dir) -I$(srcdir)/../gcc \ -I $(srcdir)/../gcc/c -I $(srcdir)/../gcc/c-family \ -I $(srcdir)/../libcpp/include -WERROR_FLAG = -Werror -AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR_FLAG) $(visibility) +AM_CXXFLAGS = $(WARN_FLAGS) $(visibility) override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS)) override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS)) # Can be simplified when libiberty becomes a normal convenience library. --- libcc1/Makefile.in 2014-10-28 09:08:01.689922599 +0100 +++ libcc1/Makefile.in 2014-10-28 10:32:21.376918921 +0100 @@ -249,8 +249,7 @@ AM_CPPFLAGS = -I $(srcdir)/../include -I -I $(srcdir)/../gcc/c -I $(srcdir)/../gcc/c-family \ -I $(srcdir)/../libcpp/include -WERROR_FLAG = -Werror -AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR_FLAG) $(visibility) +AM_CXXFLAGS = $(WARN_FLAGS) $(visibility) # Can be simplified when libiberty becomes a normal convenience library. libiberty_normal = ../libiberty/libiberty.a libiberty_noasan = ../libiberty/noasan/libiberty.a Jakub ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] add libcc1 2014-10-28 9:36 ` Jakub Jelinek @ 2014-10-28 9:58 ` Uros Bizjak 2014-10-28 10:51 ` Phil Muldoon 0 siblings, 1 reply; 15+ messages in thread From: Uros Bizjak @ 2014-10-28 9:58 UTC (permalink / raw) To: Jakub Jelinek; +Cc: gcc-patches, Tom Tromey, Jeff Law, Phil Muldoon On Tue, Oct 28, 2014 at 10:35 AM, Jakub Jelinek <jakub@redhat.com> wrote: > On Tue, Oct 28, 2014 at 09:36:45AM +0100, Uros Bizjak wrote: >> > This patch has now been committed. >> >> Also breaks bootstap on x86_64-linux-gnu, CentOS 5.11: > > For -Werror, I'd think that should fix that, WARN_FLAGS should > already contain -Werror during stage2/stage3 unless --disable-werror. > Untested though. No, it still fails, although with one -Werror less in the compile flags: gmake[4]: Entering directory `/home/uros/gcc-build/libcc1' /bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../gcc-svn/trunk/libcc1 -I ../../gcc-svn/trunk/libcc1/../include -I ../../gcc-svn/trunk/libcc1/../libgcc -I .././gcc -I../../gcc-svn/trunk/libcc1/../gcc -I ../../gcc-svn/trunk/libcc1/../gcc/c -I ../../gcc-svn/trunk/libcc1/../gcc/c-family -I ../../gcc-svn/trunk/libcc1/../libcpp/include -W -Wall -Werror -fvisibility=hidden -g -MT plugin.lo -MD -MP -MF .deps/plugin.Tpo -c -o plugin.lo ../../gcc-svn/trunk/libcc1/plugin.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../gcc-svn/trunk/libcc1 -I ../../gcc-svn/trunk/libcc1/../include -I ../../gcc-svn/trunk/libcc1/../libgcc -I .././gcc -I../../gcc-svn/trunk/libcc1/../gcc -I ../../gcc-svn/trunk/libcc1/../gcc/c -I ../../gcc-svn/trunk/libcc1/../gcc/c-family -I ../../gcc-svn/trunk/libcc1/../libcpp/include -W -Wall -Werror -fvisibility=hidden -g -MT plugin.lo -MD -MP -MF .deps/plugin.Tpo -c ../../gcc-svn/trunk/libcc1/plugin.cc -fPIC -DPIC -o .libs/plugin.o cc1plus: warnings being treated as errors ../../gcc-svn/trunk/libcc1/../gcc/hash-table.h: In instantiation of ‘hash_table<pointer_hash<tree_node>, xcallocator, true>’: ../../gcc-svn/trunk/libcc1/plugin.cc:171: instantiated from here ../../gcc-svn/trunk/libcc1/../gcc/hash-table.h:1161: warning: lowering visibility of ‘void gt_ggc_mx(hash_table<T, xcallocator, storage_tester<T,void>::value>*) [with T = T, Descriptor = pointer_hash<tree_node>, Allocator = xcallocator]’ to match its type ../../gcc-svn/trunk/libcc1/../gcc/hash-table.h:1162: warning: lowering visibility of ‘void gt_pch_nx(hash_table<T, xcallocator, storage_tester<T,void>::value>*) [with T = T, Descriptor = pointer_hash<tree_node>, Allocator = xcallocator]’ to match its type ../../gcc-svn/trunk/libcc1/../gcc/hash-table.h:1166: warning: lowering visibility of ‘void gt_pch_nx(hash_map<T, U, V>*, void (*)(void*, void*), void*) [with T = T, U = U, V = V, Descriptor = pointer_hash<tree_node>, Allocator = xcallocator]’ to match its type ../../gcc-svn/trunk/libcc1/../gcc/hash-table.h:1169: warning: lowering visibility of ‘void gt_pch_nx(hash_set<T, U>*, void (*)(void*, void*), void*) [with T = T, U = U, Descriptor = pointer_hash<tree_node>, Allocator = xcallocator]’ to match its type ../../gcc-svn/trunk/libcc1/../gcc/hash-table.h:1171: warning: lowering visibility of ‘void gt_pch_nx(hash_table<T, xcallocator, storage_tester<T,void>::value>*, void (*)(void*, void*), void*) [with T = T, Descriptor = pointer_hash<tree_node>, Allocator = xcallocator]’ to match its type gmake[4]: *** [plugin.lo] Error 1 gmake[4]: Leaving directory `/home/uros/gcc-build/libcc1' gmake[3]: *** [all] Error 2 gmake[3]: Leaving directory `/home/uros/gcc-build/libcc1' gmake[2]: *** [all-stage1-libcc1] Error 2 gmake[2]: Leaving directory `/home/uros/gcc-build' gmake[1]: *** [stage1-bubble] Error 2 gmake[1]: Leaving directory `/home/uros/gcc-build' gmake: *** [all] Error 2 I wonder if at this point just compiled gcc/xg++ and not system compiler should be used? Uros. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] add libcc1 2014-10-28 9:58 ` Uros Bizjak @ 2014-10-28 10:51 ` Phil Muldoon 2014-10-28 10:56 ` Uros Bizjak 0 siblings, 1 reply; 15+ messages in thread From: Phil Muldoon @ 2014-10-28 10:51 UTC (permalink / raw) To: Uros Bizjak, Jakub Jelinek; +Cc: gcc-patches, Tom Tromey, Jeff Law On 28/10/14 09:57, Uros Bizjak wrote: > On Tue, Oct 28, 2014 at 10:35 AM, Jakub Jelinek <jakub@redhat.com> wrote: >> On Tue, Oct 28, 2014 at 09:36:45AM +0100, Uros Bizjak wrote: >>>> This patch has now been committed. >>> >>> Also breaks bootstap on x86_64-linux-gnu, CentOS 5.11: >> >> For -Werror, I'd think that should fix that, WARN_FLAGS should >> already contain -Werror during stage2/stage3 unless --disable-werror. >> Untested though. > > No, it still fails, although with one -Werror less in the compile flags: Does removing it from configure.ac and regenerating configure work? I don't have access to a system compiler of the version you have, so I am unable to test. Cheers Phil -- Index: Makefile.am =================================================================== --- Makefile.am (revision 216776) +++ Makefile.am (working copy) @@ -22,8 +22,7 @@ -I $(gcc_build_dir) -I$(srcdir)/../gcc \ -I $(srcdir)/../gcc/c -I $(srcdir)/../gcc/c-family \ -I $(srcdir)/../libcpp/include -WERROR_FLAG = -Werror -AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR_FLAG) $(visibility) +AM_CXXFLAGS = $(WARN_FLAGS) $(visibility) libiberty = ../libiberty/pic/libiberty.a Index: Makefile.in =================================================================== --- Makefile.in (revision 216776) +++ Makefile.in (working copy) @@ -257,8 +257,7 @@ -I $(srcdir)/../gcc/c -I $(srcdir)/../gcc/c-family \ -I $(srcdir)/../libcpp/include -WERROR_FLAG = -Werror -AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR_FLAG) $(visibility) +AM_CXXFLAGS = $(WARN_FLAGS) $(visibility) libiberty = ../libiberty/pic/libiberty.a plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin cc1libdir = $(libdir)/$(libsuffix) Index: configure =================================================================== --- configure (revision 216776) +++ configure (working copy) @@ -14342,7 +14342,7 @@ done CFLAGS="$save_CFLAGS" -WARN_FLAGS="$WARN_FLAGS -Werror" +WARN_FLAGS="$WARN_FLAGS" libsuffix= Index: configure.ac =================================================================== --- configure.ac (revision 216776) +++ configure.ac (working copy) @@ -52,7 +52,7 @@ AC_SUBST(gcc_version) ACX_PROG_CC_WARNING_OPTS([-W -Wall], [WARN_FLAGS]) -WARN_FLAGS="$WARN_FLAGS -Werror" +WARN_FLAGS="$WARN_FLAGS" AC_SUBST(WARN_FLAGS) libsuffix= ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] add libcc1 2014-10-28 10:51 ` Phil Muldoon @ 2014-10-28 10:56 ` Uros Bizjak 2014-10-28 11:16 ` Phil Muldoon 2014-10-28 11:53 ` Phil Muldoon 0 siblings, 2 replies; 15+ messages in thread From: Uros Bizjak @ 2014-10-28 10:56 UTC (permalink / raw) To: Phil Muldoon; +Cc: Jakub Jelinek, gcc-patches, Tom Tromey, Jeff Law On Tue, Oct 28, 2014 at 11:35 AM, Phil Muldoon <pmuldoon@redhat.com> wrote: >>>>> This patch has now been committed. >>>> >>>> Also breaks bootstap on x86_64-linux-gnu, CentOS 5.11: >>> >>> For -Werror, I'd think that should fix that, WARN_FLAGS should >>> already contain -Werror during stage2/stage3 unless --disable-werror. >>> Untested though. >> >> No, it still fails, although with one -Werror less in the compile flags: > > Does removing it from configure.ac and regenerating configure work? > > I don't have access to a system compiler of the version you have, so I > am unable to test. Yes, this patch allows bootstrap to pass stage1, although with a new warning: *** Warning: Linking the shared library libcc1.la against the *** static library ../libiberty/pic/libiberty.a is not portable! Thanks, Uros. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] add libcc1 2014-10-28 10:56 ` Uros Bizjak @ 2014-10-28 11:16 ` Phil Muldoon 2014-10-28 11:53 ` Phil Muldoon 1 sibling, 0 replies; 15+ messages in thread From: Phil Muldoon @ 2014-10-28 11:16 UTC (permalink / raw) To: Uros Bizjak; +Cc: Jakub Jelinek, gcc-patches, Tom Tromey, Jeff Law On 28/10/14 10:51, Uros Bizjak wrote: > On Tue, Oct 28, 2014 at 11:35 AM, Phil Muldoon <pmuldoon@redhat.com> wrote: > >>>>>> This patch has now been committed. >>>>> Also breaks bootstap on x86_64-linux-gnu, CentOS 5.11: >>>> For -Werror, I'd think that should fix that, WARN_FLAGS should >>>> already contain -Werror during stage2/stage3 unless --disable-werror. >>>> Untested though. >>> No, it still fails, although with one -Werror less in the compile flags: >> Does removing it from configure.ac and regenerating configure work? >> >> I don't have access to a system compiler of the version you have, so I >> am unable to test. > Yes, this patch allows bootstrap to pass stage1, although with a new warning: > > *** Warning: Linking the shared library libcc1.la against the > *** static library ../libiberty/pic/libiberty.a is not portable! > > Thanks, > Uros. Yeah there is a separate issue with the way we link libiberty in Makefile.am. I am investigating and attempting to fix this right now. Cheers Phil ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] add libcc1 2014-10-28 10:56 ` Uros Bizjak 2014-10-28 11:16 ` Phil Muldoon @ 2014-10-28 11:53 ` Phil Muldoon 2014-10-28 12:24 ` Jakub Jelinek 1 sibling, 1 reply; 15+ messages in thread From: Phil Muldoon @ 2014-10-28 11:53 UTC (permalink / raw) To: Uros Bizjak; +Cc: Jakub Jelinek, gcc-patches, Tom Tromey, Jeff Law On 28/10/14 10:51, Uros Bizjak wrote: > On Tue, Oct 28, 2014 at 11:35 AM, Phil Muldoon <pmuldoon@redhat.com> wrote: > >>>>>> This patch has now been committed. >>>>> >>>>> Also breaks bootstap on x86_64-linux-gnu, CentOS 5.11: >>>> >>>> For -Werror, I'd think that should fix that, WARN_FLAGS should >>>> already contain -Werror during stage2/stage3 unless --disable-werror. >>>> Untested though. >>> >>> No, it still fails, although with one -Werror less in the compile flags: >> >> Does removing it from configure.ac and regenerating configure work? >> >> I don't have access to a system compiler of the version you have, so I >> am unable to test. > > Yes, this patch allows bootstrap to pass stage1, although with a new warning: > > *** Warning: Linking the shared library libcc1.la against the > *** static library ../libiberty/pic/libiberty.a is not portable! > > Thanks, > Uros. I think I have a solution. Though my automake fu is very weak. Does this patch work for you? I'm really not sure how to deal with the three possible versions of libiberty any other way. Cheers Phil -- Index: Makefile.in =================================================================== --- Makefile.in (revision 216776) +++ Makefile.in (working copy) @@ -81,7 +81,8 @@ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(cc1libdir)" "$(DESTDIR)$(plugindir)" LTLIBRARIES = $(cc1lib_LTLIBRARIES) $(plugin_LTLIBRARIES) -libcc1_la_DEPENDENCIES = $(libiberty) +libcc1_la_DEPENDENCIES = $(if $(wildcard $(libiberty_noasan)),, $(if \ + $(wildcard $(libiberty_pic)),,$(libiberty))) am__objects_1 = callbacks.lo connection.lo marshall.lo am_libcc1_la_OBJECTS = findcomp.lo libcc1.lo names.lo $(am__objects_1) libcc1_la_OBJECTS = $(am_libcc1_la_OBJECTS) @@ -89,7 +90,8 @@ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libcc1_la_LDFLAGS) $(LDFLAGS) -o $@ @ENABLE_PLUGIN_TRUE@am_libcc1_la_rpath = -rpath $(cc1libdir) -libcc1plugin_la_DEPENDENCIES = $(libiberty) +libcc1plugin_la_DEPENDENCIES = $(if $(wildcard $(libiberty_noasan)),, \ + $(if $(wildcard $(libiberty_pic)),,$(libiberty))) am_libcc1plugin_la_OBJECTS = plugin.lo $(am__objects_1) libcc1plugin_la_OBJECTS = $(am_libcc1plugin_la_OBJECTS) libcc1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ @@ -257,9 +259,10 @@ -I $(srcdir)/../gcc/c -I $(srcdir)/../gcc/c-family \ -I $(srcdir)/../libcpp/include -WERROR_FLAG = -Werror -AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR_FLAG) $(visibility) -libiberty = ../libiberty/pic/libiberty.a +AM_CXXFLAGS = $(WARN_FLAGS) $(visibility) +libiberty = ../libiberty/libiberty.a +libiberty_noasan = ../libiberty/noasan/libiberty.a +libiberty_pic = ../libiberty/pic/libiberty.a plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin cc1libdir = $(libdir)/$(libsuffix) @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la @@ -270,10 +273,16 @@ libcc1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1plugin.sym libcc1plugin_la_SOURCES = plugin.cc $(shared_source) -libcc1plugin_la_LIBADD = $(libiberty) +libcc1plugin_la_LIBADD = \ + $(if $(wildcard $(libiberty_noasan)),, \ + $(if $(wildcard $(libiberty_pic)),,$(libiberty))) + libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym libcc1_la_SOURCES = findcomp.cc libcc1.cc names.cc names.hh $(shared_source) -libcc1_la_LIBADD = $(libiberty) +libcc1_la_LIBADD = \ + $(if $(wildcard $(libiberty_noasan)),, \ + $(if $(wildcard $(libiberty_pic)),,$(libiberty))) + all: $(BUILT_SOURCES) cc1plugin-config.h $(MAKE) $(AM_MAKEFLAGS) all-am Index: Makefile.am =================================================================== --- Makefile.am (revision 216776) +++ Makefile.am (working copy) @@ -22,10 +22,11 @@ -I $(gcc_build_dir) -I$(srcdir)/../gcc \ -I $(srcdir)/../gcc/c -I $(srcdir)/../gcc/c-family \ -I $(srcdir)/../libcpp/include -WERROR_FLAG = -Werror -AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR_FLAG) $(visibility) -libiberty = ../libiberty/pic/libiberty.a +AM_CXXFLAGS = $(WARN_FLAGS) $(visibility) +libiberty = ../libiberty/libiberty.a +libiberty_noasan = ../libiberty/noasan/libiberty.a +libiberty_pic = ../libiberty/pic/libiberty.a plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin cc1libdir = $(libdir)/$(libsuffix) @@ -48,8 +49,13 @@ libcc1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1plugin.sym libcc1plugin_la_SOURCES = plugin.cc $(shared_source) -libcc1plugin_la_LIBADD = $(libiberty) +libcc1plugin_la_LIBADD = \ + $(if $(wildcard $(libiberty_noasan)),, \ + $(if $(wildcard $(libiberty_pic)),,$(libiberty))) libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym libcc1_la_SOURCES = findcomp.cc libcc1.cc names.cc names.hh $(shared_source) -libcc1_la_LIBADD = $(libiberty) +libcc1_la_LIBADD = \ + $(if $(wildcard $(libiberty_noasan)),, \ + $(if $(wildcard $(libiberty_pic)),,$(libiberty))) + ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] add libcc1 2014-10-28 11:53 ` Phil Muldoon @ 2014-10-28 12:24 ` Jakub Jelinek 2014-10-30 5:16 ` Jeff Law 2014-10-30 8:50 ` Thomas Schwinge 0 siblings, 2 replies; 15+ messages in thread From: Jakub Jelinek @ 2014-10-28 12:24 UTC (permalink / raw) To: Phil Muldoon; +Cc: Uros Bizjak, gcc-patches, Tom Tromey, Jeff Law On Tue, Oct 28, 2014 at 11:47:31AM +0000, Phil Muldoon wrote: > I think I have a solution. Though my automake fu is very weak. Does > this patch work for you? I'm really not sure how to deal with the > three possible versions of libiberty any other way. That is insufficient, a) you don't filter away -fsanitize=address, which would make it unusable in gdb b) without the -Wc, stuff, you get the ugly libtool warnings c) the LTLDFLAGS mess is needed for libtool not eating the -Wc, stuff I've in the mean time successfully bootstrapped/regtested my patch on i686-linux (--with-build-config=bootstrap-ubsan), that was build without ada, on x86_64-linux the build failed because of some recent ada vs. bootstrap-ubsan incompatibilities unrelated to libcc1 (but libcc1 built fine). So I'm proposing my patch (which is modeled after lto-plugin changes by myself and others), with the -Werror stuff handled separately as follow-up. Ok for trunk? 2014-10-28 Jakub Jelinek <jakub@redhat.com> * Makefile.am (CXXFLAGS, LDFLAGS): Filter out -fsanitize=address. (libiberty_normal, libiberty_noasan, libiberty_pic, libiberty_dep): New variables. (libiberty): Set to -Wc, followed by the first existing noasan/, pic/ or . libiberty.a. (libcc1plugin_la_DEPENDENCIES, libcc1plugin_la_LINK, libcc1_la_DEPENDENCIES, libcc1_la_LINK, LTLDFLAGS): New variables. * Makefile.in: Regenerated. --- libcc1/Makefile.am.jj 2014-10-27 19:41:13.000000000 +0100 +++ libcc1/Makefile.am 2014-10-28 09:07:57.443711725 +0100 @@ -24,8 +24,17 @@ AM_CPPFLAGS = -I $(srcdir)/../include -I -I $(srcdir)/../libcpp/include WERROR_FLAG = -Werror AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR_FLAG) $(visibility) -libiberty = ../libiberty/pic/libiberty.a - +override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS)) +override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS)) +# Can be simplified when libiberty becomes a normal convenience library. +libiberty_normal = ../libiberty/libiberty.a +libiberty_noasan = ../libiberty/noasan/libiberty.a +libiberty_pic = ../libiberty/pic/libiberty.a +Wc=-Wc, +libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ + $(if $(wildcard $(libiberty_pic)),$(Wc)$(libiberty_pic), \ + $(Wc)$(libiberty_normal))) +libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin cc1libdir = $(libdir)/$(libsuffix) @@ -49,7 +58,16 @@ shared_source = callbacks.cc callbacks.h libcc1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1plugin.sym libcc1plugin_la_SOURCES = plugin.cc $(shared_source) libcc1plugin_la_LIBADD = $(libiberty) +libcc1plugin_la_DEPENDENCIES = $(libiberty_dep) +libcc1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(libcc1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@ +LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym libcc1_la_SOURCES = findcomp.cc libcc1.cc names.cc names.hh $(shared_source) libcc1_la_LIBADD = $(libiberty) +libcc1_la_DEPENDENCIES = $(libiberty_dep) +libcc1_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(libcc1_la_LDFLAGS) $(LTLDFLAGS) -o $@ --- libcc1/Makefile.in.jj 2014-10-27 19:41:13.000000000 +0100 +++ libcc1/Makefile.in 2014-10-28 09:08:01.689922599 +0100 @@ -81,20 +81,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(cc1libdir)" "$(DESTDIR)$(plugindir)" LTLIBRARIES = $(cc1lib_LTLIBRARIES) $(plugin_LTLIBRARIES) -libcc1_la_DEPENDENCIES = $(libiberty) am__objects_1 = callbacks.lo connection.lo marshall.lo am_libcc1_la_OBJECTS = findcomp.lo libcc1.lo names.lo $(am__objects_1) libcc1_la_OBJECTS = $(am_libcc1_la_OBJECTS) -libcc1_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(libcc1_la_LDFLAGS) $(LDFLAGS) -o $@ @ENABLE_PLUGIN_TRUE@am_libcc1_la_rpath = -rpath $(cc1libdir) -libcc1plugin_la_DEPENDENCIES = $(libiberty) am_libcc1plugin_la_OBJECTS = plugin.lo $(am__objects_1) libcc1plugin_la_OBJECTS = $(am_libcc1plugin_la_OBJECTS) -libcc1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(libcc1plugin_la_LDFLAGS) $(LDFLAGS) -o $@ @ENABLE_PLUGIN_TRUE@am_libcc1plugin_la_rpath = -rpath $(plugindir) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/../depcomp @@ -259,7 +251,16 @@ AM_CPPFLAGS = -I $(srcdir)/../include -I WERROR_FLAG = -Werror AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR_FLAG) $(visibility) -libiberty = ../libiberty/pic/libiberty.a +# Can be simplified when libiberty becomes a normal convenience library. +libiberty_normal = ../libiberty/libiberty.a +libiberty_noasan = ../libiberty/noasan/libiberty.a +libiberty_pic = ../libiberty/pic/libiberty.a +Wc = -Wc, +libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ + $(if $(wildcard $(libiberty_pic)),$(Wc)$(libiberty_pic), \ + $(Wc)$(libiberty_normal))) + +libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin cc1libdir = $(libdir)/$(libsuffix) @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la @@ -271,9 +272,20 @@ shared_source = callbacks.cc callbacks.h libcc1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1plugin.sym libcc1plugin_la_SOURCES = plugin.cc $(shared_source) libcc1plugin_la_LIBADD = $(libiberty) +libcc1plugin_la_DEPENDENCIES = $(libiberty_dep) +libcc1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(libcc1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@ + +LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym libcc1_la_SOURCES = findcomp.cc libcc1.cc names.cc names.hh $(shared_source) libcc1_la_LIBADD = $(libiberty) +libcc1_la_DEPENDENCIES = $(libiberty_dep) +libcc1_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(libcc1_la_LDFLAGS) $(LTLDFLAGS) -o $@ + all: $(BUILT_SOURCES) cc1plugin-config.h $(MAKE) $(AM_MAKEFLAGS) all-am @@ -619,6 +631,8 @@ uninstall-am: uninstall-cc1libLTLIBRARIE pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-cc1libLTLIBRARIES uninstall-pluginLTLIBRARIES +override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS)) +override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS)) # Put this in a header so we don't run sed for each compilation. This # is also simpler to debug as one can easily see the constant. Jakub ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] add libcc1 2014-10-28 12:24 ` Jakub Jelinek @ 2014-10-30 5:16 ` Jeff Law 2014-10-30 8:50 ` Thomas Schwinge 1 sibling, 0 replies; 15+ messages in thread From: Jeff Law @ 2014-10-30 5:16 UTC (permalink / raw) To: Jakub Jelinek, Phil Muldoon; +Cc: Uros Bizjak, gcc-patches, Tom Tromey On 10/28/14 06:23, Jakub Jelinek wrote: > On Tue, Oct 28, 2014 at 11:47:31AM +0000, Phil Muldoon wrote: >> I think I have a solution. Though my automake fu is very weak. Does >> this patch work for you? I'm really not sure how to deal with the >> three possible versions of libiberty any other way. > > That is insufficient, > a) you don't filter away -fsanitize=address, which would make it > unusable in gdb > b) without the -Wc, stuff, you get the ugly libtool warnings > c) the LTLDFLAGS mess is needed for libtool not eating the -Wc, stuff > > I've in the mean time successfully bootstrapped/regtested my patch on > i686-linux (--with-build-config=bootstrap-ubsan), that was build without > ada, on x86_64-linux the build failed because of some recent ada vs. > bootstrap-ubsan incompatibilities unrelated to libcc1 (but libcc1 built > fine). > > So I'm proposing my patch (which is modeled after lto-plugin changes by > myself and others), with the -Werror stuff handled separately as follow-up. > Ok for trunk? > > 2014-10-28 Jakub Jelinek <jakub@redhat.com> > > * Makefile.am (CXXFLAGS, LDFLAGS): Filter out -fsanitize=address. > (libiberty_normal, libiberty_noasan, libiberty_pic, libiberty_dep): > New variables. > (libiberty): Set to -Wc, followed by the first existing noasan/, > pic/ or . libiberty.a. > (libcc1plugin_la_DEPENDENCIES, libcc1plugin_la_LINK, > libcc1_la_DEPENDENCIES, libcc1_la_LINK, LTLDFLAGS): New variables. > * Makefile.in: Regenerated. Ick. But OK I guess. jeff ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] add libcc1 2014-10-28 12:24 ` Jakub Jelinek 2014-10-30 5:16 ` Jeff Law @ 2014-10-30 8:50 ` Thomas Schwinge 2014-10-30 8:56 ` Jakub Jelinek 1 sibling, 1 reply; 15+ messages in thread From: Thomas Schwinge @ 2014-10-30 8:50 UTC (permalink / raw) To: Jakub Jelinek Cc: Uros Bizjak, gcc-patches, Tom Tromey, Jeff Law, Phil Muldoon [-- Attachment #1: Type: text/plain, Size: 4498 bytes --] Hi! On Tue, 28 Oct 2014 13:23:50 +0100, Jakub Jelinek <jakub@redhat.com> wrote: > On Tue, Oct 28, 2014 at 11:47:31AM +0000, Phil Muldoon wrote: > > I think I have a solution. Though my automake fu is very weak. Does > > this patch work for you? I'm really not sure how to deal with the > > three possible versions of libiberty any other way. > > That is insufficient, > a) you don't filter away -fsanitize=address, which would make it > unusable in gdb > b) without the -Wc, stuff, you get the ugly libtool warnings > c) the LTLDFLAGS mess is needed for libtool not eating the -Wc, stuff > So I'm proposing my patch (which is modeled after lto-plugin changes by > myself and others), [...] (Maybe we should now turn that into generic infrastructure?) > 2014-10-28 Jakub Jelinek <jakub@redhat.com> > > * Makefile.am (CXXFLAGS, LDFLAGS): Filter out -fsanitize=address. > (libiberty_normal, libiberty_noasan, libiberty_pic, libiberty_dep): > New variables. > (libiberty): Set to -Wc, followed by the first existing noasan/, > pic/ or . libiberty.a. > (libcc1plugin_la_DEPENDENCIES, libcc1plugin_la_LINK, > libcc1_la_DEPENDENCIES, libcc1_la_LINK, LTLDFLAGS): New variables. > * Makefile.in: Regenerated. ;-) To re-use your words: »That is insufficient«, d) in a configuration where there is no lto-plugin built, we now try to link the shared libcc1 against a static libiberty: /bin/bash ./libtool --tag=CXX --mode=link g++ -m64 [...] -module -export-symbols [...]/source-gcc/libcc1/libcc1.sym -Xcompiler '-static-libstdc++' -Xcompiler '-static-libgcc' -o libcc1.la -rpath /lib/../lib64 findcomp.lo libcc1.lo names.lo callbacks.lo connection.lo marshall.lo -Wc,../libiberty/libiberty.a libtool: link: g++ -m64 [...] -shared -nostdlib [...]/crti.o [...]/crtbeginS.o .libs/findcomp.o .libs/libcc1.o .libs/names.o .libs/callbacks.o .libs/connection.o .libs/marshall.o [...] -lstdc++ -lm -lc -lgcc_s [...]/crtendS.o [...]/crtn.o -m64 [...] -static-libstdc++ -static-libgcc ../libiberty/libiberty.a -Wl,-soname -Wl,libcc1.so.0 -Wl,-retain-symbols-file -Wl,[...]/source-gcc/libcc1/libcc1.sym -o .libs/libcc1.so.0.0.0 [...]/ld: ../libiberty/libiberty.a(regex.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC ../libiberty/libiberty.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[3]: *** [libcc1.la] Error 1 make[3]: Leaving directory `[...]/build-gcc/libcc1' make[2]: *** [all] Error 2 make[2]: Leaving directory `[...]/build-gcc/libcc1' make[1]: *** [all-libcc1] Error 2 make[1]: Leaving directory `[...]/build-gcc' make: *** [all] Error 2 Here is a patch that I'm testing; OK? I didn't understand what the conditions are that libcc1 might not be built as a shared library: is it always built as one -- but is that really supported on all systems? If that's indeed true, then this could be further simplified, and --enable-shared passed to the host libiberty unconditionally. --- configure.ac +++ configure.ac @@ -1865,7 +1865,6 @@ if test -d ${srcdir}/gcc; then new_enable_languages=,c, # If LTO is enabled, add the LTO front end. - extra_host_libiberty_configure_flags= if test "$enable_lto" = "yes" ; then case ,${enable_languages}, in *,lto,*) ;; @@ -1873,10 +1872,8 @@ if test -d ${srcdir}/gcc; then esac if test "${build_lto_plugin}" = "yes" ; then configdirs="$configdirs lto-plugin" - extra_host_libiberty_configure_flags=--enable-shared fi fi - AC_SUBST(extra_host_libiberty_configure_flags) missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` potential_languages=,c, @@ -2190,6 +2187,17 @@ then esac fi +# Sometimes we have special requirements for the host libiberty. +extra_host_libiberty_configure_flags= +case " $configdirs " in + *" lto-plugin "* | *" libcc1 "*) + # When these are to be built as shared libraries, the same applies to + # libiberty. + extra_host_libiberty_configure_flags=--enable-shared + ;; +esac +AC_SUBST(extra_host_libiberty_configure_flags) + # Produce a warning message for the subdirs we can't configure. # This isn't especially interesting in the Cygnus tree, but in the individual # FSF releases, it's important to let people know when their machine isn't Grüße, Thomas [-- Attachment #2: Type: application/pgp-signature, Size: 472 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] add libcc1 2014-10-30 8:50 ` Thomas Schwinge @ 2014-10-30 8:56 ` Jakub Jelinek 2014-10-30 10:43 ` Thomas Schwinge 0 siblings, 1 reply; 15+ messages in thread From: Jakub Jelinek @ 2014-10-30 8:56 UTC (permalink / raw) To: Thomas Schwinge Cc: Uros Bizjak, gcc-patches, Tom Tromey, Jeff Law, Phil Muldoon On Thu, Oct 30, 2014 at 09:33:08AM +0100, Thomas Schwinge wrote: > Here is a patch that I'm testing; OK? I didn't understand what the > conditions are that libcc1 might not be built as a shared library: is it > always built as one -- but is that really supported on all systems? If It is not unconditionally supported, libcc1/configure.ac uses GCC_ENABLE_PLUGINS and doesn't compile anything if gcc doesn't support plugins (one of the several tests of that is that -fPIC -shared is supported. > that's indeed true, then this could be further simplified, and > --enable-shared passed to the host libiberty unconditionally. Your patch is ok with proper ChangeLog entry. > --- configure.ac > +++ configure.ac > @@ -1865,7 +1865,6 @@ if test -d ${srcdir}/gcc; then > new_enable_languages=,c, > > # If LTO is enabled, add the LTO front end. > - extra_host_libiberty_configure_flags= > if test "$enable_lto" = "yes" ; then > case ,${enable_languages}, in > *,lto,*) ;; > @@ -1873,10 +1872,8 @@ if test -d ${srcdir}/gcc; then > esac > if test "${build_lto_plugin}" = "yes" ; then > configdirs="$configdirs lto-plugin" > - extra_host_libiberty_configure_flags=--enable-shared > fi > fi > - AC_SUBST(extra_host_libiberty_configure_flags) > > missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` > potential_languages=,c, > @@ -2190,6 +2187,17 @@ then > esac > fi > > +# Sometimes we have special requirements for the host libiberty. > +extra_host_libiberty_configure_flags= > +case " $configdirs " in > + *" lto-plugin "* | *" libcc1 "*) > + # When these are to be built as shared libraries, the same applies to > + # libiberty. > + extra_host_libiberty_configure_flags=--enable-shared > + ;; > +esac > +AC_SUBST(extra_host_libiberty_configure_flags) > + > # Produce a warning message for the subdirs we can't configure. > # This isn't especially interesting in the Cygnus tree, but in the individual > # FSF releases, it's important to let people know when their machine isn't > > > GrüÃe, > Thomas Jakub ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] add libcc1 2014-10-30 8:56 ` Jakub Jelinek @ 2014-10-30 10:43 ` Thomas Schwinge 2014-10-30 11:25 ` [gomp4] " Thomas Schwinge 0 siblings, 1 reply; 15+ messages in thread From: Thomas Schwinge @ 2014-10-30 10:43 UTC (permalink / raw) To: Jakub Jelinek Cc: Uros Bizjak, gcc-patches, Tom Tromey, Jeff Law, Phil Muldoon [-- Attachment #1: Type: text/plain, Size: 5105 bytes --] Hi! On Thu, 30 Oct 2014 09:51:59 +0100, Jakub Jelinek <jakub@redhat.com> wrote: > On Thu, Oct 30, 2014 at 09:33:08AM +0100, Thomas Schwinge wrote: > > Here is a patch that I'm testing; OK? I didn't understand what the > > conditions are that libcc1 might not be built as a shared library: is it > > always built as one -- but is that really supported on all systems? If > > It is not unconditionally supported, libcc1/configure.ac uses > GCC_ENABLE_PLUGINS and doesn't compile anything if gcc doesn't support > plugins (one of the several tests of that is that -fPIC -shared is > supported. Ah, now I see. Conceptually, as I understand it, that should be done in the top-level build system, so that libcc1 (and, in case, the shared host libiberty) isn't even attempted to be built if not supported. But then, I don't personally have to deal with hosts that don't support plugins. > Your patch is ok with proper ChangeLog entry. Committed in r216912: commit 944792ef24b74c2b6f5e5d0763b7e5a4a361c3d4 Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Thu Oct 30 10:06:37 2014 +0000 Build a shared host libiberty also for libcc1's benefit. * configure.ac (extra_host_libiberty_configure_flags): Add --enable-shared also for libcc1's benefit. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216912 138bc75d-0d04-0410-961f-82ee72b054a4 --- ChangeLog | 6 ++++++ configure | 16 ++++++++++++---- configure.ac | 14 +++++++++++--- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git ChangeLog ChangeLog index e3636c6..ebcae80 100644 --- ChangeLog +++ ChangeLog @@ -1,3 +1,9 @@ +2014-10-30 Thomas Schwinge <thomas@codesourcery.com> + + * configure.ac (extra_host_libiberty_configure_flags): Add + --enable-shared also for libcc1's benefit. + * configure: Regenerate. + 2014-10-29 Tristan Gingold <gingold@adacore.com> * MAINTAINERS: Change my email address. diff --git configure configure index 149acf6..3eab122 100755 --- configure +++ configure @@ -642,8 +642,8 @@ CXXFLAGS_FOR_TARGET CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET SYSROOT_CFLAGS_FOR_TARGET -stage1_languages extra_host_libiberty_configure_flags +stage1_languages extra_linker_plugin_flags extra_linker_plugin_configure_flags clooginc @@ -6259,7 +6259,6 @@ if test -d ${srcdir}/gcc; then new_enable_languages=,c, # If LTO is enabled, add the LTO front end. - extra_host_libiberty_configure_flags= if test "$enable_lto" = "yes" ; then case ,${enable_languages}, in *,lto,*) ;; @@ -6267,11 +6266,9 @@ if test -d ${srcdir}/gcc; then esac if test "${build_lto_plugin}" = "yes" ; then configdirs="$configdirs lto-plugin" - extra_host_libiberty_configure_flags=--enable-shared fi fi - missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` potential_languages=,c, @@ -6584,6 +6581,17 @@ then esac fi +# Sometimes we have special requirements for the host libiberty. +extra_host_libiberty_configure_flags= +case " $configdirs " in + *" lto-plugin "* | *" libcc1 "*) + # When these are to be built as shared libraries, the same applies to + # libiberty. + extra_host_libiberty_configure_flags=--enable-shared + ;; +esac + + # Produce a warning message for the subdirs we can't configure. # This isn't especially interesting in the Cygnus tree, but in the individual # FSF releases, it's important to let people know when their machine isn't diff --git configure.ac configure.ac index b62af38..d8262f8 100644 --- configure.ac +++ configure.ac @@ -1852,7 +1852,6 @@ if test -d ${srcdir}/gcc; then new_enable_languages=,c, # If LTO is enabled, add the LTO front end. - extra_host_libiberty_configure_flags= if test "$enable_lto" = "yes" ; then case ,${enable_languages}, in *,lto,*) ;; @@ -1860,10 +1859,8 @@ if test -d ${srcdir}/gcc; then esac if test "${build_lto_plugin}" = "yes" ; then configdirs="$configdirs lto-plugin" - extra_host_libiberty_configure_flags=--enable-shared fi fi - AC_SUBST(extra_host_libiberty_configure_flags) missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` potential_languages=,c, @@ -2177,6 +2174,17 @@ then esac fi +# Sometimes we have special requirements for the host libiberty. +extra_host_libiberty_configure_flags= +case " $configdirs " in + *" lto-plugin "* | *" libcc1 "*) + # When these are to be built as shared libraries, the same applies to + # libiberty. + extra_host_libiberty_configure_flags=--enable-shared + ;; +esac +AC_SUBST(extra_host_libiberty_configure_flags) + # Produce a warning message for the subdirs we can't configure. # This isn't especially interesting in the Cygnus tree, but in the individual # FSF releases, it's important to let people know when their machine isn't Grüße, Thomas [-- Attachment #2: Type: application/pgp-signature, Size: 472 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* [gomp4] Re: [PATCH 5/5] add libcc1 2014-10-30 10:43 ` Thomas Schwinge @ 2014-10-30 11:25 ` Thomas Schwinge 0 siblings, 0 replies; 15+ messages in thread From: Thomas Schwinge @ 2014-10-30 11:25 UTC (permalink / raw) To: gcc-patches [-- Attachment #1: Type: text/plain, Size: 4392 bytes --] Hi! On Thu, 30 Oct 2014 11:10:51 +0100, I wrote: > Build a shared host libiberty also for libcc1's benefit. Backported to gomp-4_0-branch in r216918: commit 595db85c7323b08d29bf344911a7bd709d68685b Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Thu Oct 30 11:09:14 2014 +0000 Build a shared host libiberty also for libcc1's benefit. Backport trunk r216912: * configure.ac (extra_host_libiberty_configure_flags): Add --enable-shared also for libcc1's benefit. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@216918 138bc75d-0d04-0410-961f-82ee72b054a4 --- ChangeLog.gomp | 8 ++++++++ configure | 16 ++++++++++++---- configure.ac | 14 +++++++++++--- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git ChangeLog.gomp ChangeLog.gomp index 10a0ed7..446329e 100644 --- ChangeLog.gomp +++ ChangeLog.gomp @@ -1,3 +1,11 @@ +2014-10-30 Thomas Schwinge <thomas@codesourcery.com> + + Backport trunk r216912: + + * configure.ac (extra_host_libiberty_configure_flags): Add + --enable-shared also for libcc1's benefit. + * configure: Regenerate. + 2014-10-17 Julian Brown <julian@codesourcery.com> * gomp-constants.h: New file. diff --git configure configure index 18781f8..96ee349 100755 --- configure +++ configure @@ -642,8 +642,8 @@ CXXFLAGS_FOR_TARGET CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET SYSROOT_CFLAGS_FOR_TARGET -stage1_languages extra_host_libiberty_configure_flags +stage1_languages extra_linker_plugin_flags extra_linker_plugin_configure_flags clooginc @@ -6274,7 +6274,6 @@ if test -d ${srcdir}/gcc; then new_enable_languages=,c, # If LTO is enabled, add the LTO front end. - extra_host_libiberty_configure_flags= if test "$enable_lto" = "yes" ; then case ,${enable_languages}, in *,lto,*) ;; @@ -6282,11 +6281,9 @@ if test -d ${srcdir}/gcc; then esac if test "${build_lto_plugin}" = "yes" ; then configdirs="$configdirs lto-plugin" - extra_host_libiberty_configure_flags=--enable-shared fi fi - missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` potential_languages=,c, @@ -6599,6 +6596,17 @@ then esac fi +# Sometimes we have special requirements for the host libiberty. +extra_host_libiberty_configure_flags= +case " $configdirs " in + *" lto-plugin "* | *" libcc1 "*) + # When these are to be built as shared libraries, the same applies to + # libiberty. + extra_host_libiberty_configure_flags=--enable-shared + ;; +esac + + # Produce a warning message for the subdirs we can't configure. # This isn't especially interesting in the Cygnus tree, but in the individual # FSF releases, it's important to let people know when their machine isn't diff --git configure.ac configure.ac index 20dbcbc..7b24958 100644 --- configure.ac +++ configure.ac @@ -1861,7 +1861,6 @@ if test -d ${srcdir}/gcc; then new_enable_languages=,c, # If LTO is enabled, add the LTO front end. - extra_host_libiberty_configure_flags= if test "$enable_lto" = "yes" ; then case ,${enable_languages}, in *,lto,*) ;; @@ -1869,10 +1868,8 @@ if test -d ${srcdir}/gcc; then esac if test "${build_lto_plugin}" = "yes" ; then configdirs="$configdirs lto-plugin" - extra_host_libiberty_configure_flags=--enable-shared fi fi - AC_SUBST(extra_host_libiberty_configure_flags) missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` potential_languages=,c, @@ -2186,6 +2183,17 @@ then esac fi +# Sometimes we have special requirements for the host libiberty. +extra_host_libiberty_configure_flags= +case " $configdirs " in + *" lto-plugin "* | *" libcc1 "*) + # When these are to be built as shared libraries, the same applies to + # libiberty. + extra_host_libiberty_configure_flags=--enable-shared + ;; +esac +AC_SUBST(extra_host_libiberty_configure_flags) + # Produce a warning message for the subdirs we can't configure. # This isn't especially interesting in the Cygnus tree, but in the individual # FSF releases, it's important to let people know when their machine isn't Grüße, Thomas [-- Attachment #2: Type: application/pgp-signature, Size: 472 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2014-10-30 11:11 UTC | newest] Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-10-28 8:43 [PATCH 5/5] add libcc1 Uros Bizjak 2014-10-28 8:55 ` Phil Muldoon 2014-10-28 9:21 ` Uros Bizjak 2014-10-28 9:36 ` Jakub Jelinek 2014-10-28 9:58 ` Uros Bizjak 2014-10-28 10:51 ` Phil Muldoon 2014-10-28 10:56 ` Uros Bizjak 2014-10-28 11:16 ` Phil Muldoon 2014-10-28 11:53 ` Phil Muldoon 2014-10-28 12:24 ` Jakub Jelinek 2014-10-30 5:16 ` Jeff Law 2014-10-30 8:50 ` Thomas Schwinge 2014-10-30 8:56 ` Jakub Jelinek 2014-10-30 10:43 ` Thomas Schwinge 2014-10-30 11:25 ` [gomp4] " Thomas Schwinge
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).