X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2Fgmp%2Fconfigure;h=82946804862778db71401e6483e424f231f5adc4;hb=b6d70ef77033fd09f7bfb9c020fd9e40b3dbac29;hp=0142caf736f53a38b22a20a27e6c75a55d0c0e96;hpb=8cd0553fbfa995657b3a570766749d4ec4fce3a3;p=ghc-hetmet.git diff --git a/ghc/rts/gmp/configure b/ghc/rts/gmp/configure index 0142caf..8294680 100644 --- a/ghc/rts/gmp/configure +++ b/ghc/rts/gmp/configure @@ -1295,6 +1295,9 @@ case "$target" in #define _LONG_LONG_LIMB 1 EOF ;; + powerpc-apple-darwin* | powerpc-apple-macosx*) + gmp_cflags_gcc="$gmp_cflags_gcc -mpowerpc -traditional-cpp" + ;; powerpc*-*-*) gmp_cflags_gcc="$gmp_cflags_gcc -mpowerpc" ;; @@ -3091,7 +3094,7 @@ if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ECHO_N "checking for ld used by GCC... $ECHO_C" 1>&6 echo "configure:3090: checking for ld used by GCC" 1>&5 - case $lt_target in + case $target in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; @@ -4357,7 +4360,7 @@ case "$target" in ;; power*-*-*) case "$target" in - *-*-mach* | *-*-rhapsody* | *-*-nextstep*) + *-*-mach* | *-*-rhapsody* | *-*-nextstep* | *-*-darwin* | *-*-macosx*) ;; # these use non-conventional assembly syntax. powerpc64-*-aix*) gmp_m4postinc="powerpc32/regmap.m4 powerpc64/aix.m4" @@ -4426,8 +4429,23 @@ gmp_mpn_functions="${extra_functions} inlines add_n sub_n mul_1 addmul_1 \ mpn_objects= mpn_objs_in_libgmp="mpn/mp_bases.lo" +# SLPJ trace +echo "Peering at file structure (takes a while)..." 1>&6 + for tmp_fn in ${gmp_mpn_functions} ; do - rm -f mpn/${tmp_fn}.[Ssc] mpn/${tmp_fn}.asm +# SLPJ trace + echo "...$tmp_fn..." 1>&6 + +# This line was +# rm -f mpn/${tmp_fn}.[Ssc] mpn/${tmp_fn}.asm +# but I found that on my NT workstation the command +# would unpredictably hang. rm wasn't an active process, +# but absolutlely nothing was happening. +# I *think* that expanding the [Ssc] cures the problem +# SLPJ May 01 + rm -f mpn/${tmp_fn}.S mpn/${tmp_fn}.s mpn/${tmp_fn}.c mpn/${tmp_fn}.asm + + echo "...$tmp_fn (done rm)..." 1>&6 # functions that can be provided by multi-function files tmp_mulfunc= @@ -4441,9 +4459,22 @@ for tmp_fn in ${gmp_mpn_functions} ; do found=no for tmp_dir in $path; do + +# SLPJ trace +# We get stuck sometimes + echo " ...dir $tmp_dir..." 1>&6 for tmp_base in $tmp_fn $tmp_mulfunc; do + +# SLPJ trace +# We get stuck sometimes + echo " ...base $tmp_base..." 1>&6 for tmp_ext in asm S s c; do tmp_file=$srcdir/mpn/$tmp_dir/$tmp_base.$tmp_ext + +# SLPJ trace +# We get stuck sometimes + echo " ...$tmp_file..." 1>&6 + if test -f $tmp_file; then found=yes @@ -4484,7 +4515,12 @@ EOF fi done + # Create link for gmp-mparam.h. + +# SLPJ trace +echo "Creating link for gmp-mparam.h..." 1>&6 + for tmp_dir in $path ; do rm -f gmp-mparam.h if test -f $srcdir/mpn/${tmp_dir}/gmp-mparam.h ; then @@ -4503,6 +4539,9 @@ echo "define(,<$tmp_gmp_karatsuba_sqr_threshold>)" >> $ fi done +# SLPJ trace +echo "Digging out links to include in DISTCLEANFILES..." 1>&6 + # Dig out the links from `gmp_links' for inclusion in DISTCLEANFILES. gmp_srclinks= for f in $gmp_links; do @@ -5109,7 +5148,7 @@ for ac_file in : $CONFIG_LINKS; do if test "x$ac_file" != x:; then ac_dest=`echo "$ac_file" | sed 's%:.*%%'` ac_source=`echo "$ac_file" | sed 's%[^:]*:%%'` - echo "linking $srcdir/$ac_source to $ac_dest" + echo "copying $srcdir/$ac_source to $ac_dest" if test ! -r $srcdir/$ac_source; then { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } @@ -5134,11 +5173,20 @@ for ac_file in : $CONFIG_LINKS; do if test "x$ac_file" != x:; then *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; esac + # Note: Dodgy local mods to 'make things work' in an environment (cygwin) + # that supports symlinks (through silly hack) using tools that don't + # understand them (mingw). The end sometimes justifies the means, son. + # # Make a symlink if possible; otherwise try a hard link. - if ln -s $ac_rel_source $ac_dest 2>/dev/null || - ln $srcdir/$ac_source $ac_dest; then : + #if ln -s $ac_rel_source $ac_dest 2>/dev/null || + # ln $srcdir/$ac_source $ac_dest; then : + # + # Note: If the -p offends your 'cp', just drop it; no harm done, you'll just + # get more recompilations. + # + if cp -p $srcdir/$ac_source $ac_dest; then : else - { echo "configure: error: cannot link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } + { echo "configure: error: cannot copy $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } fi fi; done EOF