On Tue, Jan 05, 2021 at 10:00:06AM +0100, Jakub Jelinek via Gcc-patches wrote: > On Tue, Jan 05, 2021 at 09:56:26AM +0100, Rainer Orth wrote: > > > Richi complained on IRC that cc1 is linked against libcody.a. > > > From my understanding, it is just the cc1plus and cc1objplus binaries > > > that need it, so this patch links only those against it. > > > > > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > > > this is already part of my Solaris libcody patch > > > > build: libcody: Link with -lsocket -lnsl if necessary [PR98316] > > https://gcc.gnu.org/pipermail/gcc-patches/2020-December/562185.html > > > > to be committed shortly. > > Ah, sorry for missing that, patch withdrawn. > > The difference between the patches for this particular thing is that > my patch was adding the libcody.a also to cc1*plus-checksum* goal and their > dependencies plus cc1*plus dependencies (so that if one rebuilds libcody, > make in gcc subdir will relink cc1plus).
The following updated patch are the incremental changes between what Rainer has committed and what I've posted. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2021-01-05 Jakub Jelinek <ja...@redhat.com> gcc/cp/ * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add $(CODYLIB) after $(BACKEND). gcc/objcp/ * Make-lang.in (cc1objplus-checksum, cc1objplus$(exeext): Add $(CODYLIB) after $(BACKEND). --- gcc/cp/Make-lang.in.jj 2021-01-05 11:44:02.956404880 +0100 +++ gcc/cp/Make-lang.in 2021-01-05 13:56:18.628046238 +0100 @@ -121,17 +121,17 @@ cp-warn = $(STRICT_WARN) # re-use the checksum from the prev-final stage so it passes # the bootstrap comparison and allows comparing of the cc1 binary cc1plus-checksum.c : build/genchecksum$(build_exeext) checksum-options \ - $(CXX_OBJS) $(BACKEND) $(LIBDEPS) + $(CXX_OBJS) $(BACKEND) $(CODYLIB) $(LIBDEPS) if [ -f ../stage_final ] \ && cmp -s ../stage_current ../stage_final; then \ cp ../prev-gcc/cc1plus-checksum.c cc1plus-checksum.c; \ else \ - build/genchecksum$(build_exeext) $(CXX_OBJS) $(BACKEND) $(LIBDEPS) \ + build/genchecksum$(build_exeext) $(CXX_OBJS) $(BACKEND) $(CODYLIB) $(LIBDEPS) \ checksum-options > cc1plus-checksum.c.tmp && \ $(srcdir)/../move-if-change cc1plus-checksum.c.tmp cc1plus-checksum.c; \ fi -cc1plus$(exeext): $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(LIBDEPS) $(c++.prev) +cc1plus$(exeext): $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(CODYLIB) $(LIBDEPS) $(c++.prev) @$(call LINK_PROGRESS,$(INDEX.c++),start) +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(CODYLIB) $(NETLIBS) \ --- gcc/objcp/Make-lang.in.jj 2021-01-05 13:56:18.629046227 +0100 +++ gcc/objcp/Make-lang.in 2021-01-05 13:57:01.603562005 +0100 @@ -61,14 +61,14 @@ OBJCXX_OBJS = objcp/objcp-act.o objcp/ob obj-c++_OBJS = $(OBJCXX_OBJS) cc1objplus-checksum.o cc1objplus-checksum.c : build/genchecksum$(build_exeext) checksum-options \ - $(OBJCXX_OBJS) $(BACKEND) $(LIBDEPS) - build/genchecksum$(build_exeext) $(OBJCXX_OBJS) $(BACKEND) \ + $(OBJCXX_OBJS) $(BACKEND) $(CODYLIB) $(LIBDEPS) + build/genchecksum$(build_exeext) $(OBJCXX_OBJS) $(BACKEND) $(CODYLIB) \ $(LIBDEPS) checksum-options > cc1objplus-checksum.c.tmp && \ $(srcdir)/../move-if-change cc1objplus-checksum.c.tmp \ cc1objplus-checksum.c cc1objplus$(exeext): $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) \ - $(LIBDEPS) $(obj-c++.prev) + $(CODYLIB) $(LIBDEPS) $(obj-c++.prev) @$(call LINK_PROGRESS,$(INDEX.obj-c++),start) +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) \ Jakub