[prev in list] [next in list] [prev in thread] [next in thread]
List: graphicsmagick-commit
Subject: [GM-commit] GraphicsMagick: Configure now supports clang 3.8's native OpenMP...
From: GraphicsMagick Commits <graphicsmagick-commit () lists ! sourceforge ! net>
Date: 2016-08-06 19:12:03
Message-ID: hg.00ab4ea00f50.1470510723.2950750188400161634 () src ! simplesystems ! org
[Download RAW message or body]
changeset 00ab4ea00f50 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=00ab4ea00f50
summary: Configure now supports clang 3.8's native OpenMP library.
diffstat:
ChangeLog | 9 +++++++++
NEWS.txt | 3 ++-
coders/yuv.c | 3 ++-
configure | 45 +++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 6 ++++++
www/Changelog.html | 7 +++++++
www/NEWS.html | 3 ++-
7 files changed, 73 insertions(+), 3 deletions(-)
diffs (152 lines):
diff -r cdf2288ee36c -r 00ab4ea00f50 ChangeLog
--- a/ChangeLog Sat Aug 06 09:44:01 2016 -0500
+++ b/ChangeLog Sat Aug 06 14:11:58 2016 -0500
@@ -1,5 +1,14 @@
2016-08-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * coders/yuv.c (WriteYUVImage): Fix benign clang compiler warning
+ regarding "variable 'x' is incremented both in the loop header and
+ in the loop body".
+
+ * configure.ac: Fixes to use clang's OpenMP runtime library
+ (-lomp) for clang 3.8 and later. Specifically tested with clang
+ 3.8 on Ubuntu 16.04 'xenial'. Problem was reported by Holger
+ Hoffstätte via private email.
+
* NEWS.txt: Bring up to date with latest changes.
2016-07-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
diff -r cdf2288ee36c -r 00ab4ea00f50 NEWS.txt
--- a/NEWS.txt Sat Aug 06 09:44:01 2016 -0500
+++ b/NEWS.txt Sat Aug 06 14:11:58 2016 -0500
@@ -68,7 +68,8 @@
Build Changes:
-* None
+* OpenMP is properly configured for clang 3.8 using its own '-lomp'
+ rather than '-lgomp'.
Behavior Changes:
diff -r cdf2288ee36c -r 00ab4ea00f50 coders/yuv.c
--- a/coders/yuv.c Sat Aug 06 09:44:01 2016 -0500
+++ b/coders/yuv.c Sat Aug 06 14:11:58 2016 -0500
@@ -632,7 +632,7 @@
&chroma_image->exception);
if (s == (const PixelPacket *) NULL)
break;
- for (x=0; x < (long) yuv_image->columns; x++)
+ for (x=0; x < (long) yuv_image->columns; )
{
(void) WriteBlobByte(image,ScaleQuantumToChar(s->green));
(void) WriteBlobByte(image,ScaleQuantumToChar(p->red));
@@ -642,6 +642,7 @@
p++;
s++;
x++;
+ x++;
}
if (image->previous == (Image *) NULL)
if (QuantumTick(y,image->rows))
diff -r cdf2288ee36c -r 00ab4ea00f50 configure
--- a/configure Sat Aug 06 09:44:01 2016 -0500
+++ b/configure Sat Aug 06 14:11:58 2016 -0500
@@ -23337,6 +23337,51 @@
fi
fi
+ # Clang (passes for GCC but uses different OpenMP implementation)
+ if test "x$LIB_OMP" = x ; then
+ if $CC --version 2>&1 | grep clang > /dev/null ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GOMP_parallel_start in \
-lomp" >&5 +$as_echo_n "checking for GOMP_parallel_start in -lomp... " >&6; }
+if ${ac_cv_lib_omp_GOMP_parallel_start+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lomp $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char GOMP_parallel_start ();
+int
+main ()
+{
+return GOMP_parallel_start ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_omp_GOMP_parallel_start=yes
+else
+ ac_cv_lib_omp_GOMP_parallel_start=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_omp_GOMP_parallel_start" \
>&5 +$as_echo "$ac_cv_lib_omp_GOMP_parallel_start" >&6; }
+if test "x$ac_cv_lib_omp_GOMP_parallel_start" = xyes; then :
+ LIB_OMP="-lomp"
+fi
+
+ fi
+ fi
# GCC
if test "x$LIB_OMP" = x ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GOMP_parallel_start in \
-lgomp" >&5
diff -r cdf2288ee36c -r 00ab4ea00f50 configure.ac
--- a/configure.ac Sat Aug 06 09:44:01 2016 -0500
+++ b/configure.ac Sat Aug 06 14:11:58 2016 -0500
@@ -1456,6 +1456,12 @@
AC_CHECK_LIB(openmp,omp_get_num_procs,LIB_OMP="-lopenmp",,)
fi
fi
+ # Clang (passes for GCC but uses different OpenMP implementation)
+ if test "x$LIB_OMP" = x ; then
+ if $CC --version 2>&1 | grep clang > /dev/null ; then
+ AC_CHECK_LIB(omp,GOMP_parallel_start,LIB_OMP="-lomp",,)
+ fi
+ fi
# GCC
if test "x$LIB_OMP" = x ; then
AC_CHECK_LIB(gomp,GOMP_parallel_start,LIB_OMP="-lgomp",,)
diff -r cdf2288ee36c -r 00ab4ea00f50 www/Changelog.html
--- a/www/Changelog.html Sat Aug 06 09:44:01 2016 -0500
+++ b/www/Changelog.html Sat Aug 06 14:11:58 2016 -0500
@@ -38,6 +38,13 @@
<p>2016-08-06 Bob Friesenhahn <<a class="reference external" \
href="mailto:bfriesen%40simple.dallas.tx.us">bfriesen<span> \
4;</span>simple<span>.</span>dallas<span>.</span>tx<span>.</span>us</a>></p>
<blockquote>
<ul class="simple">
+<li>coders/yuv.c (WriteYUVImage): Fix benign clang compiler warning
+regarding "variable 'x' is incremented both in the loop header and
+in the loop body".</li>
+<li>configure.ac: Fixes to use clang's OpenMP runtime library
+(-lomp) for clang 3.8 and later. Specifically tested with clang
+3.8 on Ubuntu 16.04 'xenial'. Problem was reported by Holger
+Hoffstätte via private email.</li>
<li>NEWS.txt: Bring up to date with latest changes.</li>
</ul>
</blockquote>
diff -r cdf2288ee36c -r 00ab4ea00f50 www/NEWS.html
--- a/www/NEWS.html Sat Aug 06 09:44:01 2016 -0500
+++ b/www/NEWS.html Sat Aug 06 14:11:58 2016 -0500
@@ -123,7 +123,8 @@
</ul>
<p>Build Changes:</p>
<ul class="simple">
-<li>None</li>
+<li>OpenMP is properly configured for clang 3.8 using its own '-lomp'
+rather than '-lgomp'.</li>
</ul>
<p>Behavior Changes:</p>
<ul class="simple">
------------------------------------------------------------------------------
_______________________________________________
Graphicsmagick-commit mailing list
Graphicsmagick-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic