Page 1 of 1

6.9.0-0 : Bogus -march=penryn appended to CFLAGS

Posted: 2014-12-22T02:00:58-07:00
by mi
The CFLAGS I'm specifying to configure script are:

Code: Select all

-O2 -pipe -march=core2  -I/opt/include/graphviz -I/opt/include/freetype2 -fstack-protector -fno-strict-aliasing
For some reason, after configure finishes, it reports:

Code: Select all

  CFLAGS          = -I/opt/include/lqr-1 -I/opt/include/glib-2.0 -I/opt/lib/glib-2.0/include -I/opt/include -I/opt/include/freetype2 -I/opt/include/libpng15 -O2 -pipe -march=core2 -I/opt/include/graphviz -I/opt/include/freetype2 -fstack-protector -fno-strict-aliasing -Wall -march=penryn -fexceptions -D_THREAD_SAFE -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
The penryn-processor has capabilities, that my core2 does not have -- such as SSE4.1. This causes IM to die from illegal instruction at random places (such as upon the first invocation of floor()).

The OS is FreeBSD-10.1/i386 (32-bit). Why would IM do such a thing -- append its own march-switch after the user's specification?!

Re: 6.9.0-0 : Bogus -march=penryn appended to CFLAGS

Posted: 2014-12-22T03:54:12-07:00
by dlemstra
Is this also the cause of the problem reported here: viewtopic.php?f=3&t=26745?

Re: 6.9.0-0 : Bogus -march=penryn appended to CFLAGS

Posted: 2014-12-22T04:31:32-07:00
by magick
ImageMagick utilizes a configure script generated by the automake / autoconf toolchain. You may need to make a bug report to the automake / autoconf maintainers. In the mean-time, edit Makefile and remove the -march flag from the CFLAGS define, then type rebuild, reinstall ImageMagick.

Re: 6.9.0-0 : Bogus -march=penryn appended to CFLAGS

Posted: 2014-12-22T08:11:34-07:00
by mi
Is this also the cause of the problem reported here: viewtopic.php?f=3&t=26745?
No. As I write in that thread, that problem can be seen -- by running under valgrdin --- even on a different CPU-architecture (amd64).
ImageMagick utilizes a configure script generated by the automake / autoconf toolchain. You may need to make a bug report to the automake / autoconf maintainers.
Yes, apparently, the fault lies with the ax_gcc_archflag-macro, triggered by using --with-gcc-arch argument with configure...

I'm not sure, however, the responsibility for bringing it up with the authors should be mine -- the script came (to me) with the ImageMagick bundle...