Skip to contentSkip to conversation

configure: Drop obsolete check for the alloc_size attribute

PATCH Applied Thomas Huth 3 participants 3 messages Jul 14, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Drop obsolete check for the alloc_size attribute

We recently bumped our requirement for Clang to at least version 6.0. And according to:

https://releases.llvm.org/6.0.0/tools/clang/docs/AttributeReference.html

Clang v6.0 supports the alloc_size attribute. Thus we can drop this check in the configure script now.

---
 configure | 12 ------------
 1 file changed, 12 deletions(-)
configure +0 -12
index a0a32c427c..eee1356814 100755
@@ -3184,18 +3184,6 @@ if ! compile_prog "$glib_cflags" "$glib_libs" ; then
 	       "build target"
 fi
 
-# Silence clang 3.5.0 warnings about glib attribute __alloc_size__ usage
-cat > $TMPC << EOF
-#include <glib.h>
-int main(void) { return 0; }
-EOF
-if ! compile_prog "$glib_cflags -Werror" "$glib_libs" ; then
-    if cc_has_warning_flag "-Wno-unknown-attributes"; then
-        glib_cflags="-Wno-unknown-attributes $glib_cflags"
-        CONFIGURE_CFLAGS="-Wno-unknown-attributes $CONFIGURE_CFLAGS"
-    fi
-fi
-
 # Silence clang warnings triggered by glib < 2.57.2
 cat > $TMPC << EOF
 #include <glib.h>
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Thomas Huth

We recently bumped our requirement for Clang to at least version 6.0. And according to:

https://releases.llvm.org/6.0.0/tools/clang/docs/AttributeReference.html

Quoted 7 lines

Clang v6.0 supports the alloc_size attribute. Thus we can drop this check in the configure script now.

---
 configure | 12 ------------
 1 file changed, 12 deletions(-)

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#2 lore raw
In reply to Thomas Huth
Quoted 27 lines · Thomas Huth

We recently bumped our requirement for Clang to at least version 6.0. And according to:

https://releases.llvm.org/6.0.0/tools/clang/docs/AttributeReference.html

Clang v6.0 supports the alloc_size attribute. Thus we can drop this check in the configure script now.

---
  configure | 12 ------------
  1 file changed, 12 deletions(-)
configure +0 -5
index a0a32c427c..eee1356814 100755
@@ -3184,18 +3184,6 @@ if ! compile_prog "$glib_cflags" "$glib_libs" ; then
  	       "build target"
  fi
 
-# Silence clang 3.5.0 warnings about glib attribute __alloc_size__ usage
-cat > $TMPC << EOF
-#include <glib.h>
-int main(void) { return 0; }
-EOF

configure if ! compile_prog "$glib_cflags" "$glib_libs" ; then · line 3189

Quoted 10 lines
configure +0 -7
-if ! compile_prog "$glib_cflags -Werror" "$glib_libs" ; then
-    if cc_has_warning_flag "-Wno-unknown-attributes"; then
-        glib_cflags="-Wno-unknown-attributes $glib_cflags"
-        CONFIGURE_CFLAGS="-Wno-unknown-attributes $CONFIGURE_CFLAGS"
-    fi
-fi
-
  # Silence clang warnings triggered by glib < 2.57.2
  cat > $TMPC << EOF
  #include <glib.h>

Queued, thanks.

Paolo