diff options
author | Richard Braun <rbraun@sceen.net> | 2012-06-08 01:52:16 +0000 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2012-06-23 15:14:51 +0200 |
commit | b7b640d8126659ca0803d8bad158917f50d43298 (patch) | |
tree | a5c8b18dd946053d153f0ef7c5c08bc9c004770c /toolchain/gcc | |
parent | d9c38d615af90782d62839a7b7836a24698b6416 (diff) | |
download | buildroot-novena-b7b640d8126659ca0803d8bad158917f50d43298.tar.gz buildroot-novena-b7b640d8126659ca0803d8bad158917f50d43298.zip |
Remove REAL_GNU_TARGET_NAME
Instead of providing two variables, make GNU_TARGET_NAME give the real
target name, and remove REAL_GNU_TARGET_NAME altogether.
Signed-off-by: Richard Braun <rbraun@sceen.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'toolchain/gcc')
-rw-r--r-- | toolchain/gcc/gcc-uclibc-4.x.mk | 71 |
1 files changed, 30 insertions, 41 deletions
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk index a2975dc56..57f4f8a35 100644 --- a/toolchain/gcc/gcc-uclibc-4.x.mk +++ b/toolchain/gcc/gcc-uclibc-4.x.mk @@ -104,7 +104,7 @@ SOFT_FLOAT_CONFIG_OPTION:= EXTRA_TARGET_GCC_CONFIG_OPTIONS += \ --disable-libmudflap EXTRA_TARGET_GCC_CONFIG_OPTIONS += \ - --with-build-time-tools=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin + --with-build-time-tools=$(STAGING_DIR)/$(GNU_TARGET_NAME)/bin EXTRA_TARGET_GCC_CONFIG_OPTIONS += \ --with-as=$(TARGET_CROSS)as endif @@ -287,7 +287,7 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched --prefix=$(HOST_DIR)/usr \ --build=$(GNU_HOST_NAME) \ --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ + --target=$(GNU_TARGET_NAME) \ --enable-languages=c \ --with-sysroot=$(TOOLCHAIN_DIR)/uClibc_dev/ \ --disable-__cxa_atexit \ @@ -322,11 +322,11 @@ endif touch $@ gcc_initial=$(GCC_BUILD_DIR1)/.installed -$(gcc_initial) $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc: $(GCC_BUILD_DIR1)/.compiled +$(gcc_initial) $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc: $(GCC_BUILD_DIR1)/.compiled PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR1) install-gcc touch $(gcc_initial) -gcc_initial: $(GCC_HOST_PREREQ) host-binutils $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc +gcc_initial: $(GCC_HOST_PREREQ) host-binutils $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc gcc_initial-clean: rm -rf $(GCC_BUILD_DIR1) @@ -353,7 +353,7 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched --prefix=$(HOST_DIR)/usr \ --build=$(GNU_HOST_NAME) \ --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ + --target=$(GNU_TARGET_NAME) \ --enable-languages=c \ --with-sysroot=$(TOOLCHAIN_DIR)/uClibc_dev/ \ --disable-__cxa_atexit \ @@ -397,7 +397,7 @@ else endif touch $(gcc_intermediate) -gcc_intermediate: uclibc-configured $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc +gcc_intermediate: uclibc-configured $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc gcc_intermediate-clean: rm -rf $(GCC_BUILD_DIR2) @@ -422,17 +422,17 @@ GCC_BUILD_DIR3:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION)-final $(GCC_BUILD_DIR3)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ) mkdir -p $(GCC_BUILD_DIR3) # Important! Required for limits.h to be fixed. - ln -snf ../include/ $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/sys-include + ln -snf ../include/ $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/sys-include (cd $(GCC_BUILD_DIR3); rm -rf config.cache; \ $(HOST_CONFIGURE_OPTS) \ $(GCC_SRC_DIR)/configure $(QUIET) \ --prefix=$(HOST_DIR)/usr \ --build=$(GNU_HOST_NAME) \ --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ + --target=$(GNU_TARGET_NAME) \ --enable-languages=$(GCC_CROSS_LANGUAGES) \ --with-sysroot=$(STAGING_DIR) \ - --with-build-time-tools=$(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin \ + --with-build-time-tools=$(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin \ --disable-__cxa_atexit \ $(GCC_OPTSPACE) \ $(GCC_QUADMATH) \ @@ -468,30 +468,20 @@ $(GCC_BUILD_DIR3)/.installed: $(GCC_BUILD_DIR3)/.compiled fi; \ mv "$(STAGING_DIR)/lib64/"* "$(STAGING_DIR)/lib/"; \ rmdir "$(STAGING_DIR)/lib64"; \ - rm "$(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib64";\ + rm "$(STAGING_DIR)/usr/$(GNU_TARGET_NAME)/lib64";\ fi # Strip the host binaries ifeq ($(GCC_STRIP_HOST_BINARIES),true) - strip --strip-all -R .note -R .comment $(filter-out %-gccbug %-embedspu,$(wildcard $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-*)) + strip --strip-all -R .note -R .comment $(filter-out %-gccbug %-embedspu,$(wildcard $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-*)) endif # Make sure we have 'cc'. - if [ ! -e $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-cc ]; then \ - ln -snf $(REAL_GNU_TARGET_NAME)-gcc \ - $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-cc; \ + if [ ! -e $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc ]; then \ + ln -snf $(GNU_TARGET_NAME)-gcc \ + $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc; \ fi - if [ ! -e $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin/cc ]; then \ - ln -snf gcc $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin/cc; \ + if [ ! -e $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin/cc ]; then \ + ln -snf gcc $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin/cc; \ fi - # Set up the symlinks to enable lying about target name. - set -e; \ - (cd $(HOST_DIR)/usr; \ - ln -snf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \ - cd bin; \ - for app in $(REAL_GNU_TARGET_NAME)-*; do \ - ln -snf $${app} \ - $(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \ - done; \ - ) mkdir -p $(TARGET_DIR)/usr/lib $(TARGET_DIR)/usr/sbin touch $@ @@ -500,31 +490,31 @@ $(STAMP_DIR)/gcc_libs_target_installed: $(GCC_BUILD_DIR3)/.installed ifeq ($(BR2_GCC_SHARED_LIBGCC),y) # These go in /lib, so... rm -rf $(TARGET_DIR)/usr/lib/libgcc_s*.so* - -cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libgcc_s* \ + -cp -dpf $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib*/libgcc_s* \ $(STAGING_DIR)/lib/ - -cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libgcc_s* \ + -cp -dpf $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib*/libgcc_s* \ $(TARGET_DIR)/lib/ -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/lib/libgcc_s* endif ifeq ($(BR2_INSTALL_LIBSTDCPP),y) ifeq ($(BR2_GCC_SHARED_LIBGCC),y) mkdir -p $(TARGET_DIR)/usr/lib - -cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libstdc++.so* \ + -cp -dpf $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib*/libstdc++.so* \ $(STAGING_DIR)/usr/lib/ - -cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libstdc++.so* \ + -cp -dpf $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib*/libstdc++.so* \ $(TARGET_DIR)/usr/lib/ -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libstdc++.so* endif endif ifeq ($(BR2_GCC_ENABLE_OPENMP),y) - cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libgomp.so* $(STAGING_DIR)/usr/lib/ - cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libgomp.so* $(TARGET_DIR)/usr/lib/ + cp -dpf $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib*/libgomp.so* $(STAGING_DIR)/usr/lib/ + cp -dpf $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib*/libgomp.so* $(TARGET_DIR)/usr/lib/ -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libgomp.so* endif mkdir -p $(@D) touch $@ -cross_compiler:=$(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc +cross_compiler:=$(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc cross_compiler gcc: gcc_intermediate \ $(LIBFLOAT_TARGET) uclibc $(GCC_BUILD_DIR3)/.installed \ $(STAMP_DIR)/gcc_libs_target_installed \ @@ -535,7 +525,6 @@ gcc-source: $(DL_DIR)/$(GCC_SOURCE) gcc-clean: rm -rf $(GCC_BUILD_DIR3) for prog in cpp gcc gcc-[0-9]* protoize unprotoize gcov gccbug cc; do \ - rm -f $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-$$prog; \ rm -f $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-$$prog; \ done @@ -567,8 +556,8 @@ $(GCC_BUILD_DIR4)/.configured: $(GCC_BUILD_DIR4)/.prepared $(GCC_SRC_DIR)/configure $(QUIET) \ --prefix=/usr \ --build=$(GNU_HOST_NAME) \ - --host=$(REAL_GNU_TARGET_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --target=$(GNU_TARGET_NAME) \ --enable-languages=$(GCC_TARGET_LANGUAGES) \ --with-gxx-include-dir=/usr/include/c++ \ --disable-__cxa_atexit \ @@ -596,7 +585,7 @@ $(GCC_BUILD_DIR4)/.compiled: $(GCC_BUILD_DIR4)/.configured $(MAKE) -C $(GCC_BUILD_DIR4) all touch $@ -GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION) +GCC_LIB_SUBDIR=lib/gcc/$(GNU_TARGET_NAME)/$(GCC_VERSION) ifeq ($(findstring x4.2,x$(GCC_VERSION)),x4.2) GCC_INCLUDE_DIR:=include else @@ -610,9 +599,9 @@ $(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR4)/.compiled rm -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/specs # Remove useless copies of gcc, c++, g++ - rm -f $(TARGET_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc* - rm -f $(TARGET_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-g++* - rm -f $(TARGET_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-c++* + rm -f $(TARGET_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc* + rm -f $(TARGET_DIR)/usr/bin/$(GNU_TARGET_NAME)-g++* + rm -f $(TARGET_DIR)/usr/bin/$(GNU_TARGET_NAME)-c++* # Work around problem of missing syslimits.h if [ ! -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/$(GCC_INCLUDE_DIR)/syslimits.h ]; then \ @@ -637,7 +626,7 @@ gcc_target: $(STAMP_DIR)/gcc_libs_target_installed $(GCC_TARGET_PREREQ) binutils gcc_target-clean: rm -rf $(GCC_BUILD_DIR4) - rm -f $(TARGET_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)* + rm -f $(TARGET_DIR)/usr/bin/$(GNU_TARGET_NAME)* gcc_target-dirclean: rm -rf $(GCC_BUILD_DIR4) |