Skip to content

Commit e77b80a

Browse files
committed
gcc: change libiberty rebuilds to not use hardcoded line nos
1 parent 23d502b commit e77b80a

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

steps/gcc-10.5.0/pass1.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ src_prepare() {
134134

135135
# Regenerate crc table in libiberty/crc32.c
136136
pushd libiberty
137-
sed -n -e '38,65p' crc32.c > crcgen.c
137+
sed -n '/^ #include <stdio.h>/,/^ \}$/p' crc32.c > crcgen.c
138138
gcc -o crcgen crcgen.c
139-
head -n 69 crc32.c > crc32.c.new
139+
sed '/crc_v3\.txt/{n; q}' crc32.c > crc32.c.new
140140
./crcgen >> crc32.c.new
141-
tail -n +138 crc32.c >> crc32.c.new
141+
sed '1,/^};$/d' crc32.c >> crc32.c.new
142142
mv crc32.c.new crc32.c
143-
popd
143+
popd ..
144144

145145
# Regenerate decDPD.h
146146
rm libdecnumber/decDPD.h

steps/gcc-13.3.0/pass1.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,13 @@ src_prepare() {
170170

171171
# Regenerate crc table in libiberty/crc32.c
172172
pushd libiberty
173-
sed -n -e '38,65p' crc32.c > crcgen.c
173+
sed -n '/^ #include <stdio.h>/,/^ \}$/p' crc32.c > crcgen.c
174174
gcc -o crcgen crcgen.c
175-
head -n 69 crc32.c > crc32.c.new
175+
sed '/crc_v3\.txt/{n; q}' crc32.c > crc32.c.new
176176
./crcgen >> crc32.c.new
177-
tail -n +138 crc32.c >> crc32.c.new
177+
sed '1,/^};$/d' crc32.c >> crc32.c.new
178178
mv crc32.c.new crc32.c
179-
popd
179+
popd ..
180180

181181
# Regenerate decDPD.h
182182
rm libdecnumber/decDPD.h

steps/gcc-4.7.4/pass1.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,13 @@ src_prepare() {
146146

147147
# Regenerate crc table in libiberty/crc32.c
148148
pushd libiberty
149-
sed -n -e '39,66p' crc32.c > crcgen.c
149+
sed -n '/^ #include <stdio.h>/,/^ \}$/p' crc32.c > crcgen.c
150150
gcc -o crcgen crcgen.c
151-
head -n 70 crc32.c > crc32.c.new
151+
sed '/crc_v3\.txt/{n; q}' crc32.c > crc32.c.new
152152
./crcgen >> crc32.c.new
153-
tail -n +139 crc32.c >> crc32.c.new
153+
sed '1,/^};$/d' crc32.c >> crc32.c.new
154154
mv crc32.c.new crc32.c
155-
popd
155+
popd ..
156156

157157
# Regenerate decDPD.h
158158
rm libdecnumber/decDPD.h

0 commit comments

Comments
 (0)