aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2019-01-25 02:35:31 +0000
committerBen Hutchings <ben@decadent.org.uk>2019-01-25 02:38:03 +0000
commita78244c13724c19f2b8cc533af7284b882697c30 (patch)
treeaadb9a8b4a1de36505abe96a07eeb104f7628ab0
parent81b7c464c5db568edf894bacfc9bee2cec837367 (diff)
downloadklibc-a78244c13724c19f2b8cc533af7284b882697c30.tar.gz
[klibc] alpha: Fix division routine generation in out-of-tree build
Kbuild expands every -I in the compiler options so that in an out-of-tree build both the source directory and corresponding object directory are on the include path. We currently use $(KLIBCCPPFLAGS) when compiling divide.c, which is not expanded, so in an out-of-tree buld the compiler does not find headers in the source tree. Use the flags macro to expand $(KLIBCCPPFLAGS). Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--usr/klibc/arch/alpha/Kbuild3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/klibc/arch/alpha/Kbuild b/usr/klibc/arch/alpha/Kbuild
index a3f2706f09e49..2e566eb6fbc1d 100644
--- a/usr/klibc/arch/alpha/Kbuild
+++ b/usr/klibc/arch/alpha/Kbuild
@@ -34,7 +34,8 @@ $(addprefix $(obj)/,$(div-objs:.o=.S)): $(obj)/%.S: $(obj)/%.ss
$(call if_changed,regswap)
quiet_cmd_genss = DIV-CC $@
- cmd_genss = $(CC) $(DIVCFLAGS) $(FILE_CFLAGS) $(KLIBCCPPFLAGS) \
+ cmd_genss = $(CC) $(DIVCFLAGS) $(FILE_CFLAGS) \
+ $(call flags,KLIBCCPPFLAGS) \
-DNAME=$(basename $(notdir $@)) -S -o $@ $<
$(obj)/%.ss: $(obj)/divide.c