From 6408a706d7d3611a5fd32878463ef41aba6a5edc Mon Sep 17 00:00:00 2001 From: Peter O'Gorman Date: Mon, 21 Feb 2005 13:47:45 +0000 Subject: [PATCH] * config/ltmain.m4sh (func_extract_archives) [darwin]: This didn't actually work on a real fat archive, should do now. * tests/functests.at [darwin]: remove darwin fat tests which did not actually work. --- ChangeLog | 7 +++++++ config/ltmain.m4sh | 9 ++++----- tests/functests.at | 40 +--------------------------------------- 3 files changed, 12 insertions(+), 44 deletions(-) diff --git a/ChangeLog b/ChangeLog index 77436d2e..4ae39298 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-02-21 Peter O'Gorman + + * config/ltmain.m4sh (func_extract_archives) [darwin]: This didn't + actually work on a real fat archive, should do now. + * tests/functests.at [darwin]: remove darwin fat tests which + did not actually work. + 2005-02-07 Peter O'Gorman * config/ltmain.m4sh: Add -pthread like flags when linking diff --git a/config/ltmain.m4sh b/config/ltmain.m4sh index 847e9fba..cf66b38e 100644 --- a/config/ltmain.m4sh +++ b/config/ltmain.m4sh @@ -1056,14 +1056,13 @@ func_extract_archives () for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - # Remove the table of contents from the thin files. - $AR d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true - $AR d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true - func_extract_an_archive "unfat-$$/${darwin_base_archive}-${darwin_arch}" "${darwin_base_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP` + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do diff --git a/tests/functests.at b/tests/functests.at index e6a05228..acd6f2bc 100644 --- a/tests/functests.at +++ b/tests/functests.at @@ -31,45 +31,6 @@ SED=${SED-sed} Xsed="$SED -e s/^X//" progname=libtool mode=testing -case $host in -*darwin*) - for afile in baz foobar foobaz - do - echo "ppc $afile" > $afile.ppc.o - echo "m68k $afile" > $afile.m68k.o - echo "i386 $afile" > $afile.i386.o - lipo -create -output $afile.o -arch ppc $afile.ppc.o -arch m68k \ - $afile.m68k.o -arch i386 $afile.i386.o - rm -f $afile.*.o - ar -q libfoo.a $afile.o - rm -f $afile.o - done - for anum in 1 2 3 4 5 6 7 8 9 10 11 12 - do - echo "ppc foo $anum" > foo.ppc.o - echo "m68k foo $anum" > foo.m68k.o - echo "i386 foo $anum" > foo.i386.o - lipo -create -output foo.o -arch ppc foo.ppc.o -arch m68k foo.m68k.o \ - -arch i386 foo.i386.o - ar -q libfoo.a foo.o - rm -f foo.o foo.*.o - echo "ppc bar $anum" > bar.ppc.o - echo "m68k bar $anum" > bar.m68k.o - echo "i386 bar $anum" > bar.i386.o - lipo -create -output bar.o -arch ppc bar.ppc.o -arch m68k bar.m68k.o \ - -arch i386 bar.i386.o - ar -q libfoo.a bar.o - done - test -d .libs || mkdir .libs - func_extract_archives ".libs/libfoo" "libfoo.a" - for anum in 1 2 3 4 5 6 7 8 9 10 11 12 - do - test -f ".libs/libfoo/libfoo.a/foo-$anum.o" || exit 1 - $EGREP -v "foo-$anum" ".libs/libfoo/libfoo.a/foo-$anum.o" || exit 1 - rm -f ".libs/libfoo/libfoo.a/foo-$anum.o" - done -esac -rm -f foo.o bar.o libfoo.a for afile in baz foobar foobaz do @@ -77,6 +38,7 @@ do ar -q libfoo.a $afile.o rm -f $afile.o done + for anum in 1 2 3 4 5 6 7 8 9 10 11 12 do echo "foo $anum" > foo.o