diff options
author | Christopher Wellons <wellons@nullprogram.com> | 2024-09-20 16:08:39 -0400 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-09-21 10:01:09 +0000 |
commit | 674bcfad99b6b486204f4a97beb6e3571034a05e (patch) | |
tree | 2e03526b174e74979b9ec4a867e6e2bd41f47c90 | |
parent | d1dbec40901f3e3a998be15354c3a9fbeb93d7bf (diff) | |
download | busybox-w32-674bcfad99b6b486204f4a97beb6e3571034a05e.tar.gz busybox-w32-674bcfad99b6b486204f4a97beb6e3571034a05e.tar.bz2 busybox-w32-674bcfad99b6b486204f4a97beb6e3571034a05e.zip |
Use builtin ffs also with GCC
With CONFIG_DEBUG_PESSIMIZE=y (-O0) the ffs intrinsic is left as a
function call, resulting in a linker error. The prefixed builtin is
generally part of the "GNU C" dialect and is usable in any "GNU C"
implementation, i.e. any compiler that defines __GNUC__. That includes
Clang, GCC, and more.
-rw-r--r-- | include/mingw.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h index 65940b40b..5a3c75ff6 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -248,7 +248,7 @@ int strverscmp(const char *s1, const char *s2); | |||
248 | /* | 248 | /* |
249 | * strings.h | 249 | * strings.h |
250 | */ | 250 | */ |
251 | #if !defined(__clang__) | 251 | #if !defined(__GNUC__) |
252 | int ffs(int i); | 252 | int ffs(int i); |
253 | #else | 253 | #else |
254 | # define ffs(i) __builtin_ffs(i) | 254 | # define ffs(i) __builtin_ffs(i) |