--- buildroot-r16897/toolchain/gcc/gcc-uclibc-3.x.mk 2006-12-13 17:02:51.000000000 +0100 +++ buildroot/toolchain/gcc/gcc-uclibc-3.x.mk 2006-12-14 08:52:15.000000000 +0100 @@ -255,19 +255,19 @@ gcc-target-libs: $(GCC_BUILD_DIR2)/.installed ifeq ($(BR2_GCC_SHARED_LIBGCC),y) # These are in /lib, so... - rm -rf $(TARGET_DIR)/usr/lib/libgcc_s*.so* - -cp -a $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libgcc_s* $(TARGET_DIR)/lib/ + rm -rf $(TARGET_DIR)/opt/lib/libgcc_s*.so* + -cp -a $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libgcc_s* $(TARGET_DIR)/opt/lib/ endif ifeq ($(BR2_INSTALL_LIBSTDCPP),y) - -cp -a $(STAGING_DIR)/lib/libstdc++.so* $(TARGET_DIR)/lib/ + -cp -a $(STAGING_DIR)/lib/libstdc++.so* $(TARGET_DIR)/opt/lib/ endif ifeq ($(BR2_INSTALL_LIBGCJ),y) - -cp -a $(STAGING_DIR)/lib/libgcj.so* $(TARGET_DIR)/lib/ - -cp -a $(STAGING_DIR)/lib/lib-org-w3c-dom.so* $(TARGET_DIR)/lib/ - -cp -a $(STAGING_DIR)/lib/lib-org-xml-sax.so* $(TARGET_DIR)/lib/ - -mkdir -p $(TARGET_DIR)/usr/lib/security - -cp -a $(STAGING_DIR)/usr/lib/security/libgcj.security $(TARGET_DIR)/usr/lib/security/ - -cp -a $(STAGING_DIR)/usr/lib/security/classpath.security $(TARGET_DIR)/usr/lib/security/ + -cp -a $(STAGING_DIR)/lib/libgcj.so* $(TARGET_DIR)/opt/lib/ + -cp -a $(STAGING_DIR)/lib/lib-org-w3c-dom.so* $(TARGET_DIR)/opt/lib/ + -cp -a $(STAGING_DIR)/lib/lib-org-xml-sax.so* $(TARGET_DIR)/opt/lib/ + -mkdir -p $(TARGET_DIR)/opt/lib/security + -cp -a $(STAGING_DIR)/usr/lib/security/libgcj.security $(TARGET_DIR)/opt/lib/security/ + -cp -a $(STAGING_DIR)/usr/lib/security/classpath.security $(TARGET_DIR)/opt/lib/security/ endif gcc: uclibc-configured binutils gcc_initial $(LIBFLOAT_TARGET) uclibc \ @@ -296,12 +296,12 @@ mkdir -p $(GCC_BUILD_DIR3) (cd $(GCC_BUILD_DIR3); PATH=$(TARGET_PATH) \ $(GCC_DIR)/configure \ - --prefix=/usr \ + --prefix=/opt \ --build=$(GNU_HOST_NAME) \ --host=$(REAL_GNU_TARGET_NAME) \ --target=$(REAL_GNU_TARGET_NAME) \ --enable-languages=$(TARGET_LANGUAGES) \ - --with-gxx-include-dir=/usr/include/c++ \ + --with-gxx-include-dir=/opt/include/c++ \ --disable-__cxa_atexit \ --enable-target-optspace \ --with-gnu-ld \ @@ -344,53 +344,53 @@ endif endif -$(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled +$(TARGET_DIR)/opt/bin/gcc: $(GCC_BUILD_DIR3)/.compiled PATH=$(TARGET_PATH) \ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(GCC_BUILD_DIR3) install # Remove broken specs file (cross compile flag is set). - rm -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/specs + rm -f $(TARGET_DIR)/opt/$(GCC_LIB_SUBDIR)/specs # # Now for the ugly 3.3.x soft float hack... # ifeq ($(BR2_SOFT_FLOAT),y) ifeq ($(findstring 3.3.,$(GCC_VERSION)),3.3.) # Add a specs file that defaults to soft float mode. - cp toolchain/gcc/$(GCC_VERSION)/specs-$(ARCH)-soft-float $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs + cp toolchain/gcc/$(GCC_VERSION)/specs-$(ARCH)-soft-float $(TARGET_DIR)/opt/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs # Make sure gcc does not think we are cross compiling - $(SED) "s/^1/0/;" $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs + $(SED) "s/^1/0/;" $(TARGET_DIR)/opt/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs endif endif # # Ok... that's enough of that. # - -(cd $(TARGET_DIR)/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1) - -(cd $(TARGET_DIR)/usr/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1) - -(cd $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR); $(STRIP) cc1 cc1plus collect2 > /dev/null 2>&1) - -(cd $(TARGET_DIR)/usr/lib; $(STRIP) libstdc++.so.*.*.* > /dev/null 2>&1) - -(cd $(TARGET_DIR)/lib; $(STRIP) libgcc_s*.so.*.*.* > /dev/null 2>&1) + -(cd $(TARGET_DIR)/opt/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1) + -(cd $(TARGET_DIR)/opt/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1) + -(cd $(TARGET_DIR)/opt/$(GCC_LIB_SUBDIR); $(STRIP) cc1 cc1plus collect2 > /dev/null 2>&1) + -(cd $(TARGET_DIR)/opt/lib; $(STRIP) libstdc++.so.*.*.* > /dev/null 2>&1) + -(cd $(TARGET_DIR)/opt/lib; $(STRIP) libgcc_s*.so.*.*.* > /dev/null 2>&1) # - rm -f $(TARGET_DIR)/usr/lib/*.la* - #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ - # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + rm -f $(TARGET_DIR)/opt/lib/*.la* + #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/opt/info \ + # $(TARGET_DIR)/usr/man $(TARGET_DIR)/opt/share/doc # Work around problem of missing syslimits.h - if [ ! -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/include/syslimits.h ] ; then \ + if [ ! -f $(TARGET_DIR)/opt/$(GCC_LIB_SUBDIR)/include/syslimits.h ] ; then \ echo "warning: working around missing syslimits.h" ; \ cp -f $(STAGING_DIR)/$(GCC_LIB_SUBDIR)/include/syslimits.h \ - $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/include/ ; \ + $(TARGET_DIR)/opt/$(GCC_LIB_SUBDIR)/include/ ; \ fi # Make sure we have 'cc'. - if [ ! -e $(TARGET_DIR)/usr/bin/cc ] ; then \ - ln -snf gcc $(TARGET_DIR)/usr/bin/cc ; \ + if [ ! -e $(TARGET_DIR)/opt/bin/cc ] ; then \ + ln -snf gcc $(TARGET_DIR)/opt/bin/cc ; \ fi; # These are in /lib, so... - #rm -rf $(TARGET_DIR)/usr/lib/libgcc_s*.so* - #touch -c $(TARGET_DIR)/usr/bin/gcc + #rm -rf $(TARGET_DIR)/opt/lib/libgcc_s*.so* + #touch -c $(TARGET_DIR)/opt/bin/gcc -gcc_target: uclibc_target binutils_target $(TARGET_DIR)/usr/bin/gcc +gcc_target: uclibc_target binutils_target $(TARGET_DIR)/opt/bin/gcc gcc_target-clean: rm -rf $(GCC_BUILD_DIR3) - rm -f $(TARGET_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)* + rm -f $(TARGET_DIR)/opt/bin/$(REAL_GNU_TARGET_NAME)* gcc_target-dirclean: rm -rf $(GCC_BUILD_DIR3)