File tree Expand file tree Collapse file tree 1 file changed +19
-9
lines changed Expand file tree Collapse file tree 1 file changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -105,10 +105,29 @@ _die()
105105 fi
106106}
107107
108+ _fixup_cflags () {
109+ compiler_version=$( echo " $1 =" $( $1 -dumpversion) )
110+ case " $compiler_version " in
111+ clang* =4.2.1)
112+ # one of my versions of clang complains about some stuff in stdio.h and stdarg.h ...
113+ TEST_CFLAGS=" -Wno-typedef-redefinition"
114+ ;;
115+ gcc* =9)
116+ # gcc 9 seems to sometimes think that variables are uninitialized, but they are.
117+ TEST_CFLAGS=" -Wno-maybe-uninitialized"
118+ ;;
119+ * )
120+ TEST_CFLAGS=" "
121+ ;;
122+ esac
123+ echo $compiler_version
124+ }
125+
108126_make ()
109127{
110128 echo -ne " Compile $1 $2 "
111129 suffix=$( echo ${1}${2} | tr ' ' ' _' )
130+ _fixup_cflags " $1 "
112131 CC=" $1 " CFLAGS=" $2 $TEST_CFLAGS " make -j$MAKE_JOBS $3 $MAKE_OPTIONS 2> gcc_errors_${suffix} .log
113132 errcnt=$( wc -l < gcc_errors_${suffix} .log)
114133 if [[ ${errcnt} -gt 1 ]]; then
400419 echo " Skipped compiler $i , file not found"
401420 continue
402421 fi
403- compiler_version=$( echo " $i =" $( $i -dumpversion) )
404- if [ " $compiler_version " == " clang=4.2.1" ]
405- then
406- # one of my versions of clang complains about some stuff in stdio.h and stdarg.h ...
407- TEST_CFLAGS=" -Wno-typedef-redefinition"
408- else
409- TEST_CFLAGS=" "
410- fi
411- echo $compiler_version
412422
413423 for a in " ${archflags[@]} "
414424 do
You can’t perform that action at this time.
0 commit comments