1997-12-16 20:15:09 +01:00
|
|
|
# sourced my ../configure to get the list of files to link
|
|
|
|
# this should set $mpi_ln_src and mpi_ln_dst.
|
|
|
|
# Note: this is called from the above directory.
|
|
|
|
|
1997-12-23 18:30:18 +01:00
|
|
|
|
|
|
|
mpi_extra_modules=
|
|
|
|
|
1998-01-30 18:14:55 +01:00
|
|
|
test -d ./mpi || mkdir ./mpi
|
|
|
|
|
1997-12-23 18:30:18 +01:00
|
|
|
echo '/* created by config.links - do not edit */' >./mpi/asm-syntax.h
|
1997-12-16 20:15:09 +01:00
|
|
|
|
|
|
|
case "${target}" in
|
1998-02-11 04:25:44 +01:00
|
|
|
i[34]86*-*-linuxaout* | i[34]86*-*-linuxoldld* | i[34]86*-*-*bsd*)
|
1997-12-23 18:30:18 +01:00
|
|
|
echo '#define BSD_SYNTAX' >>./mpi/asm-syntax.h
|
1998-02-26 17:56:31 +01:00
|
|
|
echo '#define X86_BROKEN_ALIGN' >>./mpi/asm-syntax.h
|
1998-01-30 18:14:55 +01:00
|
|
|
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
|
1997-12-23 18:30:18 +01:00
|
|
|
path="i386"
|
|
|
|
;;
|
|
|
|
i[56]86*-*-linuxaout* | i[56]86*-*-linuxoldld* | i[56]86*-*-*bsd*)
|
|
|
|
echo '#define BSD_SYNTAX' >>./mpi/asm-syntax.h
|
1998-02-26 17:56:31 +01:00
|
|
|
echo '#define X86_BROKEN_ALIGN' >>./mpi/asm-syntax.h
|
1998-01-30 18:14:55 +01:00
|
|
|
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
|
1997-12-23 18:30:18 +01:00
|
|
|
path="i586 i386"
|
|
|
|
;;
|
1998-02-11 04:25:44 +01:00
|
|
|
i[34]86*-*-*)
|
1997-12-16 20:15:09 +01:00
|
|
|
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
|
1998-01-30 18:14:55 +01:00
|
|
|
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
|
1997-12-16 20:15:09 +01:00
|
|
|
path="i386"
|
|
|
|
;;
|
|
|
|
i[56]86*-*-* | pentium-*-* | pentiumpro-*-*)
|
|
|
|
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
|
1998-02-11 04:25:44 +01:00
|
|
|
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
|
1997-12-23 18:30:18 +01:00
|
|
|
path="i586 i386"
|
|
|
|
;;
|
|
|
|
alpha*-*-*)
|
|
|
|
echo '/* configured for alpha */' >>./mpi/asm-syntax.h
|
|
|
|
path="alpha"
|
|
|
|
mpi_extra_modules="udiv-qrnnd"
|
|
|
|
;;
|
|
|
|
hppa7000*-*-*)
|
|
|
|
echo '/* configured for HPPA (pa7000) */' >>./mpi/asm-syntax.h
|
1998-02-12 20:52:41 +01:00
|
|
|
path="hppa1.1 hppa"
|
1997-12-23 18:30:18 +01:00
|
|
|
mpi_extra_modules="udiv-qrnnd"
|
|
|
|
;;
|
|
|
|
hppa1.0*-*-*)
|
|
|
|
echo '/* configured for HPPA 1.0 */' >>./mpi/asm-syntax.h
|
|
|
|
path="hppa"
|
|
|
|
mpi_extra_modules="udiv-qrnnd"
|
|
|
|
;;
|
|
|
|
hppa*-*-*) # assume pa7100
|
|
|
|
echo '/* configured for HPPA (pa7100) */' >>./mpi/asm-syntax.h
|
1998-02-12 20:52:41 +01:00
|
|
|
path="pa7100 hppa1.1 hppa"
|
1997-12-23 18:30:18 +01:00
|
|
|
mpi_extra_modules="udiv-qrnnd"
|
1997-12-16 20:15:09 +01:00
|
|
|
;;
|
1998-01-12 11:18:17 +01:00
|
|
|
sparc9*-*-* | sparc64*-*-* | ultrasparc*-*-*)
|
|
|
|
echo '/* configured for sparc9 or higher */' >>./mpi/asm-syntax.h
|
|
|
|
path="sparc32v8 sparc32"
|
|
|
|
;;
|
|
|
|
sparc8*-*-* | microsparc*-*-*)
|
|
|
|
echo '/* configured for sparc8 */' >>./mpi/asm-syntax.h
|
|
|
|
path="sparc32v8"
|
|
|
|
;;
|
|
|
|
supersparc*-*-*)
|
|
|
|
echo '/* configured for supersparc */' >>./mpi/asm-syntax.h
|
|
|
|
path="supersparc sparc32v8 sparc32"
|
|
|
|
mpi_extra_modules="udiv"
|
|
|
|
;;
|
|
|
|
sparc*-*-*)
|
|
|
|
echo '/* configured for sparc */' >>./mpi/asm-syntax.h
|
|
|
|
path="sparc32"
|
|
|
|
mpi_extra_modules="udiv"
|
|
|
|
;;
|
1998-05-13 19:53:36 +02:00
|
|
|
mips[34]*-*-* | mips*-*-irix6*)
|
|
|
|
echo '/* configured for MIPS3 */' >>./mpi/asm-syntax.h
|
|
|
|
path="mips3"
|
|
|
|
;;
|
|
|
|
mips*-*-*)
|
|
|
|
echo '/* configured for MIPS2 */' >>./mpi/asm-syntax.h
|
|
|
|
path="mips2"
|
|
|
|
;;
|
1998-02-16 21:05:02 +01:00
|
|
|
|
|
|
|
# Motorola 68k configurations. Let m68k mean 68020-68040.
|
|
|
|
# mc68000 or mc68060 configurations need to be specified explicitly
|
|
|
|
m680[234]0*-*-linuxaout* | m68k*-*-linuxaout*)
|
|
|
|
echo '#define MIT_SYNTAX' >./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="m68k/mc68020 m68k"
|
|
|
|
;;
|
|
|
|
m68060*-*-linuxaout*)
|
|
|
|
echo '#define MIT_SYNTAX' >./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="m68k"
|
|
|
|
;;
|
|
|
|
m680[234]0*-*-linux* | m68k*-*-linux*)
|
|
|
|
echo '#define ELF_SYNTAX' >./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="m68k/mc68020 m68k"
|
|
|
|
;;
|
|
|
|
m68060*-*-linux*)
|
|
|
|
echo '#define ELF_SYNTAX' >./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="m68k"
|
|
|
|
;;
|
|
|
|
m68000*-*-* | m68060*-*-*)
|
|
|
|
echo '#define MIT_SYNTAX' >./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="m68k/mc68000"
|
|
|
|
;;
|
|
|
|
m680[234]0*-*-* | m68k*-*-*)
|
|
|
|
echo '#define MIT_SYNTAX' >./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="m68k/mc68020 m68k"
|
|
|
|
;;
|
1997-12-16 20:15:09 +01:00
|
|
|
*)
|
|
|
|
echo '/* No assembler modules configured */' >>./mpi/asm-syntax.h
|
|
|
|
path=""
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
1998-01-30 18:14:55 +01:00
|
|
|
|
1997-12-23 18:30:18 +01:00
|
|
|
case "${target}" in
|
1998-04-08 21:49:02 +02:00
|
|
|
*-*-linuxaout* | *-*-linuxoldld* | *-*-linux-gnuoldld*)
|
1997-12-23 18:30:18 +01:00
|
|
|
needs_underscore="y"
|
|
|
|
;;
|
1998-01-06 22:01:36 +01:00
|
|
|
*-*-linux* | *-sysv* | *-solaris* | *-gnu*)
|
1997-12-23 18:30:18 +01:00
|
|
|
needs_underscore="n"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
needs_underscore="y"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|
|
# Make sysdep.h
|
|
|
|
echo '/* created by config.links - do not edit */' >./mpi/sysdep.h
|
|
|
|
if test "$needs_underscore" = "y" ; then
|
|
|
|
cat <<EOF >>./mpi/sysdep.h
|
|
|
|
#if __STDC__
|
|
|
|
#define C_SYMBOL_NAME(name) _##name
|
|
|
|
#else
|
|
|
|
#define C_SYMBOL_NAME(name) _/**/name
|
|
|
|
#endif
|
|
|
|
EOF
|
|
|
|
else
|
|
|
|
cat <<EOF >>./mpi/sysdep.h
|
|
|
|
#define C_SYMBOL_NAME(name) name
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
1997-12-16 20:15:09 +01:00
|
|
|
|
|
|
|
# fixme: grep these modules from Makefile.in
|
1997-12-23 18:30:18 +01:00
|
|
|
mpi_ln_modules="${mpi_extra_modules} mpih-add1 mpih-mul1 mpih-mul2 mpih-mul3 \
|
1998-05-26 15:38:00 +02:00
|
|
|
mpih-lshift mpih-rshift mpih-sub1"
|
1997-12-16 20:15:09 +01:00
|
|
|
|
|
|
|
mpi_ln_objects=
|
|
|
|
mpi_ln_src=
|
|
|
|
mpi_ln_dst=
|
|
|
|
|
|
|
|
# try to get file to link from the assembler subdirectory and
|
|
|
|
# if this fails get it from the generic subdirectory.
|
|
|
|
path="$path generic"
|
|
|
|
for fn in $mpi_ln_modules ; do
|
|
|
|
mpi_ln_objects="$mpi_ln_objects $fn.o"
|
|
|
|
for dir in $path ; do
|
1998-01-30 18:14:55 +01:00
|
|
|
rm -f $srcdir/mpi/$fn.[Sc]
|
|
|
|
if test -f $srcdir/mpi/$dir/$fn.S ; then
|
1997-12-16 20:15:09 +01:00
|
|
|
mpi_ln_src="$mpi_ln_src mpi/$dir/$fn.S"
|
|
|
|
mpi_ln_dst="$mpi_ln_dst mpi/$fn.S"
|
|
|
|
break;
|
1998-01-30 18:14:55 +01:00
|
|
|
elif test -f $srcdir/mpi/$dir/$fn.c ; then
|
1997-12-16 20:15:09 +01:00
|
|
|
mpi_ln_src="$mpi_ln_src mpi/$dir/$fn.c"
|
|
|
|
mpi_ln_dst="$mpi_ln_dst mpi/$fn.c"
|
|
|
|
break;
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|