[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Use darwin's -force_load flag if available for whole_archive
From: |
Ralf Wildenhues |
Subject: |
Re: [PATCH] Use darwin's -force_load flag if available for whole_archive_flag_spec |
Date: |
Sun, 6 Sep 2009 19:29:48 +0200 |
User-agent: |
Mutt/1.5.20 (2009-08-09) |
Hi Peter,
* Peter O'Gorman wrote on Sun, Sep 06, 2009 at 05:28:52PM CEST:
> Well, Mac OS X 10.6 has been released, and its linker now has support
> for an option similar to --whole-archive. -force_load libfoo.a will load
> all members of libfoo.a into the output. -force_load <lib> can be given
> multiple times on the command line.
>
> This patch (and a test case that checks that gdb can find the debugging
> symbols) makes libtool use this new option.
I think this is ok, with nits below addressed. Did you run the
testsuite with it, esp. the tests in convenience.at?
Any reason to go with a compile test rather than a simple system version
test?
Thanks!
Ralf
> 2009-09-06 Peter O'Gorman <address@hidden>
>
> Use darwin's -force_load flag if available for whole_archive_flag_spec
> * libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Check for
> -force_load and use it if there.
> * tests/darwin.at: Add a simple test.
> --- a/tests/darwin.at
> +++ b/tests/darwin.at
> @@ -148,3 +148,56 @@ AT_CHECK([$LIBTOOL --dry-run --mode=link $CC $CFLAGS
> $LDFLAGS ]dnl
> AT_CHECK([grep stamp $lockfile], [], [ignore])
>
> AT_CLEANUP
> +
> +AT_SETUP([darwin gdb debug information])
There is nothing Darwin-specific in this particular test (which is
good!), besides maybe this part:
> +AT_XFAIL_IF([
> +case `$LIBTOOL --config | grep whole_archive_flag_spec=` in
> +*-force_load*) false ;;
> +*) : ;;
> +esac ])
> +
> +# Remove any dSYM bundle
> +rm -rf .libs/*.dSYM
The XFAIL should be limited to darwin systems only; I get an XPASS for
this on GNU/Linux x86. For a truly portable test you should probably
skip if 'gdb --version' doesn't work as expected (e.g., gdb isn't
installed), though.
> +AT_CHECK([echo quit | $LIBTOOL --mode=execute gdb main 2>err2],
> + [ignore], [ignore], [ignore])
Please do not redirect 2> here, but instead put 'stderr' in the fourth
argument, instead of 'ignore'. Then you can grep the 'stderr' file in
the next check:
> +AT_CHECK([grep 'Could not find object file' err2],[1],[ignore],[ignore])
There was another instance of this issue earlier in the test.