public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Q about building cross gnatlib
@ 2001-11-23 16:27 guerby
  2001-11-23 17:38 ` Geert Bosch
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: guerby @ 2001-11-23 16:27 UTC (permalink / raw)
  To: gcc

I'm trying to build GCC cross sparc-rtems from my i686-linux. After
installing the apropriate cross binutils, I succeed in building the
cross compiler then newlib thanks to Joel Sherrill detailed
instructions :).

I'm wondering wether the current ada/Makefile.in supports building
gnatlib in a cross setup, unless I'm missing something obvious I see
no way it can build the C part of the Ada RTS using the target newlib
since there seem to be no obvious place to specify where to find the
target includes in the current invocation:

gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2
#	../xgcc -B../ -dD -E ../tconfig.h $(INCLUDES) > rts/tconfig.h
	$(MAKE) -C rts CC="../../xgcc -B../../" \
	        INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
                CFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -DIN_RTS" \
		ADA_CFLAGS="$(GNATLIBCFLAGS)" \
		srcdir=$(fsrcdir) \
	        -f ../Makefile $(LIBGNAT_OBJS)

Does the ACT tree (when building for VxWorks for example) have
specific patches to the Makefile to handle the situation? If they're
not completely ready for the FSF tree yet, could someone send them to
me, it would help a lot my efforts to setup a cross testing
environment for the various RTEMS targets. (Right now I'm kluding around
the Makefile in random places and not completely successful yet.)

-- 
Laurent Guerby <guerby@acm.org>

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

* Re: [Ada] Q about building cross gnatlib
  2001-11-23 16:27 [Ada] Q about building cross gnatlib guerby
@ 2001-11-23 17:38 ` Geert Bosch
  2001-11-23 21:59   ` guerby
                     ` (2 more replies)
  2001-11-30 13:40 ` guerby
  2001-12-01 13:04 ` Arnaud Charlet
  2 siblings, 3 replies; 11+ messages in thread
From: Geert Bosch @ 2001-11-23 17:38 UTC (permalink / raw)
  To: guerby; +Cc: gcc


On Friday, November 30, 2001, at 04:34 , <guerby@acm.org> wrote:

> Does the ACT tree (when building for VxWorks for example) have
> specific patches to the Makefile to handle the situation? If they're
> not completely ready for the FSF tree yet, could someone send them to
> me, it would help a lot my efforts to setup a cross testing
> environment for the various RTEMS targets. (Right now I'm kluding 
> around
> the Makefile in random places and not completely successful yet.)

There are no specific patches, and we do nightly cross-builds of GNAT on
for a whole set of hosts/targets. This is with the old gcc 2.8.1 
setup though,
so any differences should be due to the differences between the current
setup and the old one (which you know well).

   -Geert

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

* Re: [Ada] Q about building cross gnatlib
  2001-11-23 17:38 ` Geert Bosch
@ 2001-11-23 21:59   ` guerby
  2001-11-30 15:07     ` guerby
  2001-11-23 23:19   ` Joel Sherrill
  2001-11-30 14:30   ` Geert Bosch
  2 siblings, 1 reply; 11+ messages in thread
From: guerby @ 2001-11-23 21:59 UTC (permalink / raw)
  To: bosch; +Cc: gcc

> so any differences should be due to the differences between the current
> setup and the old one (which you know well).
                                  s/know/knew somewhat/ :)

I still don't see how to specifiy where when building adaint.c in
-DIN_RTS mode xgcc is supposed to find my target stdio.h for
example. We're only telling it to use INCLUDES_FOR_SUBDIR, and there's
nothing there to point to the target C library.

New Q for GCC cross people: what Makefile macro configure setups to
point to the needed target system library includes (in my case I
configure with --with-newlib)? If there's a macro, is there anything
special other than

EXTRA_INCLUDES = @magic_macro@

to add into ada/Makefile.in?

Thanks for any help on this!

-- 
Laurent Guerby <guerby@acm.org>

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

* Re: [Ada] Q about building cross gnatlib
  2001-11-23 17:38 ` Geert Bosch
  2001-11-23 21:59   ` guerby
@ 2001-11-23 23:19   ` Joel Sherrill
  2001-11-30 15:30     ` Joel Sherrill
  2001-11-30 14:30   ` Geert Bosch
  2 siblings, 1 reply; 11+ messages in thread
From: Joel Sherrill @ 2001-11-23 23:19 UTC (permalink / raw)
  To: Geert Bosch; +Cc: guerby, gcc



Geert Bosch wrote:
> 
> On Friday, November 30, 2001, at 04:34 , <guerby@acm.org> wrote:
> 
> > Does the ACT tree (when building for VxWorks for example) have
> > specific patches to the Makefile to handle the situation? If they're
> > not completely ready for the FSF tree yet, could someone send them to
> > me, it would help a lot my efforts to setup a cross testing
> > environment for the various RTEMS targets. (Right now I'm kluding
> > around
> > the Makefile in random places and not completely successful yet.)
> 
> There are no specific patches, and we do nightly cross-builds of GNAT on
> for a whole set of hosts/targets. This is with the old gcc 2.8.1
> setup though,
> so any differences should be due to the differences between the current
> setup and the old one (which you know well).

GNAT/RTEMS built fine for 3.13p.  The problem seems to be centered on
the Ada rts makefile not using the FLAGS_FOR_TARGET defined in the top
level Makefile.  This lets you see newlib's include and include/sys
directories.

It may also be necessary to use LIBGCC2_FLAGS_FOR_TARGET (sp?) as well.  
I know this is how you find the RTEMS limits.h down inside newlib.


>    -Geert

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

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

* [Ada] Q about building cross gnatlib
  2001-11-23 16:27 [Ada] Q about building cross gnatlib guerby
  2001-11-23 17:38 ` Geert Bosch
@ 2001-11-30 13:40 ` guerby
  2001-12-01 13:04 ` Arnaud Charlet
  2 siblings, 0 replies; 11+ messages in thread
From: guerby @ 2001-11-30 13:40 UTC (permalink / raw)
  To: gcc

I'm trying to build GCC cross sparc-rtems from my i686-linux. After
installing the apropriate cross binutils, I succeed in building the
cross compiler then newlib thanks to Joel Sherrill detailed
instructions :).

I'm wondering wether the current ada/Makefile.in supports building
gnatlib in a cross setup, unless I'm missing something obvious I see
no way it can build the C part of the Ada RTS using the target newlib
since there seem to be no obvious place to specify where to find the
target includes in the current invocation:

gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2
#	../xgcc -B../ -dD -E ../tconfig.h $(INCLUDES) > rts/tconfig.h
	$(MAKE) -C rts CC="../../xgcc -B../../" \
	        INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
                CFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -DIN_RTS" \
		ADA_CFLAGS="$(GNATLIBCFLAGS)" \
		srcdir=$(fsrcdir) \
	        -f ../Makefile $(LIBGNAT_OBJS)

Does the ACT tree (when building for VxWorks for example) have
specific patches to the Makefile to handle the situation? If they're
not completely ready for the FSF tree yet, could someone send them to
me, it would help a lot my efforts to setup a cross testing
environment for the various RTEMS targets. (Right now I'm kluding around
the Makefile in random places and not completely successful yet.)

-- 
Laurent Guerby <guerby@acm.org>

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

* Re: [Ada] Q about building cross gnatlib
  2001-11-23 17:38 ` Geert Bosch
  2001-11-23 21:59   ` guerby
  2001-11-23 23:19   ` Joel Sherrill
@ 2001-11-30 14:30   ` Geert Bosch
  2 siblings, 0 replies; 11+ messages in thread
From: Geert Bosch @ 2001-11-30 14:30 UTC (permalink / raw)
  To: guerby; +Cc: gcc

On Friday, November 30, 2001, at 04:34 , <guerby@acm.org> wrote:

> Does the ACT tree (when building for VxWorks for example) have
> specific patches to the Makefile to handle the situation? If they're
> not completely ready for the FSF tree yet, could someone send them to
> me, it would help a lot my efforts to setup a cross testing
> environment for the various RTEMS targets. (Right now I'm kluding 
> around
> the Makefile in random places and not completely successful yet.)

There are no specific patches, and we do nightly cross-builds of GNAT on
for a whole set of hosts/targets. This is with the old gcc 2.8.1 
setup though,
so any differences should be due to the differences between the current
setup and the old one (which you know well).

   -Geert

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

* Re: [Ada] Q about building cross gnatlib
  2001-11-23 21:59   ` guerby
@ 2001-11-30 15:07     ` guerby
  0 siblings, 0 replies; 11+ messages in thread
From: guerby @ 2001-11-30 15:07 UTC (permalink / raw)
  To: bosch; +Cc: gcc

> so any differences should be due to the differences between the current
> setup and the old one (which you know well).
                                  s/know/knew somewhat/ :)

I still don't see how to specifiy where when building adaint.c in
-DIN_RTS mode xgcc is supposed to find my target stdio.h for
example. We're only telling it to use INCLUDES_FOR_SUBDIR, and there's
nothing there to point to the target C library.

New Q for GCC cross people: what Makefile macro configure setups to
point to the needed target system library includes (in my case I
configure with --with-newlib)? If there's a macro, is there anything
special other than

EXTRA_INCLUDES = @magic_macro@

to add into ada/Makefile.in?

Thanks for any help on this!

-- 
Laurent Guerby <guerby@acm.org>

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

* Re: [Ada] Q about building cross gnatlib
  2001-11-23 23:19   ` Joel Sherrill
@ 2001-11-30 15:30     ` Joel Sherrill
  0 siblings, 0 replies; 11+ messages in thread
From: Joel Sherrill @ 2001-11-30 15:30 UTC (permalink / raw)
  To: Geert Bosch; +Cc: guerby, gcc

Geert Bosch wrote:
> 
> On Friday, November 30, 2001, at 04:34 , <guerby@acm.org> wrote:
> 
> > Does the ACT tree (when building for VxWorks for example) have
> > specific patches to the Makefile to handle the situation? If they're
> > not completely ready for the FSF tree yet, could someone send them to
> > me, it would help a lot my efforts to setup a cross testing
> > environment for the various RTEMS targets. (Right now I'm kluding
> > around
> > the Makefile in random places and not completely successful yet.)
> 
> There are no specific patches, and we do nightly cross-builds of GNAT on
> for a whole set of hosts/targets. This is with the old gcc 2.8.1
> setup though,
> so any differences should be due to the differences between the current
> setup and the old one (which you know well).

GNAT/RTEMS built fine for 3.13p.  The problem seems to be centered on
the Ada rts makefile not using the FLAGS_FOR_TARGET defined in the top
level Makefile.  This lets you see newlib's include and include/sys
directories.

It may also be necessary to use LIBGCC2_FLAGS_FOR_TARGET (sp?) as well.  
I know this is how you find the RTEMS limits.h down inside newlib.


>    -Geert

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

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

* Re: [Ada] Q about building cross gnatlib
  2001-11-23 16:27 [Ada] Q about building cross gnatlib guerby
  2001-11-23 17:38 ` Geert Bosch
  2001-11-30 13:40 ` guerby
@ 2001-12-01 13:04 ` Arnaud Charlet
  2001-12-01 13:42   ` guerby
  2001-12-02  8:29   ` Andreas Schwab
  2 siblings, 2 replies; 11+ messages in thread
From: Arnaud Charlet @ 2001-12-01 13:04 UTC (permalink / raw)
  To: guerby; +Cc: gcc

> Does the ACT tree (when building for VxWorks for example) have
> specific patches to the Makefile to handle the situation? If they're

We do not have anything special. It works because xgcc will look for the
includes under <prefix>/<target>/include, at least that's the way it works
with GCC 2.8.1.

Arno

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

* Re: [Ada] Q about building cross gnatlib
  2001-12-01 13:04 ` Arnaud Charlet
@ 2001-12-01 13:42   ` guerby
  2001-12-02  8:29   ` Andreas Schwab
  1 sibling, 0 replies; 11+ messages in thread
From: guerby @ 2001-12-01 13:42 UTC (permalink / raw)
  To: charlet; +Cc: gcc

> We do not have anything special. It works because xgcc will look for the
> includes under <prefix>/<target>/include, at least that's the way it works
> with GCC 2.8.1.

Okay I see, no change in 3.x here. In my case (*-rtems) I will have to
install c and newlib first, then build the Ada RTS. Thanks for your
help,

-- 
Laurent Guerby <guerby@acm.org>

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

* Re: [Ada] Q about building cross gnatlib
  2001-12-01 13:04 ` Arnaud Charlet
  2001-12-01 13:42   ` guerby
@ 2001-12-02  8:29   ` Andreas Schwab
  1 sibling, 0 replies; 11+ messages in thread
From: Andreas Schwab @ 2001-12-02  8:29 UTC (permalink / raw)
  To: Arnaud Charlet; +Cc: guerby, gcc

Arnaud Charlet <charlet@ACT-Europe.FR> writes:

|> > Does the ACT tree (when building for VxWorks for example) have
|> > specific patches to the Makefile to handle the situation? If they're
|> 
|> We do not have anything special. It works because xgcc will look for the
|> includes under <prefix>/<target>/include, at least that's the way it works
|> with GCC 2.8.1.

Except that gcc is now looking for
<prefix>/lib/gcc-lib/<target>/<version>/../../../../<target>/include,
which fails if <prefix>/lib/gcc-lib/<target>/<version> does not exist.
This is a long standing bug.  You have to manually create it before you
can proceed.

Andreas.

-- 
Andreas Schwab                                  "And now for something
Andreas.Schwab@suse.de				completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5

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

end of thread, other threads:[~2001-12-02 16:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-23 16:27 [Ada] Q about building cross gnatlib guerby
2001-11-23 17:38 ` Geert Bosch
2001-11-23 21:59   ` guerby
2001-11-30 15:07     ` guerby
2001-11-23 23:19   ` Joel Sherrill
2001-11-30 15:30     ` Joel Sherrill
2001-11-30 14:30   ` Geert Bosch
2001-11-30 13:40 ` guerby
2001-12-01 13:04 ` Arnaud Charlet
2001-12-01 13:42   ` guerby
2001-12-02  8:29   ` Andreas Schwab

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