Changeset 0804c00 for scripts/patch


Ignore:
Timestamp:
Jan 25, 2009, 9:06:18 AM (16 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
49073ef
Parents:
5ec7db05
Message:

Updated to GCC 4.3.3 - Patches

Location:
scripts/patch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • scripts/patch/gcc-patch.sh

    r5ec7db05 r0804c00  
    1818cd /usr/src
    1919if ! [ -e gcc-${VERSION}.tar.bz2  ]; then
    20   wget ftp://ftp.gnu.org/gnu/gcc/gcc-${VERSION}/gcc-${VERSION}.tar.bz2
     20  wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-${VERSION}/gcc-${VERSION}.tar.bz2
    2121fi
    2222
  • scripts/patch/gcc-specs-patch.sh

    r5ec7db05 r0804c00  
    1818cd /usr/src
    1919if ! [ -e gcc-${VERSION}.tar.bz2  ]; then
    20   wget ftp://ftp.gnu.org/gnu/gcc/gcc-${VERSION}/gcc-${VERSION}.tar.bz2
     20  wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-${VERSION}/gcc-${VERSION}.tar.bz2
    2121fi
    2222
     
    4141      sed -i '/-dynamic-linker/s@ /lib@ /tools/lib@' ${file}
    4242    fi
     43    if [ "$(cat ${file} | grep -c LINK_SPEC)" != "0" ]; then
     44      echo "Modifying ${file}..."
     45      sed -i -e '/elf64_sparc -Y P,/s@/usr/lib64@/tools/lib64@' \
     46        -e '/elf32_sparc -Y P,/s@/usr/lib@/tools/lib@' \
     47        -e '/-dynamic-linker/s@ /lib@ /tools/lib@' ${file}
     48    fi
    4349  fi
    4450done
     
    5763echo "" >> gcc-${VERSION}-specs-x.patch
    5864diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-specs-x.patch
     65
     66# Cleanup Directory
     67#
     68rm -rf gcc-${VERSION} gcc-${VERSION}.orig
     69tar xvf gcc-${VERSION}.tar.bz2
     70cp -ar gcc-${VERSION} gcc-${VERSION}.orig
     71CURRENTDIR=$(pwd -P)
     72
     73# Modify the Data
     74#
     75cd /usr/src/gcc-${VERSION}
     76for file in $(find gcc/config -name "*.h"); do
     77  if [ "$(echo ${file} | grep -c bsd)" = "0" ]; then
     78    if [ "$(cat ${file} | grep -c DYNAMIC_LINKER)" != "0" ]; then
     79      echo "Modifying ${file}..."
     80      sed -i -e '/DYNAMIC_LINKER32/s@"/lib@"/tools/lib32@' \
     81       -e '/DYNAMIC_LINKERN32/s@"/lib32@"/tools/lib64@' \
     82       -e '/DYNAMIC_LINKER64/s@"/lib64@"/tools/lib@' \
     83       -e '/DYNAMIC_LINKER/s@"/lib@"/tools/lib@' ${file}
     84    fi
     85    if [ "$(cat ${file} | grep -c DYNAMIC_LINKER)" != "0" ]; then
     86      echo "Modifying ${file}..."
     87      sed -i '/-dynamic-linker/s@ /lib@ /tools/lib@' ${file}
     88    fi
     89    if [ "$(cat ${file} | grep -c LINK_SPEC)" != "0" ]; then
     90      echo "Modifying ${file}..."
     91      sed -i -e '/elf64_sparc -Y P,/s@/usr/lib64@/tools/lib@' \
     92        -e '/elf32_sparc -Y P,/s@/usr/lib@/tools/lib32@' \
     93        -e '/-dynamic-linker/s@ /lib@ /tools/lib@' ${file}
     94    fi
     95  fi
     96done
     97
     98# Create Patch
     99#
     100cd /usr/src
     101echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-pure64_specs-x.patch
     102echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-pure64_specs-x.patch
     103echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-pure64_specs-x.patch
     104echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> gcc-${VERSION}-pure64_specs-x.patch
     105echo "        the Pure LFS project." >> gcc-${VERSION}-pure64_specs-x.patch
     106echo "Upstream Status: Not Applied" >> gcc-${VERSION}-pure64_specs-x.patch
     107echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> gcc-${VERSION}-pure64_specs-x.patch
     108echo "" >> gcc-${VERSION}-pure64_specs-x.patch
     109diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-pure64_specs-x.patch
     110
     111# Cleanup Directory
     112#
     113rm -rf gcc-${VERSION} gcc-${VERSION}.orig
     114tar xvf gcc-${VERSION}.tar.bz2
     115cp -ar gcc-${VERSION} gcc-${VERSION}.orig
     116CURRENTDIR=$(pwd -P)
     117
     118# Modify the Data
     119#
     120cd /usr/src/gcc-${VERSION}
     121for file in $(find gcc/config -name "*.h"); do
     122  if [ "$(echo ${file} | grep -c bsd)" = "0" ]; then
     123    if [ "$(cat ${file} | grep -c DYNAMIC_LINKER)" != "0" ]; then
     124      echo "Modifying ${file}..."
     125      sed -i -e '/DYNAMIC_LINKER32/s@"/lib@"/lib32@' \
     126       -e '/DYNAMIC_LINKERN32/s@"/lib32@"/lib64@' \
     127       -e '/DYNAMIC_LINKER64/s@"/lib64@"/lib@' \
     128       -e '/DYNAMIC_LINKER/s@"/lib@"/lib@' ${file}
     129    fi
     130    if [ "$(cat ${file} | grep -c LINK_SPEC)" != "0" ]; then
     131      echo "Modifying ${file}..."
     132      sed -i -e '/elf64_sparc -Y P,/s@/usr/lib64@/usr/lib@' \
     133        -e '/elf32_sparc -Y P,/s@/usr/lib@/usr/lib32@' ${file}
     134    fi
     135  fi
     136done
     137
     138for file in $(find gcc/config -name "t-linux*"); do
     139  if [ "$(cat ${file} | grep -c MULTILIB_OSDIRNAMES)" != "0" ]; then
     140    echo "Modifying ${file}..."
     141    if [ "$(echo ${file} | grep -c mips)" != "0" ]; then
     142      sed -i -e 's@MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64@MULTILIB_OSDIRNAMES = ../lib64 ../lib32 ../lib@' \
     143        -e 's@MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64@MULTILIB_OSDIRNAMES = ../lib64 ../lib32 ../lib@' ${file}
     144    else
     145      sed -i -e 's@MULTILIB_OSDIRNAMES = ../lib64 ../lib@MULTILIB_OSDIRNAMES = ../lib ../lib32@' \
     146        -e 's@MULTILIB_OSDIRNAMES.= ../lib64 .@MULTILIB_OSDIRNAMES\t= ../lib $@' ${file}
     147    fi
     148  fi
     149done
     150
     151# Create Patch
     152#
     153cd /usr/src
     154echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-pure64-x.patch
     155echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-pure64-x.patch
     156echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-pure64-x.patch
     157echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> gcc-${VERSION}-pure64-x.patch
     158echo "        the Pure LFS project." >> gcc-${VERSION}-pure64-x.patch
     159echo "Upstream Status: Not Applied" >> gcc-${VERSION}-pure64-x.patch
     160echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> gcc-${VERSION}-pure64-x.patch
     161echo "" >> gcc-${VERSION}-pure64-x.patch
     162diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-pure64-x.patch
     163
    59164echo "Created /usr/src/gcc-${VERSION}-specs-x.patch."
     165echo "Created /usr/src/gcc-${VERSION}-pure64_specs-x.patch."
     166echo "Created /usr/src/gcc-${VERSION}-pure64-x.patch."
Note: See TracChangeset for help on using the changeset viewer.