Re: sub makefile does not use correct value of CFLAGS from top make file,

2021-09-03 Thread Jeffrey Walton
On Fri, Sep 3, 2021 at 5:58 PM Jeffrey.Fellin--- via Bug reports and discussion for GNU make wrote: > > I have a project that compiles .S and .c files, and the value of CFLAGS in > the sub makefile is not the same for the compile lines > ... > The compile of bug.S succeeds, but doesn’t have the c

Re: sub makefile does not use correct value of CFLAGS from top make file,

2021-09-03 Thread Martin Dorey
# Also note the top make file removes the default rule for %.o:%.[Sc], but # the default rules are still being used. I fear you think that .EXPORT_ALL_VARIABLES should have exported your custom rule to the sub-make. It won't. I didn't notice any difference in say 4.1 but I dug out a similarly

Re: sub makefile does not use correct value of CFLAGS from top make file,

2021-09-03 Thread Philip Guenther
Unlike variable assignments, rules--including overrides of built-in pattern rules--are not inherited by recursively invoked instances of make. They have to be in a makefile read by the instance of make that needs them. (GNU makes built-in rules and variables have TARGET_ARCH for basically all typ