This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/85036] New: --disable-bootstrap --enable-languages=ada[,c++] fails


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85036

            Bug ID: 85036
           Summary: --disable-bootstrap --enable-languages=ada[,c++] fails
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

This is similar to PR81878 and regressed I think with

r254940 | ebotcazou | 2017-11-19 23:36:25 +0100 (Sun, 19 Nov 2017) | 11 lines

        PR ada/83016
        * gnatlink.adb (Process_Args): Accept multiple switches for --LINK.
        (Usage): Adjust.
        * gcc-interface/Makefile.in (GCC_LINK): Remove $(ADA_INCLUDES).
        (common-tools): Pass $(CC) as --GCC= and $(GCC_LINK) as --LINK= in
        the invocations of $(GNATLINK).
        (../../gnatdll$(exeext)): Likewise.
        (../../vxaddr2line$(exeext)): Likewise.
        (gnatmake-re): Likewise.
        (gnatlink-re): Likewise.

symptom:

../../gnatlink -v gnatcmd -o ../../gnat \
  --GCC="../../xgcc -B../../ -I- -I../rts -I.
-I/space/rguenther/src/svn/early-lto-debug/gcc/ada" --LINK="g++
-static-libstdc++ -static-libgcc -static-libstdc++ -static-libgcc " ../link.o
../targext.o ../../ggc-none.o ../../libcommon-target.a ../../libcommon.a
../../../libcpp/libcpp.a ../rts/libgnat.a  
../../../libbacktrace/.libs/libbacktrace.a ../../../libiberty/libiberty.a   

GNATLINK 8.0.1 20180321 (experimental) [trunk revision 221942]
Copyright (C) 1995-2018, Free Software Foundation, Inc.
xgcc -c -gnatA -gnatWb -gnatiw -B../../ -I- -I../rts -I.
-I/space/rguenther/src/svn/early-lto-debug/gcc/ada -gnatws
/home/abuild/rguenther/obj/gcc/ada/tools/b~gnatcmd.adb
/usr/bin/g++ b~gnatcmd.o ../link.o ../targext.o ../../ggc-none.o ../rts/ada.o
../rts/a-charac.o ../rts/a-chlat1.o ../rts/gnat.o ../rts/interfac.o
../rts/system.o ../rts/s-addope.o ../rts/s-casuti.o ../rts/s-imenne.o
../rts/s-imgint.o ../rts/s-io.o ../rts/s-parame.o ../rts/s-crtl.o
../rts/i-cstrea.o ../rts/s-stoele.o ../rts/s-stache.o ../rts/s-strhas.o
../rts/s-htable.o ../rts/g-htable.o ../rts/s-string.o ../rts/s-traent.o
../rts/s-unstyp.o ../rts/s-imguns.o ../rts/s-wchcon.o ../rts/s-wchjis.o
../rts/s-wchcnv.o ../rts/s-carun8.o ../rts/s-conca2.o ../rts/s-conca3.o
../rts/s-traceb.o ../rts/a-exctra.o ../rts/s-soliin.o ../rts/s-soflin.o
../rts/s-secsta.o ../rts/s-exctab.o ../rts/a-ioexce.o ../rts/a-contai.o
../rts/s-except.o ../rts/a-string.o ../rts/s-excdeb.o ../rts/s-exctra.o
../rts/s-memory.o ../rts/s-bitops.o ../rts/a-stmaco.o ../rts/a-chahan.o
../rts/s-wchstw.o ../rts/s-valuti.o ../rts/s-valllu.o ../rts/s-vallli.o
../rts/s-os_lib.o ../rts/s-excmac.o ../rts/a-elchha.o ../rts/s-addima.o
../rts/s-boustr.o ../rts/s-stalib.o ../rts/a-strmap.o ../rts/i-c.o
../rts/s-mmauni.o ../rts/s-mmap.o ../rts/s-objrea.o ../rts/s-mmosin.o
../rts/s-trasym.o ../rts/a-except.o ../rts/s-dwalin.o ../rts/a-comlin.o
../rts/a-tags.o ../rts/a-stream.o ../rts/g-os_lib.o ../rts/s-ficobl.o
../rts/s-finroo.o ../rts/a-finali.o ../rts/s-fileio.o ../rts/s-valenu.o
../rts/a-textio.o ../rts/s-assert.o ./debug.o ./types.o ./alloc.o ./gnatvsn.o
./hostparm.o ./output.o ./rident.o ./tree_io.o ./opt.o ./csets.o ./table.o
./widechar.o ./namet.o ./fmap.o ./targparm.o ./osint.o ./sdefault.o ./switch.o
./gnatcmd.o ../../libcommon-target.a ../../libcommon.a ../../../libcpp/libcpp.a
../rts/libgnat.a ../../../libbacktrace/.libs/libbacktrace.a
../../../libiberty/libiberty.a -o ../../gnat -L../rts/ -L./
-L/space/rguenther/src/svn/early-lto-debug/gcc/ada/
-L/usr/local/lib64/gcc/x86_64-pc-linux-gnu/8.0.1/adalib/
/home/abuild/rguenther/obj/gcc/ada/rts/libgnat.a -ldl -B../../ -I- -I../rts -I.
-I/space/rguenther/src/svn/early-lto-debug/gcc/ada -static-libstdc++
-static-libgcc -static-libstdc++ -static-libgcc
g++: fatal error: braced spec
‘%:sanitize(address):%{!shared:libasan_preinit%O%s}
%{static-libasan:%{!shared:-Bstatic --whole-archive -lasan --no-whole-archive
-Bdynamic}}%{!static-libasan:-lasan}}    
%{%:sanitize(thread):%{!shared:libtsan_preinit%O%s}
%{static-libtsan:%{!shared:-Bstatic --whole-archive -ltsan --no-whole-archive
-Bdynamic}}%{!static-libtsan:-ltsan}}    
%{%:sanitize(leak):%{!shared:liblsan_preinit%O%s}
%{static-liblsan:%{!shared:-Bstatic --whole-archive -llsan --no-whole-archive
-Bdynamic}}%{!static-liblsan:-llsan}}’ is invalid at ‘%’
compilation terminated.
gnatlink: error when calling /usr/bin/g++
../gcc-interface/Makefile:2212: recipe for target 'common-tools' failed

note how we link with the host compiler but pass it -B../../

Removing -B../../ fixes the issue.  In PR81878 the issue was we needed to
use the host libstdc++ which is fixed now by using the host CXX to link
but passing -B../../ is obviously broken - it happens that ../../specs
exists (for whatever reasons?!) and that is picked up by the link.

specs is re-generated when I remove it and try continuing:

make[2]: Entering directory '/home/abuild/rguenther/obj/gcc'
/abuild/rguenther/obj/./gcc/xgcc -B/abuild/rguenther/obj/./gcc/ -dumpspecs >
tmp-specs
mv tmp-specs specs
: > tmp-libgcc.mvars

by

# Dump a specs file to make -B./ read these specs over installed ones.
$(SPECS): xgcc$(exeext)
        $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
        mv tmp-specs $(SPECS)

and in the end

# List of things which should already be built whenever we try to use xgcc
# to compile anything (without linking).
GCC_PASSES=xgcc$(exeext) specs

removing 'specs' here fixes the issue.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]