[patch] Fix makefile rule precedence so rtcl-memset.c is compiled correctly.

Brooks Moses bmoses@google.com
Wed Jul 17 23:11:00 GMT 2013


So, I applied the patches that Carlos gave me for fixing the
tree-loop-distribute-patterns fun, and then ran into a rather
confusing little problem where my build got broken because
rtld-memset.os was compiled without -DNOT_IN_libc, although all the
other rtld-*.os files were compiled correctly.  (This problem actually
manifested as getting an undefined __GI_memmove symbol in
rtld-memset.os.)

It turns out that the difference is that rtld-memset.os was getting
compiled from sysdeps/powerpc/powerpc64/rtld-memset.c, whereas the
other objects were getting compiled from sources without rtld-*
prefixes.  And, in sysd-rules, we have the %.os:%.c rules coming
before the rtld-%.os:rtld-%.c rules -- which means that rtld-memset.os
first matches the %.os:%.c rule, which does not include
$(rtld-CPPFLAGS).

The attached patch is a pretty obvious fix for this, along with an
explanatory comment to prevent it from recurring.  I don't have commit
privileges, so I'd appreciate if someone could commit this for me once
it's approved.

Thanks,
- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2013-07-17_makefile-rtld-precedence.diff
Type: application/octet-stream
Size: 865 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20130717/df5f75dd/attachment.obj>


More information about the Libc-alpha mailing list