- Timestamp:
- Jan 25, 2009, 1:06:18 AM (16 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 49073ef
- Parents:
- 5ec7db05
- Location:
- scripts/patch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/patch/gcc-patch.sh
r5ec7db05 r0804c00 18 18 cd /usr/src 19 19 if ! [ -e gcc-${VERSION}.tar.bz2 ]; then 20 wget ftp:// ftp.gnu.org/gnu/gcc/gcc-${VERSION}/gcc-${VERSION}.tar.bz220 wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-${VERSION}/gcc-${VERSION}.tar.bz2 21 21 fi 22 22 -
scripts/patch/gcc-specs-patch.sh
r5ec7db05 r0804c00 18 18 cd /usr/src 19 19 if ! [ -e gcc-${VERSION}.tar.bz2 ]; then 20 wget ftp:// ftp.gnu.org/gnu/gcc/gcc-${VERSION}/gcc-${VERSION}.tar.bz220 wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-${VERSION}/gcc-${VERSION}.tar.bz2 21 21 fi 22 22 … … 41 41 sed -i '/-dynamic-linker/s@ /lib@ /tools/lib@' ${file} 42 42 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 43 49 fi 44 50 done … … 57 63 echo "" >> gcc-${VERSION}-specs-x.patch 58 64 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-specs-x.patch 65 66 # Cleanup Directory 67 # 68 rm -rf gcc-${VERSION} gcc-${VERSION}.orig 69 tar xvf gcc-${VERSION}.tar.bz2 70 cp -ar gcc-${VERSION} gcc-${VERSION}.orig 71 CURRENTDIR=$(pwd -P) 72 73 # Modify the Data 74 # 75 cd /usr/src/gcc-${VERSION} 76 for 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 96 done 97 98 # Create Patch 99 # 100 cd /usr/src 101 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-pure64_specs-x.patch 102 echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-pure64_specs-x.patch 103 echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-pure64_specs-x.patch 104 echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> gcc-${VERSION}-pure64_specs-x.patch 105 echo " the Pure LFS project." >> gcc-${VERSION}-pure64_specs-x.patch 106 echo "Upstream Status: Not Applied" >> gcc-${VERSION}-pure64_specs-x.patch 107 echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> gcc-${VERSION}-pure64_specs-x.patch 108 echo "" >> gcc-${VERSION}-pure64_specs-x.patch 109 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-pure64_specs-x.patch 110 111 # Cleanup Directory 112 # 113 rm -rf gcc-${VERSION} gcc-${VERSION}.orig 114 tar xvf gcc-${VERSION}.tar.bz2 115 cp -ar gcc-${VERSION} gcc-${VERSION}.orig 116 CURRENTDIR=$(pwd -P) 117 118 # Modify the Data 119 # 120 cd /usr/src/gcc-${VERSION} 121 for 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 136 done 137 138 for 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 149 done 150 151 # Create Patch 152 # 153 cd /usr/src 154 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-pure64-x.patch 155 echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-pure64-x.patch 156 echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-pure64-x.patch 157 echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> gcc-${VERSION}-pure64-x.patch 158 echo " the Pure LFS project." >> gcc-${VERSION}-pure64-x.patch 159 echo "Upstream Status: Not Applied" >> gcc-${VERSION}-pure64-x.patch 160 echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> gcc-${VERSION}-pure64-x.patch 161 echo "" >> gcc-${VERSION}-pure64-x.patch 162 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-pure64-x.patch 163 59 164 echo "Created /usr/src/gcc-${VERSION}-specs-x.patch." 165 echo "Created /usr/src/gcc-${VERSION}-pure64_specs-x.patch." 166 echo "Created /usr/src/gcc-${VERSION}-pure64-x.patch."
Note:
See TracChangeset
for help on using the changeset viewer.