summaryrefslogtreecommitdiff
path: root/make/ccache.mk
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2004-09-03 00:49:43 +0000
committerManuel Novoa III <mjn3@codepoet.org>2004-09-03 00:49:43 +0000
commit3ad3d8a1d8c25bab9937e2d9e08ccdbb0b042543 (patch)
tree56c0b25562b460f75a4191b826be6690a8015db9 /make/ccache.mk
parente694138b173d963ab0348f652e3882db97e2d296 (diff)
Update to what I'm currently using. Lots of changes...
1) Allow selection of binutils/gcc/gdb/kernel headers to build, although some of the older tool patches probably need updating. 2) Rework gdb build so that remote debugging now works with gdbserver. 3) Misc. other package updates.3) Misc. other package updates.3) Misc. other package updates.
Diffstat (limited to 'make/ccache.mk')
-rw-r--r--make/ccache.mk32
1 files changed, 16 insertions, 16 deletions
diff --git a/make/ccache.mk b/make/ccache.mk
index f495be954..eea70017f 100644
--- a/make/ccache.mk
+++ b/make/ccache.mk
@@ -19,8 +19,11 @@ $(CCACHE_DIR1)/.unpacked: $(DL_DIR)/$(CCACHE_SOURCE)
touch $(CCACHE_DIR1)/.unpacked
$(CCACHE_DIR1)/.patched: $(CCACHE_DIR1)/.unpacked
- $(SED) "s,getenv(\"CCACHE_PATH\"),\"$(STAGING_DIR)/usr/bin\",g" \
+ # WARNING - this will break if the toolchain is moved.
+ # Should probably patch things to use a relative path.
+ $(SED) "s,getenv(\"CCACHE_PATH\"),\"$(STAGING_DIR)/bin-ccache\",g" \
$(CCACHE_DIR1)/execute.c
+ # WARNING - this will break if the toolchain build dir is deleted.
$(SED) "s,getenv(\"CCACHE_DIR\"),\"$(CCACHE_DIR1)/cache\",g" \
$(CCACHE_DIR1)/ccache.c
mkdir -p $(CCACHE_DIR1)/cache
@@ -43,14 +46,16 @@ $(CCACHE_DIR1)/$(CCACHE_BINARY): $(CCACHE_DIR1)/.configured
$(STAGING_DIR)/$(CCACHE_TARGET_BINARY): $(CCACHE_DIR1)/$(CCACHE_BINARY)
mkdir -p $(STAGING_DIR)/usr/bin;
- mkdir -p $(TOOL_BUILD_DIR)/.ccache;
cp $(CCACHE_DIR1)/ccache $(STAGING_DIR)/usr/bin
- (cd $(STAGING_DIR)/usr/bin; \
+ # Keep the actual toolchain binaries in a directory at the same level.
+ # Otherwise, relative paths for include dirs break.
+ mkdir -p $(STAGING_DIR)/bin-ccache;
+ (cd $(STAGING_DIR)/bin-ccache; \
ln -fs $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(OPTIMIZE_FOR_CPU)-linux-gcc; \
ln -fs $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(OPTIMIZE_FOR_CPU)-linux-cc; \
ln -fs $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(OPTIMIZE_FOR_CPU)-linux-uclibc-cc);
[ -f $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc ] && \
- mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(STAGING_DIR)/usr/bin/
+ mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(STAGING_DIR)/bin-ccache/
(cd $(STAGING_DIR)/bin; \
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-cc; \
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-gcc; \
@@ -58,9 +63,9 @@ $(STAGING_DIR)/$(CCACHE_TARGET_BINARY): $(CCACHE_DIR1)/$(CCACHE_BINARY)
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc);
ifeq ($(INSTALL_LIBSTDCPP),true)
[ -f $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-c++ ] && \
- mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-c++ $(STAGING_DIR)/usr/bin/
+ mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-c++ $(STAGING_DIR)/bin-ccache/
[ -f $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-g++ ] && \
- mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-g++ $(STAGING_DIR)/usr/bin/
+ mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-g++ $(STAGING_DIR)/bin-ccache/
(cd $(STAGING_DIR)/bin; \
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-c++; \
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-g++;\
@@ -68,11 +73,7 @@ ifeq ($(INSTALL_LIBSTDCPP),true)
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-uclibc-g++);
endif
-ifeq ($(GCC_2_95_TOOLCHAIN),true)
-ccache: gcc2_95 $(STAGING_DIR)/$(CCACHE_TARGET_BINARY)
-else
-ccache: gcc3_3 $(STAGING_DIR)/$(CCACHE_TARGET_BINARY)
-endif
+ccache: gcc $(STAGING_DIR)/$(CCACHE_TARGET_BINARY)
ccache-clean:
$(MAKE) -C $(CCACHE_DIR1) uninstall
@@ -128,12 +129,11 @@ $(TARGET_DIR)/$(CCACHE_TARGET_BINARY): $(CCACHE_DIR2)/$(CCACHE_BINARY)
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
# put a bunch of symlinks into /bin, since that is earlier
# in the default PATH than /usr/bin where gcc lives
- (cd $(TARGET_DIR)/usr/bin; ln -fs gcc cc)
(cd $(TARGET_DIR)/bin; \
- ln -fs ../usr/bin/ccache cc; \
- ln -fs ../usr/bin/ccache gcc; \
- ln -fs ../usr/bin/ccache c++; \
- ln -fs ../usr/bin/ccache g++;)
+ ln -fs /usr/bin/ccache cc; \
+ ln -fs /usr/bin/ccache gcc; \
+ ln -fs /usr/bin/ccache c++; \
+ ln -fs /usr/bin/ccache g++;)
ccache_target: uclibc $(TARGET_DIR)/$(CCACHE_TARGET_BINARY)