[Toybox] [PATCH] Pass the parent make variables when invoking make in scripts/single.sh.

Andy Chu andychup at gmail.com
Tue Mar 15 02:12:05 PDT 2016


>> 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
:-/

Andy

 1458033125.0


More information about the Toybox mailing list