chenall / grub4dos

外部命令和工具源码:https://github.com/chenall/grubutils 下载:
http://grub4dos.chenall.net
GNU General Public License v2.0
629 stars 132 forks source link

configure.ac is out of sync, some gcc checks are missing #422

Open 1ras opened 11 months ago

1ras commented 11 months ago

configure.ac is out of sync, the gcc newer than 4.8 and gcc 10 checks are missing. They have only been added to configure, but not to configure.ac. When autoconf is used, the resulting configure script does not support gcc 10 and newer.

The related changes are part of commit https://github.com/chenall/grub4dos/commit/8c4bc2dacacf72ff86babd26d77e7b7d5faa6295

yaya2007 commented 11 months ago

Not familiar with compiling. Can a patch be provided?

1ras commented 11 months ago

I took a closer look and I don't think its even necessary to check the gcc versions. It should be sufficient to check if the function flags -fgnu89-inline and -fcommon are supported by gcc, similar like -fno-stack-protector and -fno-reorder-functions are checked by configure.ac.

On the other hand -fgnu89-inline is supported since gcc 4.2 and -fcommon since gcc 4.4 (according to the old online documentation). It should actually be sufficient to add both to STAGE2_CFLAGS without further checks. Or is there a reason to support older versions?