[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: OpenMandriva
From: |
Bruno Haible |
Subject: |
Re: OpenMandriva |
Date: |
Mon, 26 Aug 2024 21:39:39 +0200 |
Sam James wrote:
> OpenMandriva Lx is what you want:
> *
> https://github.com/OpenMandrivaAssociation/llvm/blob/master/clang-default-newer-gnuc-version.patch
OK. Here's what I found regarding this distro:
1) The web site makes it hard to download the OS. See:
- Go to https://www.openmandriva.org/
- Click the "Download" button.
- Now you are in a maze of twisty little hyperlinks that will not allow you
to download anything:
https://www.openmandriva.org/ -> Download -> ROCK
-> https://www.openmandriva.org/info-rock -> OMLx 5.0 Plasma slim x86_64
-> https://abf.openmandriva.org/platforms/5.0/products/149
->
https://abf.openmandriva.org/platforms/5.0/products/149/product_build_lists/2956
->
http://file-store.openmandriva.org/api/v1/file_stores/6b2dfea3589b2af05c6c9f772cbedabf0f01ecb9
-> Internal Server Error
https://www.openmandriva.org/ -> Download -> ROME
-> https://www.openmandriva.org/info-rome -> ROME Plasma5 slim x86_64
https://abf.openmandriva.org/platforms/rolling/products/23
->
https://abf.openmandriva.org/platforms/rolling/products/23/product_build_lists/836
Dead end.
2) The installer works fine (in a VirtualBox VM).
3) Changing the screen size has no persistent effect after reboot. See:
- Change it to 1024x768.
- Reboot.
- Now the screen size is again 800x600.
4) The bash / readline behaviour is broken: Upon pressing tab, it does not
show the partial completion before asking "Display all NNN possibilities?"
5) Although this distro purports to have a focus on internationalization,
the glibc's iconv converters are mostly not installed by default, leading
to 61 test suite failures (see attached log). One has to install the package
'locales-extra-charsets'.
6) A testdir, that compiles fine with gcc, produces many errors with clang,
such as:
./stdlib.h:892:40: error: '__malloc__' attribute takes no arguments
892 | _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
| ^
./time.h:1122:1: error: 'warning' attribute does not appear on the first
declaration
1122 | _GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some
cases - "
| ^
There are also errors in C++ mode, such as:
error: 'wmemchr' is missing exception specification 'noexcept(true)'
The patch below fixes the compilation errors.
2024-08-26 Bruno Haible <bruno@clisp.org>
Fix compilation errors with clang that masquerades as gcc 13.
Reported by Sam James and Paul Eggert.
* m4/gnulib-common.m4 (gl_COMMON_BODY): For _GL_GNUC_PREREQ, ignore the
values of __GNUC__ and __GNUC_MINOR__ defined by clang.
* lib/warn-on-use.h (_GL_WARN_ON_USE, _GL_WARN_ON_USE_CXX): Don't treat
clang like GCC.
* lib/wchar.in.h (wmemchr, wcschr, wcsrchr, wcspbrk, wcsstr): Disable
the _GL_CXXALIASWARN1 and _GL_CXXALIASWARN invocations for masquerading
clang++.
diff --git a/lib/warn-on-use.h b/lib/warn-on-use.h
index 701013a07f..e3b1fefe50 100644
--- a/lib/warn-on-use.h
+++ b/lib/warn-on-use.h
@@ -85,7 +85,7 @@
*/
#ifndef _GL_WARN_ON_USE
-# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+# if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined
__clang__
/* A compiler attribute is available in gcc versions 4.3.0 and later. */
# define _GL_WARN_ON_USE(function, message) \
_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__
(message)))
@@ -121,7 +121,7 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use
# define
_GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg)
\
_GL_WARN_ON_USE (function, msg)
# else
-# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+# if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined
__clang__
/* A compiler attribute is available in gcc versions 4.3.0 and later. */
# define
_GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg)
\
extern rettype_gcc function parameters_and_attributes \
diff --git a/lib/wchar.in.h b/lib/wchar.in.h
index c08cf7299e..785e74787e 100644
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -855,11 +855,12 @@ _GL_CXXALIAS_SYS_CAST2 (wmemchr,
wchar_t *, (const wchar_t *, wchar_t, size_t),
const wchar_t *, (const wchar_t *, wchar_t, size_t));
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) \
+ && !defined __clang__
_GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
_GL_CXXALIASWARN1 (wmemchr, const wchar_t *,
(const wchar_t *s, wchar_t c, size_t n));
-# elif __GLIBC__ >= 2
+# elif __GLIBC__ >= 2 && !defined __CORRECT_ISO_CPP_WCHAR_H_PROTO
_GL_CXXALIASWARN (wmemchr);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -1407,10 +1408,11 @@ _GL_CXXALIAS_SYS_CAST2 (wcschr,
wchar_t *, (const wchar_t *, wchar_t),
const wchar_t *, (const wchar_t *, wchar_t));
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) \
+ && !defined __clang__
_GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc));
_GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
-# elif __GLIBC__ >= 2
+# elif __GLIBC__ >= 2 && !defined __CORRECT_ISO_CPP_WCHAR_H_PROTO
_GL_CXXALIASWARN (wcschr);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -1437,10 +1439,11 @@ _GL_CXXALIAS_SYS_CAST2 (wcsrchr,
wchar_t *, (const wchar_t *, wchar_t),
const wchar_t *, (const wchar_t *, wchar_t));
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) \
+ && !defined __clang__
_GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc));
_GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
-# elif __GLIBC__ >= 2
+# elif __GLIBC__ >= 2 && !defined __CORRECT_ISO_CPP_WCHAR_H_PROTO
_GL_CXXALIASWARN (wcsrchr);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -1508,12 +1511,13 @@ _GL_CXXALIAS_SYS_CAST2 (wcspbrk,
wchar_t *, (const wchar_t *, const wchar_t *),
const wchar_t *, (const wchar_t *, const wchar_t *));
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) \
+ && !defined __clang__
_GL_CXXALIASWARN1 (wcspbrk, wchar_t *,
(wchar_t *wcs, const wchar_t *accept));
_GL_CXXALIASWARN1 (wcspbrk, const wchar_t *,
(const wchar_t *wcs, const wchar_t *accept));
-# elif __GLIBC__ >= 2
+# elif __GLIBC__ >= 2 && !defined __CORRECT_ISO_CPP_WCHAR_H_PROTO
_GL_CXXALIASWARN (wcspbrk);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -1558,14 +1562,15 @@ _GL_CXXALIAS_SYS_CAST2 (wcsstr,
(const wchar_t *restrict, const wchar_t *restrict));
# endif
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
- && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) \
+ && !defined __clang__
_GL_CXXALIASWARN1 (wcsstr, wchar_t *,
(wchar_t *restrict haystack,
const wchar_t *restrict needle));
_GL_CXXALIASWARN1 (wcsstr, const wchar_t *,
(const wchar_t *restrict haystack,
const wchar_t *restrict needle));
-# elif __GLIBC__ >= 2
+# elif __GLIBC__ >= 2 && !defined __CORRECT_ISO_CPP_WCHAR_H_PROTO
_GL_CXXALIASWARN (wcsstr);
# endif
#elif defined GNULIB_POSIXCHECK
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index b1b3758db8..0f0eb07c44 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
# gnulib-common.m4
-# serial 101
+# serial 102
dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -21,10 +21,22 @@ AC_DEFUN([gl_COMMON_BODY]
#define _GL_CONFIG_H_INCLUDED 1
])
AH_VERBATIM([_GL_GNUC_PREREQ],
-[/* True if the compiler says it groks GNU C version MAJOR.MINOR. */
-#if defined __GNUC__ && defined __GNUC_MINOR__
+[/* True if the compiler says it groks GNU C version MAJOR.MINOR.
+ Except that
+ - clang groks GNU C 4.2, even on Windows, where it does not define
+ __GNUC__.
+ - The OpenMandriva-modified clang compiler pretends that it groks
+ GNU C version 13.1, but it doesn't: It does not support
+ __attribute__ ((__malloc__ (f, i))), nor does it support
+ __attribute__ ((__warning__ (message))) on a function redeclaration.
+ - Users can make clang lie as well, through the -fgnuc-version option.
*/
+#if defined __GNUC__ && defined __GNUC_MINOR__ && !defined __clang__
# define _GL_GNUC_PREREQ(major, minor) \
((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__))
+#elif defined __clang__
+ /* clang really only groks GNU C 4.2. */
+# define _GL_GNUC_PREREQ(major, minor) \
+ ((major) < 4 + ((minor) <= 2))
#else
# define _GL_GNUC_PREREQ(major, minor) 0
#endif
openmandriva-gcc-test-suite.log
Description: Text Data
- [PATCH] diffseq: port to clang 18.1.6 in ‘patch’, Paul Eggert, 2024/08/24
- Re: [PATCH] diffseq: port to clang 18.1.6 in ‘patch’, Bruno Haible, 2024/08/24
- Re: [PATCH] diffseq: port to clang 18.1.6 in ‘patch’, Paul Eggert, 2024/08/25
- Re: [PATCH] diffseq: port to clang 18.1.6 in ‘patch’, Sam James, 2024/08/26
- Re: [PATCH] diffseq: port to clang 18.1.6 in ‘patch’, Bruno Haible, 2024/08/26
- Re: [PATCH] diffseq: port to clang 18.1.6 in ‘patch’, Bruno Haible, 2024/08/26
- Re: [PATCH] diffseq: port to clang 18.1.6 in ‘patch’, Sam James, 2024/08/26
- Re: OpenMandriva,
Bruno Haible <=
- Re: OpenMandriva, Collin Funk, 2024/08/26
- Re: OpenMandriva, Bruno Haible, 2024/08/26
- Re: OpenMandriva, Bruno Haible, 2024/08/26
- Re: OpenMandriva, Bruno Haible, 2024/08/27
- Re: OpenMandriva, Sam James, 2024/08/27
- Re: [PATCH] diffseq: port to clang 18.1.6 in ‘patch’, Paul Eggert, 2024/08/26