public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/57795] New: Fail cross building Ada
@ 2013-07-03  8:48 alexpux at gmail dot com
  2014-01-14  9:14 ` [Bug ada/57795] Fail Canadian " yselkowitz at users dot sourceforge.net
  2014-01-14 10:35 ` ebotcazou at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: alexpux at gmail dot com @ 2013-07-03  8:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57795

            Bug ID: 57795
           Summary: Fail cross building Ada
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alexpux at gmail dot com

I try to build i686 multilib mingw toolchain with Ada from linux x86_64
toolchain.
First I build cross-compiler linux-x64 -> mingw-x32. Next I try to build
mingw-x32 native toolchain from cross and get fail building libada on last
step.

make[2]: Entering directory `/home/alexx/work32/mingw32-gcc/gnattools'
# gnattools1-re
make -C ../gcc/ada/tools -f ../Makefile \
  "CC=i686-w64-mingw32-gcc" "CFLAGS=-g -O2 -D__USE_MINGW_ACCESS -W -Wall"
"LDFLAGS=-static-libstdc++ -static-libgcc -Wl,--stack,12582912"
"ADAFLAGS=-gnatpg -gnata" "ADA_CFLAGS=" "INCLUDES=-I. -I.. -I../..
-I/home/alexx/src/gcc-4.8.1/gcc/ada -I/home/alexx/src/gcc-4.8.1/gcc/config
-I/home/alexx/src/gcc-4.8.1/gcc/../include -I/home/alexx/src/gcc-4.8.1/gcc"
"ADA_INCLUDES=-I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/adalib/../adainclude
-I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/adalib/ -I.
-I/home/alexx/src/gcc-4.8.1/gcc/ada" "exeext=.exe"
"fsrcdir=/home/alexx/src/gcc-4.8.1/gcc" "srcdir=/home/alexx/src/gcc-4.8.1/gcc"
"GNATMAKE=gnatmake" "GNATLINK=gnatlink" "GNATBIND=gnatbind" "TOOLSCASE=cross"
"LIBGNAT=" INCLUDES="" \
  gnatmake-re gnatlink-re
make[3]: Entering directory `/home/alexx/work32/mingw32-gcc/gcc/ada/tools'
gnatmake -j0 -I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/adalib/../adainclude
-I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/adalib/ -I.
-I/home/alexx/src/gcc-4.8.1/gcc/ada -u sdefault --GCC="i686-w64-mingw32-gcc "
gnatmake: objects up to date.
gnatmake -j0 -c
-I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/adalib/../adainclude
-I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/adalib/ -I.
-I/home/alexx/src/gcc-4.8.1/gcc/ada gnatmake --GCC="i686-w64-mingw32-gcc -g -O2
-D__USE_MINGW_ACCESS -W -Wall  -gnatpg -gnata"
i686-w64-mingw32-gcc -c -I./
-I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/adalib/../adainclude
-I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/adalib/ -I.
-I/home/alexx/src/gcc-4.8.1/gcc/ada -g -O2 -D__USE_MINGW_ACCESS -W -Wall
-gnatpg -gnata -I- /home/alexx/src/gcc-4.8.1/gcc/ada/osint.adb
i686-w64-mingw32-gcc -c -I./
-I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/adalib/../adainclude
-I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/adalib/ -I.
-I/home/alexx/src/gcc-4.8.1/gcc/ada -g -O2 -D__USE_MINGW_ACCESS -W -Wall
-gnatpg -gnata -I- /home/alexx/src/gcc-4.8.1/gcc/ada/prj.adb
osint.adb:3182:07: warning: types for unchecked conversion have different sizes
gnatmake: "/home/alexx/src/gcc-4.8.1/gcc/ada/osint.adb" compilation error
make[3]: *** [gnatmake-re] Error 4
make[3]: Leaving directory `/home/alexx/work32/mingw32-gcc/gcc/ada/tools'
make[2]: *** [gnattools-cross] Error 2
make[2]: Leaving directory `/home/alexx/work32/mingw32-gcc/gnattools'
make[1]: *** [all-gnattools] Error 2
make[1]: Leaving directory `/home/alexx/work32/mingw32-gcc'
make: *** [all] Error 2

I see that gcc got wrong headers and libs
(I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/adalib/../adainclude
-I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/adalib/) from linux native
toolchain. But it can be pointed to headers and libs from cross toolchain.
I do this operation with different gcc - 4.7.3 and 4.8.1 with the same result.
My dirty hack to resolve it is to copy ada headers and libs from cross
toolchain to native toolchain. Then build finishing fine.


Regards,
Alexey.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug ada/57795] Fail Canadian cross building Ada
  2013-07-03  8:48 [Bug ada/57795] New: Fail cross building Ada alexpux at gmail dot com
@ 2014-01-14  9:14 ` yselkowitz at users dot sourceforge.net
  2014-01-14 10:35 ` ebotcazou at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: yselkowitz at users dot sourceforge.net @ 2014-01-14  9:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57795

Yaakov (Cygwin Ports) <yselkowitz at users dot sourceforge.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yselkowitz at users dot sourceforg
                   |                            |e.net

--- Comment #1 from Yaakov (Cygwin Ports) <yselkowitz at users dot sourceforge.net> ---
I also ran into this when cross-compiling a native gcc with Ada
(i686-pc-cygwin/x86_64-pc-cygwin/x86_64-pc-cygwin) in the process of porting
GNAT to a new platform.  In fact, I believe this would happen any time $build
!= $host (regardless of $target), but NOT with the typical cross-compiler
($build == $host, $host != $target).

The root of the problem is RTS_DIR override (immediately prior to
gnattools-cross rule) in gnattools/Makefile.in, which calls gnatls (for $build)
where IIUC it should be something like $(GNATMAKE:gnatmake=gnatls) (for $host).

There is another problem in this situation: in
gcc/ada/gcc-interface/Make-lang.in, the xgnatugn rule (part of building
doc/projects.texi and doc/gnat_ugn.texi) calls $(GNATMAKE), resulting in a
xgnatugn which runs on $host instead of $build; this probably needs to be just
gnatmake instead.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug ada/57795] Fail Canadian cross building Ada
  2013-07-03  8:48 [Bug ada/57795] New: Fail cross building Ada alexpux at gmail dot com
  2014-01-14  9:14 ` [Bug ada/57795] Fail Canadian " yselkowitz at users dot sourceforge.net
@ 2014-01-14 10:35 ` ebotcazou at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2014-01-14 10:35 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57795

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |ebotcazou at gcc dot gnu.org
         Resolution|---                         |DUPLICATE

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
.

*** This bug has been marked as a duplicate of bug 55946 ***


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-14 10:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-03  8:48 [Bug ada/57795] New: Fail cross building Ada alexpux at gmail dot com
2014-01-14  9:14 ` [Bug ada/57795] Fail Canadian " yselkowitz at users dot sourceforge.net
2014-01-14 10:35 ` ebotcazou at gcc dot gnu.org

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).