diff options
| author | Jakub Jelinek <jakub@redhat.com> | 2021-03-04 09:43:34 +0100 |
|---|---|---|
| committer | Jakub Jelinek <jakub@redhat.com> | 2021-03-04 09:43:34 +0100 |
| commit | f65e551f737ee3cb3a6ae45bd8168d959feacfa1 (patch) | |
| tree | 94f8161286877c7a16a3d97b991cfe9f4abb51eb /libgomp/plugin | |
| parent | d259ab15761de2d938c24abfba9cdcd2fef91655 (diff) | |
libgomp: Use sizeof(void*) based checks instead of looking through $CC $CFLAGS for -m32/-mx32
Some gcc configurations default to -m32 but support -m64 too. This patch
just makes the ILP32 tests more reliable by following what e.g. libsanitizer
configury does.
2021-03-04 Jakub Jelinek <jakub@redhat.com>
* configure.ac: Add AC_CHECK_SIZEOF([void *]).
* plugin/configfrag.ac: Check $ac_cv_sizeof_void_p value instead of
checking of -m32 or -mx32 options on the command line.
* config.h.in: Regenerated.
* configure: Regenerated.
Diffstat (limited to 'libgomp/plugin')
| -rw-r--r-- | libgomp/plugin/configfrag.ac | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libgomp/plugin/configfrag.ac b/libgomp/plugin/configfrag.ac index 88550982eab..1ab17778f0d 100644 --- a/libgomp/plugin/configfrag.ac +++ b/libgomp/plugin/configfrag.ac @@ -160,8 +160,8 @@ if test x"$enable_offload_targets" != x; then nvptx*) case "${target}" in aarch64*-*-* | powerpc64le-*-* | x86_64-*-*) - case " ${CC} ${CFLAGS} " in - *" -m32 "* | *" -mx32 "*) + case "$ac_cv_sizeof_void_p" in + 4) # PR libgomp/65099: Currently, we only support offloading in # 64-bit configurations. PLUGIN_NVPTX=0 @@ -218,8 +218,8 @@ if test x"$enable_offload_targets" != x; then amdgcn*) case "${target}" in x86_64-*-*) - case " ${CC} ${CFLAGS} " in - *" -m32 "*|*" -mx32 "*) + case "$ac_cv_sizeof_void_p" in + 4) PLUGIN_GCN=0 ;; *) |
