#54 Add `-fpermissive` to CFLAGS to workaround compilation errors on Fedora 40
Merged by jforbes. Opened by rebtoor.
rebtoor/kernel-tests fix-gcc-flags  into  master

Download 54.patch

Trying to launch the performance test suite as described here [1], the compilation of the lmbench3 script is failing on Fedora 40 due to stricter validation rules enabled by default in gcc. Setting -fpermissive [2] in the CFLAGS variable, it will downgrade the compilation errors to warning messages.

Failing message:

gcc -O -I/usr/include/tirpc -DSYS5 -Dvalloc=malloc -DS_IFIFO=S_IFFIFO  -ltirpc -c lib_timing.c -o ../bin/x86_64-linux-gnu/lib_timing.o
lib_timing.c: In function touch:
lib_timing.c:1626:17: error: type defaults to int in declaration of psize [-Wimplicit-int]
 1626 |         static  psize;
      |                 ^~~~~
gmake[2]: *** [Makefile:240: ../bin/x86_64-linux-gnu/lib_timing.o] Error 1

[1] https://fedoraproject.org/wiki/QA:Testcase_kernel_regression#How_to_test
[2] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-fpermissive

Pull-Request has been merged by jforbes

Metadata