Skip to content

Commit 3f22424

Browse files
committed
test for gcc4 and ban vectors
it has severe code gen problems, it seems this seems to ban clang as well, unfortunately
1 parent 31851d6 commit 3f22424

File tree

2 files changed

+37
-5
lines changed

2 files changed

+37
-5
lines changed

ChangeLog

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
29/8/17 started 8.5.9
2828
- make --fail stop jpeg read on any libjpeg warning, thanks @mceachen
29-
- don't build enumtypes so often, removing perl as a compile dependancy
29+
- don't build enumtypes so often -- helps remove perl as a compile dependency
3030

3131
2/8/17 started 8.5.8
3232
- fix transparency detection in merge, thanks Haida
@@ -540,7 +540,7 @@
540540
- vips_system() now supports many input images and you can change image
541541
argument order
542542
- support 16-bit palette TIFFs, plus palette TIFFs can have an alpha
543-
- libgsf-1 is now an optional dependancy
543+
- libgsf-1 is now an optional dependency
544544
- dzsave can directly write a ZIP file
545545
- add ".vips" as an alternative suffix for vips files
546546
- added vips_tiffload_buffer()
@@ -1204,9 +1204,9 @@
12041204
- fix gtk-doc warnings
12051205
- small mask load/save improvements
12061206
- mask gtk-doc done
1207-
- add cfitsio dependancy
1207+
- add cfitsio dependency
12081208
- add FITS reader
1209-
- land the vector branch and the orc dependancy ... we have SSE
1209+
- land the vector branch and the orc dependency ... we have SSE
12101210
erode/dilate/add/conv
12111211
- add IM_SWAP
12121212
- dilate/erode do (!=0) on non-uchar images
@@ -2059,7 +2059,7 @@
20592059
- "," allowed as column separator in mask read
20602060
- better at spotting singular matricies
20612061
- small im_render() tidies
2062-
- glib dependancy reduced to just 2.0, but untested ... helps people building
2062+
- glib dependency reduced to just 2.0, but untested ... helps people building
20632063
on older systems who aren't interested in nip2
20642064
- removing leading spaces from IMAGEVEC arguments
20652065
- load non-interlaced PNGs more efficiently

configure.ac

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,29 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
305305
ALL_LINGUAS="en_GB de"
306306
AM_GLIB_GNU_GETTEXT
307307

308+
# we need to disable some features on some known-bad gcc versions
309+
# these will be "" for clang etc.
310+
#
311+
# I couldn't get this to work, mysterious! do it ourselves
312+
#
313+
# AX_CHECK_COMPILE_FLAG([-dumpversion],
314+
# [ax_gcc_version_option=yes],
315+
# [ax_gcc_version_option=no]
316+
# )
317+
AC_MSG_CHECKING([for gcc version])
318+
GCC_VERSION=""
319+
version=$($CC -dumpversion)
320+
if test $? = 0; then
321+
GCC_VERSION=$version
322+
AC_MSG_RESULT([$GCC_VERSION])
323+
else
324+
AC_MSG_RESULT([-dumpversion not supported])
325+
fi
326+
327+
GCC_VERSION_MAJOR=$(echo $GCC_VERSION | cut -d'.' -f1)
328+
GCC_VERSION_MINOR=$(echo $GCC_VERSION | cut -d'.' -f2)
329+
GCC_VERSION_PATCH=$(echo $GCC_VERSION | cut -d'.' -f3)
330+
308331
# Checks for libraries.
309332

310333
# build list of pkg-config packages we used here
@@ -343,6 +366,15 @@ AC_TYPE_MODE_T
343366
AC_TYPE_OFF_T
344367
AC_TYPE_SIZE_T
345368

369+
# g++/gcc 4.x have rather broken vector support
370+
AC_MSG_CHECKING([for gcc with working vector support])
371+
if test x$GCC_VERSION_MAJOR != x"4"; then
372+
AC_MSG_RESULT([yes])
373+
else
374+
ax_cv_have_var_attribute_vector_size=no
375+
AC_MSG_RESULT([no])
376+
fi
377+
346378
# we need to be able to shuffle vectors in C++
347379
if test x$ax_cv_have_var_attribute_vector_size = x"yes"; then
348380
AC_MSG_CHECKING([for C++ vector shuffle])

0 commit comments

Comments
 (0)