Skip to content

Commit dcbd749

Browse files
Merge pull request #274 from insertinterestingnamehere/drop_compilers
Drop Support for Old/Broken Compilers
2 parents 97a32f0 + 5485c0b commit dcbd749

13 files changed

+11
-451
lines changed

README.md

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -134,38 +134,4 @@ For example, `Collect<mt_loop_traits::Add>` is rougly equivalent to the followin
134134
retval += function(args);
135135
}
136136
```
137-
******************************************************
138-
139-
##NOTE FOR PGI USERS
140-
pgcc needs the `-c9x` flag in order to correctly process variadic macros (which
141-
are used in qthread.c) and the PRIuMAX format definitions (used in `qalloc.c`).
142-
Use the CFLAGS variable to add this flag. Note that pgcc's support for the full
143-
C90/C99 standards is lousy, so most C90/C99 features that COULD be used are
144-
avoided.
145-
146-
******************************************************
147-
148-
##NOTE FOR IBM XL USERS
149-
make check will probably fail with the error:
150-
151-
`xlc++: 1501-210 command option t contains an incorrect subargument`
152-
`.../.libs/libqthread.so: could not read symbols: Invalid operation`
153-
154-
This does not mean that the library did not compile correctly, but instead
155-
means that your libtool is probably broken (most are). The problem seems to be
156-
that the wrapper script (testloop) is created with incorrect arguments to
157-
xlc++. The other wrapper scripts (e.g. test1/test2/test3/testq) all have the
158-
correct arguments, and if you modify testloop so that $relink_command uses the
159-
`-Wl,--rpath -Wl,directory` syntax rather than the `-rpath,directory` syntax,
160-
it would work just fine.
161-
162-
*******************************************************
163-
164-
## NOTE FOR IBM BLUEGENE/P GCC USERS
165-
Old versions of GCC do not handle builtin atomics correctly on this platform.
166-
The non-existence of `__sync_fetch_and_add()` cannot be reliably detected, so to
167-
use those compilers, you probably need to configure with
168-
`--disable-internal-spinlock`.
169-
170-
*******************************************************
171137

config/ax_c_restrict.m4

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@
6868
# the same family, and in the presence of varying compiler options. If only
6969
# plain "restrict" works, do nothing. Here are some variants:
7070
# - GCC supports both __restrict and __restrict__
71-
# - older DEC Alpha C compilers support only __restrict
72-
# - _Restrict is the only spelling accepted by Sun WorkShop 6 update 2 C
7371
# Otherwise, define "restrict" to be empty.
7472
AN_IDENTIFIER([restrict], [AX_C_RESTRICT])
7573
AC_DEFUN([AX_C_RESTRICT],
@@ -95,15 +93,7 @@ AC_DEFUN([AX_C_RESTRICT],
9593
nothing if this is not supported. Do not define if restrict is
9694
supported directly. */
9795
#undef restrict
98-
/* Work around a bug in Sun C++: it does not support _Restrict or
99-
__restrict__, even though the corresponding Sun C compiler ends up with
100-
"#define restrict _Restrict" or "#define restrict __restrict__" in the
101-
previous line. Perhaps some future version of Sun C++ will work with
102-
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
103-
#if defined __SUNPRO_CC && !defined __RESTRICT
104-
# define _Restrict
105-
# define __restrict__
106-
#endif])
96+
])
10797
case $ac_cv_c_restrict in
10898
restrict) ;;
10999
no) AC_DEFINE([restrict], []) ;;

config/ax_openmp.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
7272
7373
AC_CACHE_CHECK([for OpenMP flag of _AC_LANG compiler], ax_cv_[]_AC_LANG_ABBREV[]_openmp, [save[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
7474
ax_cv_[]_AC_LANG_ABBREV[]_openmp=unknown
75-
# Flags to try: -fopenmp (gcc), -openmp (icc), -mp (SGI & PGI),
76-
# -xopenmp (Sun), -omp (Tru64), -qsmp=omp (AIX), none
77-
ax_openmp_flags="-fopenmp -openmp -mp -xopenmp -omp -qsmp=omp none"
75+
# Flags to try: -fopenmp (gcc), -openmp (icc), -mp (SGI),
76+
# -omp (Tru64), -qsmp=omp (AIX), none
77+
ax_openmp_flags="-fopenmp -openmp -mp -omp -qsmp=omp none"
7878
if test "x$OPENMP_[]_AC_LANG_PREFIX[]FLAGS" != x; then
7979
ax_openmp_flags="$OPENMP_[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flags"
8080
fi

config/qthread_check_assembly.m4

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -78,68 +78,6 @@ rm -rf conftest*
7878
unset qthread_assemble
7979
])dnl
8080

81-
82-
dnl #################################################################
83-
dnl
84-
dnl QTHREAD_CHECK_INLINE_GCC
85-
dnl
86-
dnl Check if the compiler is capable of doing GCC-style inline
87-
dnl assembly. Some compilers emit a warning and ignore the inline
88-
dnl assembly (xlc on OS X) and compile without error. Therefore,
89-
dnl the test attempts to run the emited code to check that the
90-
dnl assembly is actually run. To run this test, one argument to
91-
dnl the macro must be an assembly instruction in gcc format to move
92-
dnl the value 0 into the register containing the variable ret.
93-
dnl For PowerPC, this would be:
94-
dnl
95-
dnl "li %0,0" : "=&r"(ret)
96-
dnl
97-
dnl DEFINE QTHREAD_GCC_INLINE_ASSEMBLY to 0 or 1 depending on GCC
98-
dnl support
99-
dnl
100-
dnl #################################################################
101-
AC_DEFUN([QTHREAD_CHECK_INLINE_C_GCC],[
102-
AC_CACHE_CHECK([support for __asm__ __volatile__],
103-
[qt_cv_asm_volatile],
104-
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[__asm__ __volatile__ ("":::"memory");]])],
105-
[qt_cv_asm_volatile=yes],
106-
[qt_cv_asm_volatile=no])])
107-
AC_CACHE_CHECK([$CC support for GCC inline assembly],[qt_cv_gcc_inline_assembly],[
108-
assembly="$1"
109-
asm_result="unknown"
110-
AS_IF([test ! "$assembly" = ""],
111-
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
112-
int main(void) {
113-
int ret = 1;
114-
__asm__ __volatile__ ($assembly);
115-
return ret;
116-
}]])],
117-
[asm_result="yes"], [asm_result="no"],
118-
[asm_result="unknown"])],
119-
[assembly="test skipped - assuming no"])
120-
121-
# if we're cross compiling, just try to compile and figure good enough
122-
AS_IF([test "$asm_result" = "unknown"],
123-
[AC_LINK_IFELSE([AC_LANG_SOURCE([[
124-
int main(void)
125-
{
126-
int ret = 1;
127-
__asm__ __volatile__ ($assembly);
128-
return ret;
129-
}]])],
130-
[asm_result="yes"], [asm_result="no"])
131-
])
132-
qt_cv_gcc_inline_assembly="$asm_result"
133-
unset assembly asm_result])
134-
135-
136-
AS_IF([test "x$qt_cv_gcc_inline_assembly" = "xyes"],
137-
[AC_DEFINE([HAVE_GCC_INLINE_ASSEMBLY], [1],
138-
[Whether C compiler supports GCC style inline assembly])
139-
$2], [$3])
140-
])dnl
141-
142-
14381
AC_DEFUN([QTHREAD_CHECK_ASSEMBLY],[
14482
AC_REQUIRE([AM_PROG_AS])
14583
AC_CHECK_SIZEOF([long])
@@ -190,9 +128,6 @@ AC_DEFUN([QTHREAD_CHECK_ASSEMBLY],[
190128
191129
esac
192130
193-
# now that we know our architecture, try to inline assemble
194-
QTHREAD_CHECK_INLINE_C_GCC([$qthread_gcc_inline_assign], [$1], [$2])
195-
196131
AC_MSG_CHECKING([for asssembly architecture])
197132
AC_MSG_RESULT([$qthread_cv_asm_arch])
198133
result="QTHREAD_$qthread_cv_asm_arch"

config/qthread_check_atomics.m4

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ AC_REQUIRE([QTHREAD_DETECT_COMPILER_TYPE])
1010
AC_ARG_ENABLE([builtin-atomics],
1111
[AS_HELP_STRING([--disable-builtin-atomics],
1212
[force the use of inline-assembly (if possible) rather than compiler-builtins for atomics. This is useful for working around some compiler bugs; normally, it's preferable to use compiler builtins.])])
13-
AS_IF([test "x$enable_builtin_atomics" != xno],
14-
[AS_IF([test "x$qthread_cv_c_compiler_type" = xIBM_XL -o "x$qthread_cv_cxx_compiler_type" = xIBM_XL],
15-
[AS_IF([test "x$enable_builtin_atomics" = xyes],
16-
[AC_MSG_WARN([Disabling builtin atomics on IBM_XL, due to compiler design decision])])
17-
enable_builtin_atomics=no])])
1813
AC_CACHE_CHECK([whether compiler supports builtin atomic CAS-32],
1914
[qthread_cv_atomic_CAS32],
2015
[AC_LINK_IFELSE([AC_LANG_SOURCE([[

config/qthread_check_attributes.m4

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,12 @@ AC_DEFUN([QTHREAD_BUILTIN_PREFETCH],[dnl
100100
AC_CACHE_CHECK(
101101
[support for __builtin_prefetch],
102102
[qt_cv_builtin_prefetch],
103-
[AS_IF([test "$qthread_cv_c_compiler_type" == PortlandGroup],
104-
[qt_cv_builtin_prefetch=no],
105-
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
103+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
106104
int x;]],[[
107105
__builtin_prefetch(&x, 0, 0);
108106
return malloc(x)?1:0;]])],
109107
[qt_cv_builtin_prefetch=yes],
110-
[qt_cv_builtin_prefetch=no])])])
108+
[qt_cv_builtin_prefetch=no])])
111109
AS_IF([test "x$qt_cv_builtin_prefetch" = xyes],
112110
[AC_DEFINE([HAS_BUILTIN_PREFETCH], [1], [define if compiler supports __builtin_prefetch])
113111
$1], [$2])

0 commit comments

Comments
 (0)