This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]