fix headers_install for x86-64.
PATCH 1/1 fix headers_install for x86-64.
Signed-off-by Rob Landley <[email protected]>
A bug in headers_install for ARCH=x86_64 yields an asm/ directory full of files all of which are using the same #ifdef guard, "__ASM_STUB_" with no postfix. So the second and later asm files #included in the same C file (often through standard headers like ioctl.h) yields no symbols.
--
There's a missing semicolon after the assignment to FNAME (so the assignment of STUBDEF on the next line doesn't see the value), and it helps to export variables before calling a subshell.
scripts/Makefile.headersinst +2 -2
@@ -108,8 +108,8 @@ quiet_cmd_gen = GEN $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) cmd_gen = \ -FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@) \ -STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z.- A-Z__`; \ +export FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@); \ +export STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z.- A-Z__`; \ (echo "/* File autogenerated by 'make headers_install' */" ; \ echo "\#ifndef $$STUBDEF" ; \ echo "\#define $$STUBDEF" ; \
Signature · 2 lines
"One of my most productive days was throwing away 1000 lines of code." - Ken Thompson.