|
@@ -29,6 +29,28 @@ GCC_OFFICIAL_VER:=$(GCC_VERSION)-$(GCC_SNAP_DATE)
|
|
|
GCC_SITE:=ftp://sources.redhat.com/pub/gcc/snapshots/$(GCC_OFFICIAL_VER)
|
|
|
endif
|
|
|
|
|
|
+# redefine if using an external prepatched gcc source
|
|
|
+ifeq ($(BR2_TOOLCHAIN_NORMAL),)
|
|
|
+GCC_SITE:=$(VENDOR_SITE)
|
|
|
+GCC_OFFICIAL_VER:=$(GCC_VERSION)$(VENDOR_SUFFIX)$(VENDOR_GCC_RELEASE)
|
|
|
+endif
|
|
|
+
|
|
|
+# define patch location
|
|
|
+ifeq ($(BR2_TOOLCHAIN_NORMAL),y) # Normal toolchain
|
|
|
+ifeq ($(GCC_SNAP_DATE),) # Not a snapshot
|
|
|
+GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION)
|
|
|
+else # Is a snapshot
|
|
|
+ifneq ($(wildcard toolchain/gcc/$(GCC_OFFICIAL_VER)),) # Snapshot patch?
|
|
|
+GCC_PATCH_DIR:=toolchain/gcc/$(GCC_OFFICIAL_VER)
|
|
|
+else # Normal patch to snapshot
|
|
|
+# Use the normal location, if the dedicated location does not exist
|
|
|
+GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION)
|
|
|
+endif # Snapshot patch
|
|
|
+endif # Not a snapshot
|
|
|
+else # Prepatched toolchain
|
|
|
+GCC_PATCH_DIR:=$(VENDOR_PATCH_DIR)/gcc-$(GCC_OFFICIAL_VER)
|
|
|
+endif # Normal toolchain
|
|
|
+
|
|
|
GCC_SOURCE:=gcc-$(GCC_OFFICIAL_VER).tar.bz2
|
|
|
GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-$(GCC_OFFICIAL_VER)
|
|
|
GCC_CAT:=$(BZCAT)
|
|
@@ -97,7 +119,7 @@ $(DL_DIR)/$(GCC_SOURCE):
|
|
|
mkdir -p $(DL_DIR)
|
|
|
$(WGET) -P $(DL_DIR) $(GCC_SITE)/$(GCC_SOURCE)
|
|
|
|
|
|
-gcc-unpacked: $(GCC_DIR)/.unpacked
|
|
|
+gcc-unpacked: $(GCC_DIR)/.patched
|
|
|
$(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE)
|
|
|
mkdir -p $(TOOL_BUILD_DIR)
|
|
|
rm -rf $(GCC_DIR)
|
|
@@ -108,15 +130,7 @@ $(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE)
|
|
|
gcc-patched: $(GCC_DIR)/.patched
|
|
|
$(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked
|
|
|
# Apply any files named gcc-*.patch from the source directory to gcc
|
|
|
-ifeq ($(GCC_SNAP_DATE),)
|
|
|
- toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_VERSION) \*.patch
|
|
|
-else
|
|
|
-ifneq ($(wildcard toolchain/gcc/$(GCC_OFFICIAL_VER)),)
|
|
|
- toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_OFFICIAL_VER) \*.patch
|
|
|
-else
|
|
|
- toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_VERSION) \*.patch
|
|
|
-endif
|
|
|
-endif
|
|
|
+ toolchain/patch-kernel.sh $(GCC_DIR) $(GCC_PATCH_DIR) \*.patch
|
|
|
|
|
|
# Note: The soft float situation has improved considerably with gcc 3.4.x.
|
|
|
# We can dispense with the custom spec files, as well as libfloat for the arm case.
|