octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mkoctfile urgently needs attention before Octave 3.6.0


From: Jordi Gutiérrez Hermoso
Subject: Re: mkoctfile urgently needs attention before Octave 3.6.0
Date: Thu, 29 Dec 2011 16:58:11 -0500

On 29 December 2011 16:34, Carlo de Falco <address@hidden> wrote:
>
> On 29 Dec 2011, at 22:30, c. wrote:
>
>>
>> On 29 Dec 2011, at 22:08, Jordi Gutiérrez Hermoso wrote:
>>
>>> I was wondering if that was it. A while ago, I tried to fix mkoctfile
>>> to pass more options to the compiler and linker correctly with -Wl and
>>> -Wa, but I ended up breaking almost all Octave-Forge packages. A
>>> suggested alternative was to simply pass any unrecognised mkoctfile
>>> options to the compiler and/or linker.
>>>
>>> I have a half-written patch back when I tried to do the latter. This
>>> isn't at all working, but it may be the right direction to take.
>>
>> I was trying a different path, i.e. let configure set BLAS_LIBS to
>> "-Wl,-framework -Wl,vecLib" which is understood by mkoctfile,
>> rather than "-framework vecLib" that isn't.
>>
>> This requires modifying configure.ac and m4/ax_blas, would that be OK?
>>
>>> - Jordi G. H.
>> c.
>
> Ooops, I forgot to attach the change I made, here it is.
> c.
>
> $ hg diff
> diff -r 88029530ffbc configure.ac
> --- a/configure.ac      Mon Dec 19 02:18:28 2011 -0500
> +++ b/configure.ac      Thu Dec 29 22:33:24 2011 +0100
> @@ -1016,7 +1016,7 @@
>  ])],
>        [mv conftest.$ac_objext blaswrap.$ac_objext
>         octave_blaswrap_save_BLAS_LIBS="$BLAS_LIBS"
> -        BLAS_LIBS="blaswrap.$ac_objext -framework vecLib"
> +        BLAS_LIBS="blaswrap.$ac_objext -Wl,-framework -Wl,vecLib"
>
>         save_FFLAGS="$FFLAGS"
>         FFLAGS="$FFLAGS $F77_INTEGER_8_FLAG"
> diff -r 88029530ffbc m4/ax_blas.m4
> --- a/m4/ax_blas.m4     Mon Dec 19 02:18:28 2011 -0500
> +++ b/m4/ax_blas.m4     Thu Dec 29 22:33:24 2011 +0100
> @@ -135,9 +135,9 @@
>
>  # BLAS in Apple vecLib library?
>  if test $ax_blas_ok = no; then
> -       save_LIBS="$LIBS"; LIBS="-framework vecLib $LIBS"
> -       AC_MSG_CHECKING([for $sgemm in -framework vecLib])
> -       AC_TRY_LINK_FUNC($sgemm, [ax_blas_ok=yes;BLAS_LIBS="-framework 
> vecLib"])
> +       save_LIBS="$LIBS"; LIBS="-Wl,-framework -Wl,vecLib $LIBS"
> +       AC_MSG_CHECKING([for $sgemm in -Wl,-framework -Wl,vecLib])
> +       AC_TRY_LINK_FUNC($sgemm, [ax_blas_ok=yes;BLAS_LIBS="-Wl,-framework 
> -Wl,vecLib"])
>        AC_MSG_RESULT($ax_blas_ok)
>        LIBS="$save_LIBS"
>  fi

I'm not so sure about this... mkoctfile's -Wl options are really kind
of broken, and I think that's where the fix should go. It's very
awkward to pass options to the compiler with current mkoctfile. For
example, -std=c++0x, my own personal peeve, is difficult to pass right
now, and you have to resort to environment variables.

- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]