This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libstdc++-v3 configuration and check problems under hpux 10.20


On Feb 19, 2001, "John David Anglin" <dave@hiauly1.hia.nrc.ca> wrote:

> 1) There is a failure in the libtool CXX configuration regarding the ability
>    of g++ to build shared libraries.

Indeed.  Libtool still doesn't support g++ on HP-UX.  It should be
trivial to add support, as soon as you know which commands to use.
A patch for ltcf-cxx.sh Cc:ed to libtool-patches@gnu.org would be very
appreciated.

> Puzzled why the command to parse nm output failed.

Hmm...  Could it be because ltconfig doesn't specify a return type for
main() in the `nm' test?

Please try this patch:

Index: ltconfig
===================================================================
RCS file: /cvs/gcc/egcs/ltconfig,v
retrieving revision 1.15
diff -u -p -r1.15 ltconfig
--- ltconfig 2001/01/27 19:48:46 1.15
+++ ltconfig 2001/02/20 06:09:23
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 # ltconfig - Create a system-specific libtool.
-# Copyright (C) 1996-2000 Free Software Foundation, Inc.
+# Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 #
 # This file is free software; you can redistribute it and/or modify it
@@ -1308,7 +1308,7 @@ void nm_test_func(){}
 #ifdef __cplusplus
 }
 #endif
-main(){nm_test_var='a';nm_test_func();return(0);}
+int main(){nm_test_var='a';nm_test_func();return(0);}
 EOF
 
   echo "$progname:1309: checking if global_symbol_pipe works" >&5
@@ -1838,8 +1838,9 @@ else
 # endif
 #endif
 
-fnord() { int i=42;}
-main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+void fnord() { int i=42; }
+int main() {
+    void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
     if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
                if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
 
@@ -1911,8 +1912,9 @@ else
 # endif
 #endif
 
-fnord() { int i=42;}
-main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+void fnord() { int i=42; }
+int main() {
+    void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
     if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
     if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
 


> 2) mkcheck fails with an error (see below).

> /xxx/gnu/gcc-3.0/objdir/hppa1.1-hp-hpux10.20/libstdc++-v3/mkcheck: set: unknown option:  

AFAIK, mkcheck is a bash-only shell-script.  In any case, this patch
might help.  Please let me know if it fixes the problem.

Index: libstdc++-v3/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* mkcheck.in: Make sure the first argument to set won't be taken
	as an option.

Index: libstdc++-v3/mkcheck.in
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/mkcheck.in,v
retrieving revision 1.50
diff -u -p -r1.50 mkcheck.in
--- libstdc++-v3/mkcheck.in 2001/02/16 01:39:06 1.50
+++ libstdc++-v3/mkcheck.in 2001/02/20 06:12:27
@@ -52,7 +52,8 @@ esac
 # Compute the flags necessary to run the testsuite.
 saved_ifs=$IFS
 IFS=':'
-set `../tests_flags ${query} $*` || exit 1
+set x `../tests_flags ${query} $*` || exit 1
+shift
 BUILD_DIR=$1; SRC_DIR=$2; PREFIX_DIR=$3; CXX=$4; CXXFLAGS=$5; INCLUDES=$6; LIBS=$7;
 IFS=$saved_ifs
 

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]