[Toybox] [PATCH] Pass the parent make variables when invoking make in scripts/single.sh.
Rob Landley
rob at landley.net
Tue Mar 15 11:56:11 PDT 2016
On 03/15/2016 04:12 AM, Andy Chu wrote:
>>> Without this patch, the binary will fail with runtime errors.
>>
>> I don't understand what this patch does: make exported the variables it
>> had which should have passed them to its scripts/single.sh child
>> process, and then that child process called make which should have
>> inherited the exported variables...?
>>
>> I just did a "make LDFLAGS=--static ls" and "file ls" said it was static...?
>
> Hmm... sorry I just switched to master, without this patch, and I can
> make the ASAN build OK.
>
> Your logic seems right. I think I mistakenly thought this patch fixed
> it, but it was actually a 'make clean' that fixed it. I was just
> able to invoke test_sed on master so I get all these errors, which was
> the problem I was trying to fix, but 'make clean' fixes it.
>
> toys/posix/sed.c:(.text.asan.module_ctor+0x1f): undefined reference to
> `__asan_register_globals'
> generated/obj/sed.o: In function `asan.module_dtor':
> toys/posix/sed.c:(.text.asan.module_dtor+0xc): undefined reference to
> `__asan_unregister_globals'
>
> I think it has to do with the fact the obj/ dir, and how make
> 'test_sed' will only build some and 'make toybox' will build all, or
> something lke that. Not worth worrying about now, sorry for the noise
> :-/
The build dependencies have a couple obvious gaps.
1) If you change $CFLAGS between builds it doesn't notice.
2) If I make the .config file a prerequisite then it rebuilds everything
every time you change the config, but if I don't it can get out of sync
when you change global options like TOYBOX_DEBUG, and doesn't notice if
you toggle CONFIG_HELP_EXTRAS (won't rebuild help.c because of it).
I've been slowly eliminating per-command options because almost always,
it's too much granularity. Busybox loved to micromanage stuff, but I
want consistent behavior with one obvious codepath I know I tested.
"This is what ls does, you don't have to check the config to see which
variant you've got."
Heck, I've been gradually yanking out the I18N config option, which is a
lot more borderline, but ls should support utf8 when you have a locale
set. Yeah it's overhead, but if we're going to do it and can do it
cleanly in shared lib/ code...
> Andy
Rob
1458068171.0
More information about the Toybox
mailing list