public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/61201] New: Cross compile fails with SPARK_05 undefined
@ 2014-05-16 16:53 rth at gcc dot gnu.org
  2014-05-16 17:03 ` [Bug ada/61201] " charlet at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: rth at gcc dot gnu.org @ 2014-05-16 16:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61201
           Summary: Cross compile fails with SPARK_05 undefined
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rth at gcc dot gnu.org

restrict.ads:145:07: "SPARK_05" is undefined (more references follow)
gnatmake: "/home/rth/work/gcc/git-4.9/gcc/ada/ali-util.adb" compilation error
make[3]: *** [gnatmake-re] Error 4
make[3]: Leaving directory `/home/rth/work/gcc/bld-arm/gcc/ada/tools'
make[2]: *** [gnattools-cross] Error 2
make[2]: Leaving directory `/home/rth/work/gcc/bld-arm/gnattools'
make[1]: *** [all-gnattools] Error 2
make[1]: Leaving directory `/home/rth/work/gcc/bld-arm'
make: *** [all] Error 2

While this specific case is x86_64 cross arm, it happens with several
other cross-compilation targets as well.


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

* [Bug ada/61201] Cross compile fails with SPARK_05 undefined
  2014-05-16 16:53 [Bug ada/61201] New: Cross compile fails with SPARK_05 undefined rth at gcc dot gnu.org
@ 2014-05-16 17:03 ` charlet at gcc dot gnu.org
  2014-05-19 16:29 ` rth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: charlet at gcc dot gnu.org @ 2014-05-16 17:03 UTC (permalink / raw)
  To: gcc-bugs

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

Arnaud Charlet <charlet at gcc dot gnu.org> changed:

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

--- Comment #1 from Arnaud Charlet <charlet at gcc dot gnu.org> ---
You need a matching (built with same sources) native first to build a
cross, I suspect that's the issue here.


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

* [Bug ada/61201] Cross compile fails with SPARK_05 undefined
  2014-05-16 16:53 [Bug ada/61201] New: Cross compile fails with SPARK_05 undefined rth at gcc dot gnu.org
  2014-05-16 17:03 ` [Bug ada/61201] " charlet at gcc dot gnu.org
@ 2014-05-19 16:29 ` rth at gcc dot gnu.org
  2014-05-19 16:33 ` charlet at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rth at gcc dot gnu.org @ 2014-05-19 16:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Henderson <rth at gcc dot gnu.org> ---
While that does allow me to proceed further, I think you're dismissing
an actual problem somewhere.  If gnat 4.8.2 can compile gnat 4.9.0 for
native, then I do not understand why it can't compile 4.9.0 for cross.

It seems like you've got a search path problem somewhere.


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

* [Bug ada/61201] Cross compile fails with SPARK_05 undefined
  2014-05-16 16:53 [Bug ada/61201] New: Cross compile fails with SPARK_05 undefined rth at gcc dot gnu.org
  2014-05-16 17:03 ` [Bug ada/61201] " charlet at gcc dot gnu.org
  2014-05-19 16:29 ` rth at gcc dot gnu.org
@ 2014-05-19 16:33 ` charlet at gcc dot gnu.org
  2014-05-20 17:24 ` ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: charlet at gcc dot gnu.org @ 2014-05-19 16:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Arnaud Charlet <charlet at gcc dot gnu.org> ---
The build of GNAT cross is designed to rely on a matching native, to simplify
the
set up, so this is really as designed here, and not just a 'search path
problem'.

The coupling between the Ada runtime and the Ada compiler is very strong, and
trying to support this combination would simply lead to lots of complexity,
hence
the choice of not trying to address this combination, as per the documentation.

So: this is as designed and as documented.

Arno


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

* [Bug ada/61201] Cross compile fails with SPARK_05 undefined
  2014-05-16 16:53 [Bug ada/61201] New: Cross compile fails with SPARK_05 undefined rth at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-05-19 16:33 ` charlet at gcc dot gnu.org
@ 2014-05-20 17:24 ` ebotcazou at gcc dot gnu.org
  2014-05-20 17:58 ` rth at gcc dot gnu.org
  2014-10-31  8:26 ` [Bug ada/61201] New: " John zheng
  5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2014-05-20 17:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu.org

--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> The build of GNAT cross is designed to rely on a matching native, to
> simplify the
> set up, so this is really as designed here, and not just a 'search path
> problem'.

More specifically, the gnattools must be compiled by the same version of the
compiler; for native, this doesn't depend on the base compiler, since the
compiler is bootstrapped but, for cross, the base compiler must be the same
version.


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

* [Bug ada/61201] Cross compile fails with SPARK_05 undefined
  2014-05-16 16:53 [Bug ada/61201] New: Cross compile fails with SPARK_05 undefined rth at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-05-20 17:24 ` ebotcazou at gcc dot gnu.org
@ 2014-05-20 17:58 ` rth at gcc dot gnu.org
  2014-10-31  8:26 ` [Bug ada/61201] New: " John zheng
  5 siblings, 0 replies; 7+ messages in thread
From: rth at gcc dot gnu.org @ 2014-05-20 17:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Henderson <rth at gcc dot gnu.org> ---
Ah, now that's a good answer.  Thanks, Eric.


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

* Re: [Bug ada/61201] New: Cross compile fails with SPARK_05 undefined
  2014-05-16 16:53 [Bug ada/61201] New: Cross compile fails with SPARK_05 undefined rth at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-05-20 17:58 ` rth at gcc dot gnu.org
@ 2014-10-31  8:26 ` John zheng
  5 siblings, 0 replies; 7+ messages in thread
From: John zheng @ 2014-10-31  8:26 UTC (permalink / raw)
  To: gcc-bugs

rth at gcc dot gnu.org <gcc-bugzilla <at> gcc.gnu.org> writes:

> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61201
> 
>             Bug ID: 61201
>            Summary: Cross compile fails with SPARK_05 undefined
>            Product: gcc
>            Version: unknown
>             Status: UNCONFIRMED
>           Severity: normal
>           Priority: P3
>          Component: ada
>           Assignee: unassigned at gcc dot gnu.org
>           Reporter: rth at gcc dot gnu.org
> 
> restrict.ads:145:07: "SPARK_05" is undefined (more references follow)
> gnatmake: "/home/rth/work/gcc/git-4.9/gcc/ada/ali-util.adb" compilation error
> make[3]: *** [gnatmake-re] Error 4
> make[3]: Leaving directory `/home/rth/work/gcc/bld-arm/gcc/ada/tools'
> make[2]: *** [gnattools-cross] Error 2
> make[2]: Leaving directory `/home/rth/work/gcc/bld-arm/gnattools'
> make[1]: *** [all-gnattools] Error 2
> make[1]: Leaving directory `/home/rth/work/gcc/bld-arm'
> make: *** [all] Error 2
> 
> While this specific case is x86_64 cross arm, it happens with several
> other cross-compilation targets as well.
> 
> 

In template file gcc-x.x.x/gcc/gnattools\Makefile.in, there are some
variables showing:
# Variables for gnattools, native
TOOLS_FLAGS_TO_PASS_NATIVE= \
	"CC=../../xgcc -B../../" \
	"CXX=../../xg++ -B../../ $(CXX_LFLAGS)" \
	"CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
	"LDFLAGS=$(LDFLAGS)" \
	"ADAFLAGS=$(ADAFLAGS)" \
	"ADA_CFLAGS=$(ADA_CFLAGS)" \
	"INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
	"ADA_INCLUDES=-I- -I../rts $(ADA_INCLUDES_FOR_SUBDIR)"\
	"exeext=$(exeext)" \
	"fsrcdir=$(fsrcdir)" \
	"srcdir=$(fsrcdir)" \
	"GNATMAKE=../../gnatmake" \
	"GNATLINK=../../gnatlink" \
	"GNATBIND=../../gnatbind" \
	"TOOLSCASE=native"

# Variables for regnattools
TOOLS_FLAGS_TO_PASS_RE= \
	"CC=../../xgcc -B../../" \
	"CXX=../../xg++ -B../../ $(CXX_LFLAGS)" \
	"CFLAGS=$(CFLAGS)" \
	"LDFLAGS=$(LDFLAGS)" \
	"ADAFLAGS=$(ADAFLAGS)" \
	"ADA_CFLAGS=$(ADA_CFLAGS)" \
	"INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
	"ADA_INCLUDES=-I../rts $(ADA_INCLUDES_FOR_SUBDIR)"\
	"exeext=$(exeext)" \
	"fsrcdir=$(fsrcdir)" \
	"srcdir=$(fsrcdir)" \
	"GNATMAKE=../../gnatmake" \
	"GNATLINK=../../gnatlink" \
	"GNATBIND=../../gnatbind" \
	"TOOLSCASE=cross"
......
TOOLS_FLAGS_TO_PASS_CROSS= \
	"CC=$(CC)" \
	"CXX=$(CXX)" \
	"CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
	"LDFLAGS=$(LDFLAGS)" \
	"ADAFLAGS=$(ADAFLAGS)"	\
	"ADA_CFLAGS=$(ADA_CFLAGS)" \
	"INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
	"ADA_INCLUDES=-I$(RTS_DIR)/../adainclude -I$(RTS_DIR)
$(ADA_INCLUDES_FOR_SUBDIR)" \
	"exeext=$(exeext)" \
	"fsrcdir=$(fsrcdir)" \
	"srcdir=$(fsrcdir)" \
	"GNATMAKE=$(GNATMAKE_FOR_HOST)" \
	"GNATLINK=$(GNATLINK_FOR_HOST)" \
	"GNATBIND=$(GNATBIND_FOR_HOST)" \
	"TOOLSCASE=cross" \
	"LIBGNAT="
. Notice environment variable "ADA_INCLUDES" sent to Makfile in
subdirectory, for native building, it is assigned to the ada include
directory of source files, but for cross building it is assigned to the ada
include directory of build toolchain. So for cross building, if the version
of the source is different from the version of the toolchain, there may be
some conflicts, such as constants declaration changes like
"SPARK"-->"SPARK_05". Therefore, for cross building new toolchain, it is
better to build a piece of native toolchain of the target version(upgrade or
download) first, then using the new native toolchain of the same version to
build the target cross toolchain. This will avoid the potential conflicts.






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

end of thread, other threads:[~2014-10-31  6:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-16 16:53 [Bug ada/61201] New: Cross compile fails with SPARK_05 undefined rth at gcc dot gnu.org
2014-05-16 17:03 ` [Bug ada/61201] " charlet at gcc dot gnu.org
2014-05-19 16:29 ` rth at gcc dot gnu.org
2014-05-19 16:33 ` charlet at gcc dot gnu.org
2014-05-20 17:24 ` ebotcazou at gcc dot gnu.org
2014-05-20 17:58 ` rth at gcc dot gnu.org
2014-10-31  8:26 ` [Bug ada/61201] New: " John zheng

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