foss-for-synopsys-dwc-arc-processors / linux

Helpful resources for users & developers of Linux kernel for ARC
22 stars 13 forks source link

Kernel's inflate code may not work properly with -O3 #68

Open VVIsaev opened 2 years ago

VVIsaev commented 2 years ago

There is an alignment issue with inflate code which causes some tricky problems, such as corrupted files or binaries. Other arches don't see this because we are the only one which uses -O3 for building kernel.

There is a workaround for the issue in the arc64 branch: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/blob/bc5fec251f1087dc999fa744aa64799fc02a5476/lib/zlib_inflate/Makefile#L22

Original problem: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/372 GNU GCC issue (resolved invalid): https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100363 lkml thread: https://lkml.org/lkml/2021/4/30/864

Need to fix this in upstream as well.