Re: git: b88ca6ee167d - main - cdefs: Remove CC_SUPPORTS macros, they are unused
- In reply to: John Baldwin : "Re: git: b88ca6ee167d - main - cdefs: Remove CC_SUPPORTS macros, they are unused"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Nov 2023 18:12:19 UTC
On Mon, Nov 27, 2023 at 10:50 AM John Baldwin <jhb@freebsd.org> wrote: > On 11/26/23 9:25 PM, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=b88ca6ee167d079c965dfe123bbe296d3a945c0a > > > > commit b88ca6ee167d079c965dfe123bbe296d3a945c0a > > Author: Warner Losh <imp@FreeBSD.org> > > AuthorDate: 2023-11-20 22:40:55 +0000 > > Commit: Warner Losh <imp@FreeBSD.org> > > CommitDate: 2023-11-27 05:24:02 +0000 > > > > cdefs: Remove CC_SUPPORTS macros, they are unused > > > > Remove __CC_SUPPORTS_INLINE, __CC_SUPPORTS___INLINE__, > > __CC_SUPPORTS___FUNC__, __CC_SUPPORTS_WARNING, > > __CC_SUPPORTS_VARADIC_XXX, __CC_SUPPORTS_DYNAMIC_ARRAY_INIT: they > are > > unused. Also remove them from the generated cryptodevh.py script. > > > > Retain, for the moment, __CC_SUPPORTS___INLINE, since it's used in > this > > file. > > > > PR: 275221 (exp-run) > > Sponsored by: Netflix > > --- > > sys/sys/cdefs.h | 10 ---------- > > tests/sys/opencrypto/cryptodevh.py | 7 ------- > > 2 files changed, 17 deletions(-) > > > > diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > > index 5782735187c5..7f3efc9300c9 100644 > > --- a/sys/sys/cdefs.h > > +++ b/sys/sys/cdefs.h > > @@ -79,17 +79,7 @@ > > */ > > #define __compiler_membar() __asm __volatile(" " : : : > "memory") > > > > -/* XXX: if __GNUC__ >= 2: not tested everywhere originally, where > replaced */ > > -#define __CC_SUPPORTS_INLINE 1 > > #define __CC_SUPPORTS___INLINE 1 > > -#define __CC_SUPPORTS___INLINE__ 1 > > - > > -#define __CC_SUPPORTS___FUNC__ 1 > > -#define __CC_SUPPORTS_WARNING 1 > > - > > -#define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */ > > - > > -#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1 > > > > #endif /* __GNUC__ */ > > > > diff --git a/tests/sys/opencrypto/cryptodevh.py > b/tests/sys/opencrypto/cryptodevh.py > > index d6982c26f1cf..9607bcd4d115 100644 > > --- a/tests/sys/opencrypto/cryptodevh.py > > +++ b/tests/sys/opencrypto/cryptodevh.py > > @@ -23,13 +23,6 @@ def __has_include(x): return 0 > > > > def __has_builtin(x): return 0 > > > > -__CC_SUPPORTS_INLINE = 1 > > -__CC_SUPPORTS___INLINE = 1 > > -__CC_SUPPORTS___INLINE__ = 1 > > -__CC_SUPPORTS___FUNC__ = 1 > > -__CC_SUPPORTS_WARNING = 1 > > -__CC_SUPPORTS_VARADIC_XXX = 1 > > -__CC_SUPPORTS_DYNAMIC_ARRAY_INIT = 1 > > def __P(protos): return protos > > > > def __STRING(x): return #x > > It doesn't really matter, but you accidentally removed > __CC_SUPPORTS___INLINE from > the python version but not cdefs.h. I wonder how hard it would be to just > regenerate > cryptodevh.py rather than updating it manually as I'm sure it is missing > some other > updates. > Yea, I'm not at all sure how it was generated in the first place. And I removed it there when I removed it in cdefs.h, but then I failed to add it back when I concluded that I had to add it back to cdefs.h.... I think I have plans to remove it in 2024q1 cdefs.h cleaning where I'll go farther: kill K&R support macros we have in there (so one couldn't use a pure K&R compiler on FreeBSD with the system headers... though doing that is already impossible because of all the prototypes). I also plan on eliminating all support for gcc prior to 4.2. There's only one port in the tree that uses an older gcc (2.8 for hp48x cross compiler) and it's i386 only. And I've not installed it to see if it uses the system headers or not (if it doesn't, then my changes won't affect it at all). I also have tcc (aka tinyc) working after a fashion (I've fixed the compile issues we have with it) just to make sure my future cleanups don't break other compilers (though this is the only other one I know works and uses system headers). Warner