Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sys.mk broken for single-suffix rules since 1.144 (2021/11/09)



In article <m1lO7kF-0036urC@more.local>,
Greg A. Woods <current-users%netbsd.org@localhost> wrote:
>-=-=-=-=-=-
>
>I just noticed that on my recently upgraded -current machines that I
>couldn't build simple programs from single source files with a
>"portable" Makefile any more.
>
>Instead the program binaries were being put into foo.o files!
>
>It looks like rev. 1.144 of sys.mk was a bit too over-zealous.
>
>I'll send this as a PR also, but perhaps those running -current on
>development machines might need a more urgent fix.
>
>Here are my patches that include the fix, and also clean up the use of
>various flags in LINK.* (remove CPPFLAGS and add LDSTATIC) and introduce
>COMPILE_LINK.* macros to be used with the direct source to target binary
>rules (single-suffix rules) such as ".c:" (and finally also split the
>settings for debugger and optimizer flags).
>
>The key parts are to revert the change to use ${OBJECT_TARGET} in the
>single-suffix rules like ".c:" since ctfconvert(1) won't work on
>(static?) linked binaries, and because of course we still need the
>final output file to be the filename _without_ any suffix!

Thanks, I fixed the shuttle-rule issue, but let's split the LDSTATIC
and the OPTIM into separate commits. DBG has side effects too (other
Makefiles set it) so it should be done very carefully.

christos



Home | Main Index | Thread Index | Old Index