Re: Compiling with old gcc breaks when CONFIG_RETPOLINE is off
On Wed, Dec 5, 2018 at 10:31 AM Zhenzhong Duan wrote: > > Hi Meelis, > > Could you try below change? It force syncconfig for any 'make *config" > > so that autoconf.h and auto.conf are always updated. NACK. syncconfig should happen only when you are about to build something. This patch let "make *config" touch include/config/* around unnecessarily. > diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c > index 98e0c7a..802875b 100644 > --- a/scripts/kconfig/conf.c > +++ b/scripts/kconfig/conf.c > @@ -38,7 +38,7 @@ enum input_mode { > > static int indent = 1; > static int tty_stdio; > -static int sync_kconfig; > +static int sync_kconfig = 1; > static int conf_cnt; > static char line[PATH_MAX]; > static struct menu *rootEntry; > @@ -506,11 +506,11 @@ int main(int ac, char **av) > * Suppress distracting "configuration written > to ..." > */ > conf_set_message_callback(NULL); > - sync_kconfig = 1; > break; > case defconfig: > case savedefconfig: > defconfig_file = optarg; > + sync_kconfig = 0; > break; > case randconfig: > { > @@ -537,13 +537,15 @@ int main(int ac, char **av) > srand(seed); > break; > } > + case listnewconfig: > + sync_kconfig = 0; > + /* fall through */ > case oldaskconfig: > case oldconfig: > case allnoconfig: > case allyesconfig: > case allmodconfig: > case alldefconfig: > - case listnewconfig: > case olddefconfig: > break; > case '?': > > Thanks > > Zhenzhong > > On 2018/12/4 17:58, Meelis Roos wrote: > > Just tried 4.20-rc5 on an old K6-2 PC with gcc 5.3.1, got an error > > about non-retpoline compiler, > > turned CONFIG_RETPOLINE off and retried. > > > > To my surprise, compilation still breaks with > > arch/x86/Makefile:224: *** You are building kernel with non-retpoline > > compiler, please update your compiler.. Stop. > > > > As I read the Makefile, it should error only when CONFIG_RETPOLINE is > > enabled, but it still breaks. > > > > $ grep -r CONFIG_RETPOLINE .config > > # CONFIG_RETPOLINE is not set > > > > $ grep -r CONFIG_RETPOLINE include/ > > include/generated/autoconf.h:#define CONFIG_RETPOLINE 1 > > include/config/auto.conf:CONFIG_RETPOLINE=y > > > > So the headers have not been updated yet, maybe? > > -- Best Regards Masahiro Yamada
Re: Compiling with old gcc breaks when CONFIG_RETPOLINE is off
On Wed, Dec 5, 2018 at 10:31 AM Zhenzhong Duan wrote: > > Hi Meelis, > > Could you try below change? It force syncconfig for any 'make *config" > > so that autoconf.h and auto.conf are always updated. NACK. syncconfig should happen only when you are about to build something. This patch let "make *config" touch include/config/* around unnecessarily. > diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c > index 98e0c7a..802875b 100644 > --- a/scripts/kconfig/conf.c > +++ b/scripts/kconfig/conf.c > @@ -38,7 +38,7 @@ enum input_mode { > > static int indent = 1; > static int tty_stdio; > -static int sync_kconfig; > +static int sync_kconfig = 1; > static int conf_cnt; > static char line[PATH_MAX]; > static struct menu *rootEntry; > @@ -506,11 +506,11 @@ int main(int ac, char **av) > * Suppress distracting "configuration written > to ..." > */ > conf_set_message_callback(NULL); > - sync_kconfig = 1; > break; > case defconfig: > case savedefconfig: > defconfig_file = optarg; > + sync_kconfig = 0; > break; > case randconfig: > { > @@ -537,13 +537,15 @@ int main(int ac, char **av) > srand(seed); > break; > } > + case listnewconfig: > + sync_kconfig = 0; > + /* fall through */ > case oldaskconfig: > case oldconfig: > case allnoconfig: > case allyesconfig: > case allmodconfig: > case alldefconfig: > - case listnewconfig: > case olddefconfig: > break; > case '?': > > Thanks > > Zhenzhong > > On 2018/12/4 17:58, Meelis Roos wrote: > > Just tried 4.20-rc5 on an old K6-2 PC with gcc 5.3.1, got an error > > about non-retpoline compiler, > > turned CONFIG_RETPOLINE off and retried. > > > > To my surprise, compilation still breaks with > > arch/x86/Makefile:224: *** You are building kernel with non-retpoline > > compiler, please update your compiler.. Stop. > > > > As I read the Makefile, it should error only when CONFIG_RETPOLINE is > > enabled, but it still breaks. > > > > $ grep -r CONFIG_RETPOLINE .config > > # CONFIG_RETPOLINE is not set > > > > $ grep -r CONFIG_RETPOLINE include/ > > include/generated/autoconf.h:#define CONFIG_RETPOLINE 1 > > include/config/auto.conf:CONFIG_RETPOLINE=y > > > > So the headers have not been updated yet, maybe? > > -- Best Regards Masahiro Yamada
Re: Compiling with old gcc breaks when CONFIG_RETPOLINE is off
Hi Meelis, Could you try below change? It force syncconfig for any 'make *config" so that autoconf.h and auto.conf are always updated. diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 98e0c7a..802875b 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -38,7 +38,7 @@ enum input_mode { static int indent = 1; static int tty_stdio; -static int sync_kconfig; +static int sync_kconfig = 1; static int conf_cnt; static char line[PATH_MAX]; static struct menu *rootEntry; @@ -506,11 +506,11 @@ int main(int ac, char **av) * Suppress distracting "configuration written to ..." */ conf_set_message_callback(NULL); - sync_kconfig = 1; break; case defconfig: case savedefconfig: defconfig_file = optarg; + sync_kconfig = 0; break; case randconfig: { @@ -537,13 +537,15 @@ int main(int ac, char **av) srand(seed); break; } + case listnewconfig: + sync_kconfig = 0; + /* fall through */ case oldaskconfig: case oldconfig: case allnoconfig: case allyesconfig: case allmodconfig: case alldefconfig: - case listnewconfig: case olddefconfig: break; case '?': Thanks Zhenzhong On 2018/12/4 17:58, Meelis Roos wrote: Just tried 4.20-rc5 on an old K6-2 PC with gcc 5.3.1, got an error about non-retpoline compiler, turned CONFIG_RETPOLINE off and retried. To my surprise, compilation still breaks with arch/x86/Makefile:224: *** You are building kernel with non-retpoline compiler, please update your compiler.. Stop. As I read the Makefile, it should error only when CONFIG_RETPOLINE is enabled, but it still breaks. $ grep -r CONFIG_RETPOLINE .config # CONFIG_RETPOLINE is not set $ grep -r CONFIG_RETPOLINE include/ include/generated/autoconf.h:#define CONFIG_RETPOLINE 1 include/config/auto.conf:CONFIG_RETPOLINE=y So the headers have not been updated yet, maybe?
Re: Compiling with old gcc breaks when CONFIG_RETPOLINE is off
Hi Meelis, Could you try below change? It force syncconfig for any 'make *config" so that autoconf.h and auto.conf are always updated. diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 98e0c7a..802875b 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -38,7 +38,7 @@ enum input_mode { static int indent = 1; static int tty_stdio; -static int sync_kconfig; +static int sync_kconfig = 1; static int conf_cnt; static char line[PATH_MAX]; static struct menu *rootEntry; @@ -506,11 +506,11 @@ int main(int ac, char **av) * Suppress distracting "configuration written to ..." */ conf_set_message_callback(NULL); - sync_kconfig = 1; break; case defconfig: case savedefconfig: defconfig_file = optarg; + sync_kconfig = 0; break; case randconfig: { @@ -537,13 +537,15 @@ int main(int ac, char **av) srand(seed); break; } + case listnewconfig: + sync_kconfig = 0; + /* fall through */ case oldaskconfig: case oldconfig: case allnoconfig: case allyesconfig: case allmodconfig: case alldefconfig: - case listnewconfig: case olddefconfig: break; case '?': Thanks Zhenzhong On 2018/12/4 17:58, Meelis Roos wrote: Just tried 4.20-rc5 on an old K6-2 PC with gcc 5.3.1, got an error about non-retpoline compiler, turned CONFIG_RETPOLINE off and retried. To my surprise, compilation still breaks with arch/x86/Makefile:224: *** You are building kernel with non-retpoline compiler, please update your compiler.. Stop. As I read the Makefile, it should error only when CONFIG_RETPOLINE is enabled, but it still breaks. $ grep -r CONFIG_RETPOLINE .config # CONFIG_RETPOLINE is not set $ grep -r CONFIG_RETPOLINE include/ include/generated/autoconf.h:#define CONFIG_RETPOLINE 1 include/config/auto.conf:CONFIG_RETPOLINE=y So the headers have not been updated yet, maybe?
Re: Compiling with old gcc breaks when CONFIG_RETPOLINE is off
Since commit '315bab4e972d kbuild: fix endless syncconfig in case arch Makefile sets CROSS_COMPILE', arch/$(SRCARCH)/Makefile is moved ahead of include/config/%.conf synchonization in root Makefile. So all the CONFIG_* option used in arch/$(SRCARCH)/Makefile may have stale value if they were just updated in .config. This looks like an issue. I'm not familiar with kbuild. Ccing Yamada for help. Thanks Zhenzhong On 2018/12/4 17:58, Meelis Roos wrote: Just tried 4.20-rc5 on an old K6-2 PC with gcc 5.3.1, got an error about non-retpoline compiler, turned CONFIG_RETPOLINE off and retried. To my surprise, compilation still breaks with arch/x86/Makefile:224: *** You are building kernel with non-retpoline compiler, please update your compiler.. Stop. As I read the Makefile, it should error only when CONFIG_RETPOLINE is enabled, but it still breaks. $ grep -r CONFIG_RETPOLINE .config # CONFIG_RETPOLINE is not set $ grep -r CONFIG_RETPOLINE include/ include/generated/autoconf.h:#define CONFIG_RETPOLINE 1 include/config/auto.conf:CONFIG_RETPOLINE=y So the headers have not been updated yet, maybe?
Re: Compiling with old gcc breaks when CONFIG_RETPOLINE is off
Since commit '315bab4e972d kbuild: fix endless syncconfig in case arch Makefile sets CROSS_COMPILE', arch/$(SRCARCH)/Makefile is moved ahead of include/config/%.conf synchonization in root Makefile. So all the CONFIG_* option used in arch/$(SRCARCH)/Makefile may have stale value if they were just updated in .config. This looks like an issue. I'm not familiar with kbuild. Ccing Yamada for help. Thanks Zhenzhong On 2018/12/4 17:58, Meelis Roos wrote: Just tried 4.20-rc5 on an old K6-2 PC with gcc 5.3.1, got an error about non-retpoline compiler, turned CONFIG_RETPOLINE off and retried. To my surprise, compilation still breaks with arch/x86/Makefile:224: *** You are building kernel with non-retpoline compiler, please update your compiler.. Stop. As I read the Makefile, it should error only when CONFIG_RETPOLINE is enabled, but it still breaks. $ grep -r CONFIG_RETPOLINE .config # CONFIG_RETPOLINE is not set $ grep -r CONFIG_RETPOLINE include/ include/generated/autoconf.h:#define CONFIG_RETPOLINE 1 include/config/auto.conf:CONFIG_RETPOLINE=y So the headers have not been updated yet, maybe?
Compiling with old gcc breaks when CONFIG_RETPOLINE is off
Just tried 4.20-rc5 on an old K6-2 PC with gcc 5.3.1, got an error about non-retpoline compiler, turned CONFIG_RETPOLINE off and retried. To my surprise, compilation still breaks with arch/x86/Makefile:224: *** You are building kernel with non-retpoline compiler, please update your compiler.. Stop. As I read the Makefile, it should error only when CONFIG_RETPOLINE is enabled, but it still breaks. $ grep -r CONFIG_RETPOLINE .config # CONFIG_RETPOLINE is not set $ grep -r CONFIG_RETPOLINE include/ include/generated/autoconf.h:#define CONFIG_RETPOLINE 1 include/config/auto.conf:CONFIG_RETPOLINE=y So the headers have not been updated yet, maybe? -- Meelis Roos
Compiling with old gcc breaks when CONFIG_RETPOLINE is off
Just tried 4.20-rc5 on an old K6-2 PC with gcc 5.3.1, got an error about non-retpoline compiler, turned CONFIG_RETPOLINE off and retried. To my surprise, compilation still breaks with arch/x86/Makefile:224: *** You are building kernel with non-retpoline compiler, please update your compiler.. Stop. As I read the Makefile, it should error only when CONFIG_RETPOLINE is enabled, but it still breaks. $ grep -r CONFIG_RETPOLINE .config # CONFIG_RETPOLINE is not set $ grep -r CONFIG_RETPOLINE include/ include/generated/autoconf.h:#define CONFIG_RETPOLINE 1 include/config/auto.conf:CONFIG_RETPOLINE=y So the headers have not been updated yet, maybe? -- Meelis Roos