From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12373 invoked by alias); 29 Nov 2007 22:06:08 -0000 Received: (qmail 12357 invoked by uid 22791); 29 Nov 2007 22:06:06 -0000 X-Spam-Check-By: sourceware.org Received: from smtp.nildram.co.uk (HELO smtp.nildram.co.uk) (195.112.4.54) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 29 Nov 2007 22:05:58 +0000 Received: from firetop.home (84-12-20-70.dyn.gotadsl.co.uk [84.12.20.70]) by smtp.nildram.co.uk (Postfix) with ESMTP id 4B2C82B8688; Thu, 29 Nov 2007 22:05:51 +0000 (GMT) Received: from richard by firetop.home with local (Exim 4.63) (envelope-from ) id 1IxrW6-0005nv-23; Thu, 29 Nov 2007 22:05:54 +0000 From: Richard Sandiford To: Mark Mitchell Mail-Followup-To: Mark Mitchell ,Bernd Schmidt , Jie Zhang , gcc@gcc.gnu.org, GCC Patches , rsandifo@nildram.co.uk Cc: Bernd Schmidt , Jie Zhang , gcc@gcc.gnu.org, GCC Patches Subject: Re: Link tests after GCC_NO_EXECUTABLES References: <46EFBCC1.6070200@gmail.com> <46EFC383.7020503@t-online.de> <46EFC9E9.7090201@gmail.com> <46EFCEF9.3060304@t-online.de> <46EFCF7A.2080704@gmail.com> <46EFD236.6080907@t-online.de> <46EFDA4D.3070006@gmail.com> <474C0C52.8050503@t-online.de> <474C8FA4.2040603@codesourcery.com> <474C95BA.1060807@t-online.de> <474C96C1.7010208@codesourcery.com> <474C98AA.50105@t-online.de> <474C9A65.2060902@codesourcery.com> <474C9B33.8060503@t-online.de> <474C9CBD.2070708@codesourcery.com> <87fxyqdc45.fsf@firetop.home> <474D943C.4030106@codesourcery.com> Date: Fri, 30 Nov 2007 03:56:00 -0000 In-Reply-To: <474D943C.4030106@codesourcery.com> (Mark Mitchell's message of "Wed\, 28 Nov 2007 08\:15\:56 -0800") Message-ID: <877ik0aerh.fsf@firetop.home> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-11/txt/msg01680.txt.bz2 Mark Mitchell writes: > However, I think there's a solution. In particular, on > libstdc++-v3/configure.ac, we do: > > AC_LIBTOOL_DLOPEN > AM_PROG_LIBTOOL > > The AC_LIBTOOL_DLOPEN call enables checking for dlopen support in > libtool. The libtool documentation says: > > Enable checking for dlopen support. This macro should be used if > the package makes use of the `-dlopen' and `-dlpreopen' flags, > otherwise libtool will assume that the system does not support > dlopening. The macro must be called *before* `AC_PROG_LIBTOOL'. > > But, for a bare-metal toolchain, I don't think we need that. So, I'm > guessing that: > > if test "x${with_newlib}" != "xyes"; then > AC_LIBTOOL_DLOPEN > fi > > will fix the problem. (We already have checks for $with_newlib > elsewhere in configure.ac, so I think this is in the same spirit, though > a libstdc++ maintainer would of course be best to review the patch.) I built a version of binutils that treated an undefined _start as a hard error. (I also had another local binutils patch to fix an unrelated .eh_frame_hdr problem.) Reverting the libgloss change and applying the change above introduced no regressions. Applying this patch would revert to the previous situation of libgfortran being unbuildable for mips*-elf*. That's not a regression from previous releases, and I'm not sure how useful the status quo is. Even though current mainline can build libgfortran, all tests fail for simulator testing, and I'm not sure whether you could get it work for bare-metal boards or not. It sounds like we've agreed that, if we want to support libgfortran on targets like mips*-elf*, we should use libstd++-like with_newlib checks there too. Perhaps we should turn target-libgfortran off by default for mips*-elf*. I'll work on a patch to do that if this one is OK. Richard Revert: 2007-09-10 Rask Ingemann Lambertsen PR other/32154 * configure.ac: For libgloss targets, point the linker to the linker script, startup code and simulator library. * configure: Regenerate. libstdc++-v3/ 2007-xx-xx Mark Mitchell * configure.ac: Don't check AC_LIBTOOL_DLOPEN if using newlib. * configure: Regenerate. Index: configure.ac =================================================================== --- configure.ac (revision 130491) +++ configure.ac (working copy) @@ -399,9 +399,6 @@ if test x$enable_libgomp = x ; then esac fi -# Default libgloss CPU subdirectory. -libgloss_dir="$target_cpu" - case "${target}" in *-*-chorusos) noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" @@ -507,7 +504,6 @@ case "${target}" in *) noconfigdirs="$noconfigdirs gdb readline" ;; esac - libgloss_dir=wince ;; arc-*-*) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" @@ -516,11 +512,9 @@ case "${target}" in ;; arm-*-coff | strongarm-*-coff | xscale-*-coff) noconfigdirs="$noconfigdirs ${libgcj}" - libgloss_dir=arm ;; arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* ) noconfigdirs="$noconfigdirs target-libffi target-qthreads" - libgloss_dir=arm ;; arm*-*-linux-gnueabi) noconfigdirs="$noconfigdirs target-qthreads" @@ -528,11 +522,9 @@ case "${target}" in case ${with_newlib} in no) noconfigdirs="$noconfigdirs target-newlib target-libgloss" esac - libgloss_dir=arm ;; arm*-*-symbianelf*) noconfigdirs="$noconfigdirs ${libgcj} target-libiberty" - libgloss_dir=arm ;; arm-*-pe*) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" @@ -579,7 +571,6 @@ case "${target}" in unsupported_languages="$unsupported_languages fortran" noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss";; esac - libgloss_dir=cris ;; crx-*-*) noconfigdirs="$noconfigdirs target-libstdc++-v3 target-mudflap ${libgcj}" @@ -590,9 +581,6 @@ case "${target}" in d30v-*-*) noconfigdirs="$noconfigdirs ${libgcj} gdb" ;; - ep9312-*-elf | ep9312-*-coff) - libgloss_dir=arm - ;; fr30-*-elf*) noconfigdirs="$noconfigdirs ${libgcj} gdb" ;; @@ -624,9 +612,6 @@ case "${target}" in hppa*-hp-hpux11*) noconfigdirs="$noconfigdirs ld shellutils" ;; - hppa*-*-pro*) - libgloss_dir=pa - ;; hppa*-*-*) # According to Alexandre Oliva , libjava won't # build on HP-UX 10.20. @@ -647,7 +632,6 @@ case "${target}" in ;; i[[3456789]]86-*-coff | i[[3456789]]86-*-elf) noconfigdirs="$noconfigdirs ${libgcj}" - libgloss_dir=i386 ;; i[[3456789]]86-*-linux*) # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's @@ -717,7 +701,6 @@ case "${target}" in ;; m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*) noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}" - libgloss_dir=m68hc11 ;; m68k-*-elf*) noconfigdirs="$noconfigdirs ${libgcj}" @@ -725,9 +708,6 @@ case "${target}" in m68k-*-coff*) noconfigdirs="$noconfigdirs ${libgcj}" ;; - m68*-*-* | fido-*-*) - libgloss_dir=m68k - ;; mcore-*-pe*) # The EPOC C++ environment does not support exceptions or rtti, # and so building libstdc++-v3 tends not to always work. @@ -759,17 +739,14 @@ case "${target}" in # This is temporary until we can link against shared libraries powerpcle-*-solaris*) noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl gnuserv ${libgcj}" - libgloss_dir=rs6000 ;; powerpc-*-beos*) noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}" ;; powerpc-*-eabi) noconfigdirs="$noconfigdirs ${libgcj}" - libgloss_dir=rs6000 ;; powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* ) - libgloss_dir=rs6000 ;; rs6000-*-lynxos*) noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}" @@ -809,7 +786,6 @@ case "${target}" in ;; mips*-*-*) noconfigdirs="$noconfigdirs gprof ${libgcj}" - libgloss_dir=mips ;; romp-*-*) noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" @@ -823,19 +799,14 @@ case "${target}" in esac noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; - sparclet-*-aout* | sparc86x-*-*) - libgloss_dir=sparc - ;; sparc-*-elf*) noconfigdirs="$noconfigdirs ${libgcj}" ;; sparc64-*-elf*) noconfigdirs="$noconfigdirs ${libgcj}" - libgloss_dir=sparc ;; sparclite-*-*) noconfigdirs="$noconfigdirs ${libgcj}" - libgloss_dir=sparc ;; sparc-*-sunos4*) noconfigdirs="$noconfigdirs ${libgcj}" @@ -2360,19 +2331,6 @@ case " $target_configdirs " in # for any libc-related directories first (so make it the last -B # switch). FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include' - - # If we're building libgloss, find the startup file, simulator library - # and linker script. - case " $target_configdirs " in - *" libgloss "*) - # Look for startup file, simulator library and maybe linker script. - FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/libgloss/'"$libgloss_dir" - # Look for libnosys.a in case the target needs it. - FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/libnosys' - # Most targets have the linker script in the source directory. - FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$s/libgloss/'"$libgloss_dir" - ;; - esac ;; esac ;; @@ -2410,6 +2368,16 @@ fi # Search for other target-specific linker scripts and such. case "${target}" in + m32c-*-* ) + if test -d ${srcdir}/libgloss/m32c; then + # This is for crt0.o + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/libgloss/m32c' + # This is for r8c.ld + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/m32c' + # This is for libnosys.a + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/libnosys' + fi + ;; mep*) FLAGS_FOR_TARGET="$FLAGS_FOR_TARGET -mlibrary" ;; Index: libstdc++-v3/configure.ac =================================================================== --- libstdc++-v3/configure.ac (revision 130491) +++ libstdc++-v3/configure.ac (working copy) @@ -82,7 +82,9 @@ AH_TEMPLATE(VERSION, [Version number of # up critical shell variables. GLIBCXX_CONFIGURE -AC_LIBTOOL_DLOPEN +if test "x${with_newlib}" != "xyes"; then + AC_LIBTOOL_DLOPEN +fi AM_PROG_LIBTOOL AC_SUBST(enable_shared) AC_SUBST(enable_static)