This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][Revised] PR43715 - Fix --enable-plugin on darwin
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, mikestump at comcast dot net, iains at gcc dot gnu dot org, peter at pogma dot com
- Date: Sun, 11 Apr 2010 21:34:47 +0200
- Subject: Re: [PATCH][Revised] PR43715 - Fix --enable-plugin on darwin
- References: <20100411190235.GA9996@bromo.med.uc.edu>
Hello Jack,
I think such a patch needs to be tested on a non-darwin system as well.
* Jack Howarth wrote on Sun, Apr 11, 2010 at 09:02:35PM CEST:
> --- gcc/configure.ac (revision 158199)
> +++ gcc/configure.ac (working copy)
> @@ -4381,15 +4381,20 @@
> pluginlibs=
> if test x"$enable_plugin" = x"yes"; then
>
> + if [ test -z $gcc_cv_objdump]; then
Double-quotes around $gcc_cv_objdump and white spaces before ] needed
here.
> + export_sym_check="$gcc_cv_nm -g | grep T"
This means you need to eval "$export_sym_check" when you use it,
the shell does variable expansion after parsing command pipelines ...
> + else
> + export_sym_check="$gcc_cv_objdump -T"
> + fi
> AC_MSG_CHECKING([for exported symbols])
> echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
> ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
> - if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then
> + if $export_sym_check conftest | grep foobar > /dev/null; then
... here ...
> : # No need to use a flag
> else
> AC_MSG_CHECKING([for -rdynamic])
> ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1
> - if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then
> + if $export_sym_check conftest | grep foobar > /dev/null; then
... and here.
> pluginlibs="-rdynamic"
> else
> enable_plugin=no
Cheers,
Ralf