about summary refs log tree commit diff
path: root/Makerules
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-04-24 20:05:34 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-04-24 20:05:34 +0000
commitc1820385dfe63bdddad462a3384267614c043415 (patch)
tree6a2467f8c0c923ecf1924309466b3c0287adbf57 /Makerules
parent94e02fc410d21ceacb12a63add9946c98e6048eb (diff)
downloadglibc-c1820385dfe63bdddad462a3384267614c043415.tar.gz
glibc-c1820385dfe63bdddad462a3384267614c043415.tar.xz
glibc-c1820385dfe63bdddad462a3384267614c043415.zip
Make $(native-compile) run in source directory like other compilation commands.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules8
1 files changed, 3 insertions, 5 deletions
diff --git a/Makerules b/Makerules
index d184be6d20..a9b178608c 100644
--- a/Makerules
+++ b/Makerules
@@ -1114,17 +1114,15 @@ install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \
 endif
 install: install-no-libc.a-nosubdir
 
-# Command to compile $< in $(objdir) using the native libraries.
+# Command to compile $< using the native libraries.
 define native-compile
 $(make-target-directory)
-$(patsubst %/,cd % &&,$(objpfx)) \
 $(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
-	    $(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(@F)
+	    $< $(OUTPUT_OPTION)
 endef
 
 # We always want to use configuration definitions.
-# Note that this is only used for commands running in $(objpfx).
-ALL_BUILD_CFLAGS = $(BUILD_CFLAGS) -include $(..)config.h
+ALL_BUILD_CFLAGS = $(BUILD_CFLAGS) -include $(common-objpfx)config.h
 
 # Support the GNU standard name for this target.
 .PHONY: check