[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Enhanced support for UNICOS
From: |
Ralf Wildenhues |
Subject: |
Enhanced support for UNICOS |
Date: |
Mon, 31 Jan 2005 17:06:08 +0100 |
User-agent: |
Mutt/1.4.1i |
I've found an old Cray to test Libtool's UNICOS support on[1], and have
a question for people with access to new UNICOS machines[2].
No shared libraries, merely a few workarounds for tool limitations
(and bugs I've found in Libtool), see patches at end:
- a branch-2-0/HEAD regression (the C compiler understands
`-c -o', the Fortran 77 compiler doesn't).
- a simple sed limitation workaround: no empty `\(\)' (for HEAD).
- wl=-Wl, on unicos* (all branches).
- sed limitation: no '/.*\n.*/' (all branches).
- a couple of bugs in quote.test: --no-reexec should
be checked for in $1 (to avoid two re-exec's; HEAD/branch-2-0);
plus, when we match, quoted link flags, we need to match against
`${wl}..', not against `-Wl,..' (all branches).
OK to apply all of these (the patch shown below is against HEAD; against
the other branches looks really similar)?
Further notes:
/bin/sh *seems* to work flawlessly most of the time, then it
dumps core at some random
foo=`$ECHO | $SED ..`
line. If I insert a dummy line
: `echo`
before that, this line survives. Fortunately, there's a modern bash
installed as well. So I figured to not bother with that shell
(also because the lines at which it barfed seemed quite unpredictable).
Also, GNU make was the only make installed.
The compiler works fine, except that, sometimes, when called from within
Libtool, created executables don't have the executable bit set. If the
same line is called from within a small shell script or directly, it
works. Printing the umask right before the
eval "$command"
shows 0077. I don't know what's going on here, and util I do, I won't
put in a workaround.
The fortran compiler fort77 is found by AC_PROG_F77, but cf77 is the
real one and offers an advanced interface (i.e., it actually allows you
to pass options to the linker, with -Wl,).
f77demo configure spuriously fails to get verbose output from cf77 (it
understands `-v'), because it does not add anything to the link line
(I don't consider this an error, as libtool ends up doing the right
thing).
mdemo-dryrun fails because of changed timestamps. Haven't looked into
this (dunno if I care enough to.)
Patch proposition to Autoconf pending.
[1] Many thanks to cray-cyber.org for allowing me to test this
on a Y-MP (config.guess: ymp-cray-unicos9.0.2.X. :)
BTW: this whole exercise is because I figured if Libtool ran on that
venerable machine, it'd probably run flawlessly on the X1 as well.
[2] What puzzles me is that online docs for the Cray Fortran compilers
state that
-Wl"-someflag"
is used to pass -someflag to the linker (note the missing comma!).
Can somebody with access verify that `-Wl,"-someflag"' also works?
With cf77, both works, so I guess it should still work with newer
compilers. Otherwise, we may need to adapt Libtool to this.
Regards,
Ralf
2005-01-29 Ralf Wildenhues <address@hidden>
* m4/libtool.m4 (_LT_COMPILER_C_O): _LT_TAGDECL(lt_compiler_c_o),
not _LT_DECL, since this is tag-dependent.
* m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Unicos 9 sed rejects
empty parentheses as in 's/x\(\)/\1/'.
* m4/libtool.m4 (_LT_COMPILER_PIC) [unicos*]: wl=-Wl,.
* tests/sh.test: Not all sed's like '/.*\n.*/' (Unicos 9 sed
loops endlessly).
* tests/quote.test: Check for `--no-reexec' in $1 to avoid one
reexec.
* tests/quote.test: Match link quoting against "$wl", not against
'-Wl,'.
Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.160
diff -u -r1.160 libtool.m4
--- m4/libtool.m4 29 Jan 2005 15:09:07 -0000 1.160
+++ m4/libtool.m4 31 Jan 2005 08:17:54 -0000
@@ -1492,7 +1492,7 @@
rmdir conftest
$RM conftest*
])
-_LT_DECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
[Does compiler simultaneously support -c and -o options?])
])# _LT_COMPILER_C_O
@@ -2776,9 +2776,6 @@
# Regexp to match symbols that can be accessed directly from C.
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
-
# Define system-specific variables.
case $host_os in
aix*)
@@ -2831,8 +2828,11 @@
# Try without a prefix underscore, then with it.
for ac_symprfx in "" "_"; do
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
# Write the raw and C identifiers.
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[
]]\($symcode$symcode*\)[[ ]][[
]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[
]]\($symcode$symcode*\)[[ ]][[
]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
# Check to see that the pipe works correctly.
pipe_works=no
@@ -3434,6 +3434,11 @@
fi
;;
+ unicos*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+
uts4*)
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Index: tests/sh.test
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/sh.test,v
retrieving revision 1.22
diff -u -r1.22 sh.test
--- tests/sh.test 10 Jan 2005 10:59:37 -0000 1.22
+++ tests/sh.test 31 Jan 2005 08:17:54 -0000
@@ -84,7 +84,7 @@
# Check for using shift after set dummy (same or following line).
for s in $scripts
do
- if $SED -n '/set[ ][
]*dummy/{/set.*dummy.*;.*shift/d;N;/set.*dummy.*\n.*shift/D;p;}' "$s" |
+ if $SED -n '/set[ ][
]*dummy/{/set.*dummy.*;.*shift/d;N;/\n.*shift/D;p;}' "$s" |
$EGREP .; then
echo "use \`shift' after \`set dummy' in $s"
status=$EXIT_FAILURE
Index: tests/quote.test
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/quote.test,v
retrieving revision 1.15
diff -u -r1.15 quote.test
--- tests/quote.test 28 Dec 2004 10:28:21 -0000 1.15
+++ tests/quote.test 31 Jan 2005 09:34:14 -0000
@@ -26,7 +26,7 @@
# Do the torture test.
status=$EXIT_SUCCESS
-case $2 in
+case $1 in
--no-reexec)
;;
*)
@@ -36,6 +36,7 @@
esac
func_get_config "ECHO" "../libtool --config"
+func_get_config "wl" "../libtool --config"
for mode in compile link install; do
$ECHO "== $mode mode"
@@ -49,6 +50,7 @@
compile)
preargs="$CC -c"
preflag=
+ match_preflag=
flag="-DVAR="
postargs="foo.c"
;;
@@ -56,6 +58,7 @@
link)
preargs="$CC -o hell -g -O"
preflag=-Wl,
+ match_preflag="$wl"
flag="-someflag="
postargs="foo.o"
;;
@@ -63,6 +66,7 @@
install)
preargs="install -c"
preflag=
+ match_preflag=
flag="--something="
postargs="hell /usr/local/bin/hell"
;;
@@ -77,7 +81,7 @@
# We must not attempt to match $preargs in the output, because libtool
# may modify them. For example, on Cygwin, ``libtool --mode=link gcc -o
# foo foo.o'' becomes ``gcc -o foo.exe foo.o''.
- match="${preflag}${flag}test "
+ match="${match_preflag}${flag}test "
case "$result" in
*"$match"*)
$ECHO "= passed: $result"
@@ -92,7 +96,7 @@
for mchar in \\ \" \` \$; do
$ECHO "= trying: \\$mchar quoting"
result=`$LIBTOOL -n --mode=$mode $preargs
${preflag}"${flag}${mchar}test${mchar}" $postargs` || status=$EXIT_FAILURE
- match="${preflag}${flag}\\${mchar}test\\${mchar} "
+ match="${match_preflag}${flag}\\${mchar}test\\${mchar} "
case "$result" in
*"$match"*)
$ECHO "= passed: $result"
@@ -110,7 +114,7 @@
$ECHO "= trying: \"$mchar\" quoting"
result=`$LIBTOOL -n --mode=$mode $preargs
${preflag}"${flag}${mchar}test${mchar}" $postargs` || status=$EXIT_FAILURE
- match="${preflag}\"${flag}${mchar}test${mchar}\" "
+ match="${match_preflag}\"${flag}${mchar}test${mchar}\" "
case "$result" in
*"$match"*)
$ECHO "= passed: $result"
- Enhanced support for UNICOS,
Ralf Wildenhues <=