From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5141 invoked by alias); 14 Nov 2009 10:49:15 -0000 Received: (qmail 5133 invoked by uid 22791); 14 Nov 2009 10:49:14 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.gmx.net (HELO mail.gmx.net) (213.165.64.20) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Sat, 14 Nov 2009 10:48:21 +0000 Received: (qmail invoked by alias); 14 Nov 2009 10:48:18 -0000 Received: from xdsl-87-78-124-46.netcologne.de (EHLO localhost.localdomain) [87.78.124.46] by mail.gmx.net (mp056) with SMTP; 14 Nov 2009 11:48:18 +0100 Received: from ralf by localhost.localdomain with local (Exim 4.69) (envelope-from ) id 1N9GAz-0002Mn-Lo; Sat, 14 Nov 2009 11:48:17 +0100 Date: Sat, 14 Nov 2009 10:49:00 -0000 From: Ralf Wildenhues To: Paul Edwards Cc: Ulrich Weigand , Ian Lance Taylor , gcc@gcc.gnu.org Subject: Re: i370 port - constructing compile script Message-ID: <20091114104817.GI27368@gmx.de> Mail-Followup-To: Ralf Wildenhues , Paul Edwards , Ulrich Weigand , Ian Lance Taylor , gcc@gcc.gnu.org References: <200911131257.nADCvpjn024342@d12av02.megacenter.de.ibm.com> <3FAFF5DABCFE4E2481AF2B69337626F4@Paullaptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FAFF5DABCFE4E2481AF2B69337626F4@Paullaptop> User-Agent: Mutt/1.5.20 (2009-08-09) X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-11/txt/msg00391.txt.bz2 * Paul Edwards wrote on Sat, Nov 14, 2009 at 09:51:39AM CET: > >Well, the configure process should result in the variable LIBOBJS > >in the generated libiberty Makefile to be set to list of objects > >containing implementations of replacement system routines. > > > >So if you do not have HAVE_STRCASECMP in config.h, you should > >have been getting strcasecmp.o in LIBOBJS ... > > And indeed, I sort of am. > > LIBOBJS includes a strcasecmp.s$U.s > > That suffix is certainly strange-looking though. I checked in > config.log and I can see that it automatically detected that > my "object code" has a ".s" extension, which is basically > correct given that I forced the "-S" option. Why do you pass -S in the compiler script? configure sort of expects that neither -S nor -c are passed automatically. > In addition, there's another problem - it has included strncmp > in the list. I had a look and it appears that it attempts to > actually run the program to see if strncmp works. That's > not going to work in a cross-compile environment though. > So maybe it assumes the worst. Yes. The macro that does this is libiberty_AC_FUNC_STRNCMP in libiberty/aclocal.m4. In a cross-compile situation, the macro assumes that strncmp does not work. It uses the cache variable ac_cv_func_strncmp_works, which you can set if you need to override the decision, e.g.: ac_cv_func_strncmp_works=yes export ac_cv_func_strncmp_works ../gcc/configure ... A more permanent solution would be to set this correctly based upon $host in libiberty/configure.ac and regenerate libiberty/configure with autoconf. > And then I changed ac_libobjs to stop putting that $U in there as > well, and I finally got my strcasecmp. Why does that $U hurt you? It should get expanded to nothing later on. (It is a remainder from some ansi2knr scheme.) > Note that I also seem to be getting strerror. It's on the list > of "required files", even though it isn't required or wanted. > configure correctly detected that I already had strerror. > I manually excluded that from my list of files and now things > are looking good again - including strcasecmp being > automatically selected in the build process. :-) Again, rather than hacking the generated configure script, I think you should start modifying the input files, configure.ac in this case, for permanent solutions to your build issues. Even if you're only changing a few lines, doing it each time you want to build a different GCC version is an unnecessary burden. Thanks, Ralf