[PATCH][Revised] PR43715 - Fix --enable-plugin on darwin

Ralf Wildenhues Ralf.Wildenhues@gmx.de
Sun Apr 11 19:35:00 GMT 2010


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



More information about the Gcc-patches mailing list