public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [v3] dejagnu support for simple cross compilers
@ 2001-04-10 22:55 Benjamin Kosnik
  2001-04-11 14:25 ` Alexandre Oliva
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Kosnik @ 2001-04-10 22:55 UTC (permalink / raw)
  To: gcc-patches, aoliva

Ok, how about this? Seems to do the trick.

2001-04-11  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.in: Remove xcompiling substitution.
	* tests_flags.in (CROSS_LIB_PATH): Remove.
	(xcompiling): Remove.
	(CXX): Use substituted CXX.
	
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/configure.in,v
retrieving revision 1.57
diff -c -p -r1.57 configure.in
*** configure.in	2001/03/30 08:14:14	1.57
--- configure.in	2001/04/11 05:53:02
*************** AC_LINK_FILES($ATOMICITYH/bits/atomicity
*** 236,242 ****
  AM_CONDITIONAL(NULL_TARGET, test "$NULL_TARGET" = yes)
  AM_CONDITIONAL(NATIVE, test "$NATIVE" = yes || test "$NULL_TARGET" = yes)
  AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
- AC_SUBST(xcompiling)
   
  AC_CACHE_SAVE
  AC_LC_MESSAGES
--- 236,241 ----
Index: tests_flags.in
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/tests_flags.in,v
retrieving revision 1.19
diff -c -p -r1.19 tests_flags.in
*** tests_flags.in	2001/04/06 19:43:23	1.19
--- tests_flags.in	2001/04/11 05:53:02
*************** case ${query} in
*** 132,144 ****
      --built-library)
        LIB_PATH=${BUILD_DIR}/src
        GCC_LIB_PATH=${BUILD_DIR}/../../gcc
!       CROSS_LIB_PATH=${BUILD_DIR}/../newlib
!       CXX="${BUILD_DIR}/../../gcc/g++ -B${BUILD_DIR}/../../gcc/"
        ;;
      --installed-library)
        LIB_PATH=${PREFIX_DIR}/lib
        GCC_LIB_PATH=
-       CROSS_LIB_PATH=
        CXX=${PREFIX_DIR}/bin/g++
        ;;
  esac
--- 132,142 ----
      --built-library)
        LIB_PATH=${BUILD_DIR}/src
        GCC_LIB_PATH=${BUILD_DIR}/../../gcc
!       CXX="@CXX@"
        ;;
      --installed-library)
        LIB_PATH=${PREFIX_DIR}/lib
        GCC_LIB_PATH=
        CXX=${PREFIX_DIR}/bin/g++
        ;;
  esac
*************** CXXFLAGS="-ggdb3 -DDEBUG_ASSERT @SECTION
*** 151,159 ****
  case ${query} in
      --built-library)
        LIBS="${LIB_PATH}/libstdc++.la -no-install -rpath ${GCC_LIB_PATH}"
-       if test x@xcompiling@ = x1; then
-         LIBS="${LIBS} -B${CROSS_LIB_PATH}/"
-       fi
      case @target_os@ in
          *cygwin*)  
  	  LIBS="${LIBS} -nodefaultlibs -lgcc -lcygwin -luser32
--- 149,154 ----




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

* Re: [v3] dejagnu support for simple cross compilers
  2001-04-10 22:55 [v3] dejagnu support for simple cross compilers Benjamin Kosnik
@ 2001-04-11 14:25 ` Alexandre Oliva
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandre Oliva @ 2001-04-11 14:25 UTC (permalink / raw)
  To: Benjamin Kosnik; +Cc: gcc-patches

On Apr 11, 2001, Benjamin Kosnik <bkoz@redhat.com> wrote:

> Ok, how about this? Seems to do the trick.

> 2001-04-11  Benjamin Kosnik  <bkoz@redhat.com>

> 	* configure.in: Remove xcompiling substitution.
> 	* tests_flags.in (CROSS_LIB_PATH): Remove.
> 	(xcompiling): Remove.
> 	(CXX): Use substituted CXX.
	
Looks good to me.  Thanks for looking into it!

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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

* Re: [v3] dejagnu support for simple cross compilers
  2001-04-10 16:36     ` Geoff Keating
  2001-04-10 16:52       ` Benjamin Kosnik
@ 2001-04-10 17:59       ` Alexandre Oliva
  1 sibling, 0 replies; 8+ messages in thread
From: Alexandre Oliva @ 2001-04-10 17:59 UTC (permalink / raw)
  To: Geoff Keating; +Cc: bkoz, gcc-patches, rth

On Apr 10, 2001, Geoff Keating <geoffk@geoffk.org> wrote:

>> From: Benjamin Kosnik <bkoz@redhat.com>
>> FLAGS_FOR_TARGET is defined in the top-level Makefile of my x86-linux -x- 
>> powerpc-eabism build directory as follows:
>> 
>> Looks encouraging, but it isn't passed down to target libs.

> It's passed down, I believe, as 'CFLAGS'

CC and CXX, actually.

We can certainly arrange to have it passed separately, if there's need
for that.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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

* Re: [v3] dejagnu support for simple cross compilers
  2001-04-10 16:36     ` Geoff Keating
@ 2001-04-10 16:52       ` Benjamin Kosnik
  2001-04-10 17:59       ` Alexandre Oliva
  1 sibling, 0 replies; 8+ messages in thread
From: Benjamin Kosnik @ 2001-04-10 16:52 UTC (permalink / raw)
  To: Geoff Keating; +Cc: aoliva, gcc-patches, rth

> > Looks encouraging, but it isn't passed down to target libs. Even if I add 
> > it to BASE_FLAGS_TO_PASS in the toplevel Makefile, and AM_MAKEFLAGS in 
> > libstdc++v3/Makefile.am.

well I think the whole point of this was to get libgloss in there too, so 
in anycase things aren't 100% done.

> It's passed down, I believe, as 'CFLAGS', as in target libs it is no
> longer the flags for the "target" but flags for the host.  (The
> libraries don't have a "target", anyway, because they are not
> compilers or assemblers.)

all valid, but I don't see the info passed down at all, as CFLAGS or 
anything else.

-benjamin

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

* Re: [v3] dejagnu support for simple cross compilers
  2001-04-10 16:23   ` Benjamin Kosnik
@ 2001-04-10 16:36     ` Geoff Keating
  2001-04-10 16:52       ` Benjamin Kosnik
  2001-04-10 17:59       ` Alexandre Oliva
  0 siblings, 2 replies; 8+ messages in thread
From: Geoff Keating @ 2001-04-10 16:36 UTC (permalink / raw)
  To: bkoz; +Cc: aoliva, gcc-patches, rth

> Date: Tue, 10 Apr 2001 16:23:16 -0700 (PDT)
> From: Benjamin Kosnik <bkoz@redhat.com>
> cc: gcc-patches@gcc.gnu.org, geoffk@redhat.com, rth@redhat.com
> 
> > > !         LIBS="${LIBS} -B${CROSS_LIB_PATH}/"
> > 
> > Please consider using $(FLAGS_FOR_TARGET) or some variant thereof.  It
> > will help finding crt0.o when it's built in libgloss, for example.
> 
> Hmm. I can't seem to get
> 
> FLAGS_FOR_TARGET
> CFLAGS_FOR_TARGET
> LIBCFLAGS_FOR_TARGET
> 
> to work. Any of them. 
> 
> FLAGS_FOR_TARGET is defined in the top-level Makefile of my x86-linux -x- 
> powerpc-eabism build directory as follows:
> 
> FLAGS_FOR_TARGET =  -nostdinc -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem 
> $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include 
> -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem 
> $(build_tooldir)/include -L$$r/ld
> 
> Looks encouraging, but it isn't passed down to target libs. Even if I add 
> it to BASE_FLAGS_TO_PASS in the toplevel Makefile, and AM_MAKEFLAGS in 
> libstdc++v3/Makefile.am.

It's passed down, I believe, as 'CFLAGS', as in target libs it is no
longer the flags for the "target" but flags for the host.  (The
libraries don't have a "target", anyway, because they are not
compilers or assemblers.)

-- 
- Geoffrey Keating <geoffk@geoffk.org>

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

* Re: [v3] dejagnu support for simple cross compilers
  2001-04-06 15:19 ` Alexandre Oliva
@ 2001-04-10 16:23   ` Benjamin Kosnik
  2001-04-10 16:36     ` Geoff Keating
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Kosnik @ 2001-04-10 16:23 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gcc-patches, geoffk, rth

> > !         LIBS="${LIBS} -B${CROSS_LIB_PATH}/"
> 
> Please consider using $(FLAGS_FOR_TARGET) or some variant thereof.  It
> will help finding crt0.o when it's built in libgloss, for example.

Hmm. I can't seem to get

FLAGS_FOR_TARGET
CFLAGS_FOR_TARGET
LIBCFLAGS_FOR_TARGET

to work. Any of them. 

FLAGS_FOR_TARGET is defined in the top-level Makefile of my x86-linux -x- 
powerpc-eabism build directory as follows:

FLAGS_FOR_TARGET =  -nostdinc -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem 
$$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include 
-B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem 
$(build_tooldir)/include -L$$r/ld

Looks encouraging, but it isn't passed down to target libs. Even if I add 
it to BASE_FLAGS_TO_PASS in the toplevel Makefile, and AM_MAKEFLAGS in 
libstdc++v3/Makefile.am.

No luck.

-benjamin

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

* Re: [v3] dejagnu support for simple cross compilers
  2001-04-06 12:43 Benjamin Kosnik
@ 2001-04-06 15:19 ` Alexandre Oliva
  2001-04-10 16:23   ` Benjamin Kosnik
  0 siblings, 1 reply; 8+ messages in thread
From: Alexandre Oliva @ 2001-04-06 15:19 UTC (permalink / raw)
  To: Benjamin Kosnik; +Cc: gcc-patches, geoffk, rth

On Apr  6, 2001, Benjamin Kosnik <bkoz@redhat.com> wrote:

> !         LIBS="${LIBS} -B${CROSS_LIB_PATH}/"

Please consider using $(FLAGS_FOR_TARGET) or some variant thereof.  It
will help finding crt0.o when it's built in libgloss, for example.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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

* [v3] dejagnu support for simple cross compilers
@ 2001-04-06 12:43 Benjamin Kosnik
  2001-04-06 15:19 ` Alexandre Oliva
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Kosnik @ 2001-04-06 12:43 UTC (permalink / raw)
  To: gcc-patches, geoffk, rth

Thanks to Alexandre who pointed this out to me last night.

Now (some) cross compilers can actually be tested. I tried with
powerpc-eabism and xscale-elf.

1) for powerpc-eabism: Now getting stuff like:

/mnt/hd/ahimsa/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/../../gcc/collect-ld: warning: cannot find entry symbol _start; defaulting to 01800074
/mnt/hd/ahimsa/bld-x86-x-powerpc-eabism/gcc/libgcc.a(eabi.o): In function `__eabi':
eabi.o(.text+0xc4): undefined reference to `__init'
/mnt/hd/ahimsa/bld-x86-x-powerpc-eabism/gcc/libgcc.a(eabi.o)(.got2+0x8): undefined reference to `__SDATA_START__'
/mnt/hd/ahimsa/bld-x86-x-powerpc-eabism/gcc/libgcc.a(eabi.o)(.got2+0xc): undefined reference to `__SBSS_END__'
/mnt/hd/ahimsa/bld-x86-x-powerpc-eabism/gcc/libgcc.a(eabi.o)(.got2+0x14): undefined reference to `__SDATA2_START__'
/mnt/hd/ahimsa/bld-x86-x-powerpc-eabism/gcc/libgcc.a(eabi.o)(.got2+0x18): undefi

I suspect this is because the newlib build dir doesn't have a crt0.o
in it.  If I remember correctly this is one of the targets where this
is vendor-supplied (oh, bother) and thus setting everything up
correctly is a bit of a pain. Geoffrey, if you can help me out here I am
pretty sure I can get this to work.

2) for xscale-elf.
Things are actually linking correctly, whoo-hoo. I am seeing some
link fails due to weird label issues:

/tmp/ccXUNwgh.o: In function `test01()':
/mnt/hd/bliss/src.gcc-merged/libstdc++-v3/testsuite/18_support/numeric_limits.cc:67: undefined reference to `LLSDA8'
/mnt/hd/bliss/src.gcc-merged/libstdc++-v3/testsuite/18_support/numeric_limits.cc:68: undefined reference to `LLSDA9'
/mnt/hd/bliss/src.gcc-merged/libstdc++-v3/testsuite/18_support/numeric_limits.cc:81: undefined reference to `LLSDA10'
/tmp/ccXUNwgh.o: In function `__FRAME_BEGIN__':
/tmp/ccXUNwgh.o(.eh_frame+0x249): undefined reference to `LLSDA11'

A bit psycho, and I won't have time to look at this for a
day or two still. Richard, does ths ring a bell? You might be able to duplicate
this with a mips-elf cross too.

put on head, will be merged to branch shortly.

tested x86/linux

2001-04-06  Benjamin Kosnik  <bkoz@redhat.com>
            Alexandre Oliva  <aoliva@redhat.com>
	
	* tests_flags.in (CROSS_LIB_PATH): Add as -B flag.

Index: tests_flags.in
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/tests_flags.in,v
retrieving revision 1.18
diff -c -p -r1.18 tests_flags.in
*** tests_flags.in	2001/04/06 08:00:55	1.18
--- tests_flags.in	2001/04/06 19:35:03
*************** case ${query} in
*** 152,158 ****
      --built-library)
        LIBS="${LIB_PATH}/libstdc++.la -no-install -rpath ${GCC_LIB_PATH}"
        if test x@xcompiling@ = x1; then
!         LIBS="${LIBS} -L${CROSS_LIB_PATH}"
        fi
      case @target_os@ in
          *cygwin*)  
--- 152,158 ----
      --built-library)
        LIBS="${LIB_PATH}/libstdc++.la -no-install -rpath ${GCC_LIB_PATH}"
        if test x@xcompiling@ = x1; then
!         LIBS="${LIBS} -B${CROSS_LIB_PATH}/"
        fi
      case @target_os@ in
          *cygwin*)  



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

end of thread, other threads:[~2001-04-11 14:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-10 22:55 [v3] dejagnu support for simple cross compilers Benjamin Kosnik
2001-04-11 14:25 ` Alexandre Oliva
  -- strict thread matches above, loose matches on Subject: below --
2001-04-06 12:43 Benjamin Kosnik
2001-04-06 15:19 ` Alexandre Oliva
2001-04-10 16:23   ` Benjamin Kosnik
2001-04-10 16:36     ` Geoff Keating
2001-04-10 16:52       ` Benjamin Kosnik
2001-04-10 17:59       ` Alexandre Oliva

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