* fix ident patch script and i386/cprt0.as

(cherry picked from commit 61f559ff56)
This commit is contained in:
marcoonthegit 2022-06-18 13:46:48 +02:00
parent ae6945b120
commit d604cadab0
2 changed files with 11 additions and 16 deletions
rtl/freebsd/i386

View File

@ -24,14 +24,9 @@
#
# some typical values:
#
# freebsd 5.4 504000
# freebsd 6.3 (prerelease) : 603100
# freebsd 7.0 700055
# freebsd 8.0 800500 (-stable)
# FreeBSD 9.0 900044
# FreeBSD 11.0 1100122
# FreeBSD 11.1 1101001
# FreeBSD 12.1 1201000
# FreeBSD 12.1
# FreeBSD 13.1 1301000
.file "cprt0.as"
.ident "FreePascal 2.6.x/2.7.x series dynlinked to libc"
@ -44,7 +39,7 @@ abitag:
.long 4
.long 1
.string "FreeBSD"
.long 900044
.long 1201000
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string ""

View File

@ -1,7 +1,7 @@
#!/bin/sh
if [ "$#" -ne 1 ]
then
elfdump -n `which elfdump` |awk '/FreeBSD/{print $2}' >elfversion
elfdump -n `which elfdump` |awk '/FreeBSD/{print $2}'| head -n1 >elfversion
IDVERSION=`cat elfversion`
rm elfversion
else
@ -9,10 +9,10 @@ IDVERSION=$1
fi
echo Patching cprt0.as with version $IDVERSION
sed -I.sav -es/900044/$IDVERSION/ cprt0.as
sed -I.sav -es/900044/$IDVERSION/ dllprt0.as
sed -I.sav -es/900044/$IDVERSION/ prt0.as
sed -I.sav -es/900044/$IDVERSION/ gprt0.as
sed -I.sav -es/900044/$IDVERSION/ si_c.inc
sed -I.sav -es/900044/$IDVERSION/ si_prc.inc
sed -I.sav -es/1201000/$IDVERSION/ cprt0.as
sed -I.sav -es/1201000/$IDVERSION/ dllprt0.as
sed -I.sav -es/1201000/$IDVERSION/ prt0.as
sed -I.sav -es/1201000/$IDVERSION/ gprt0.as
sed -I.sav -es/1201000/$IDVERSION/ si_c.inc
sed -I.sav -es/1201000/$IDVERSION/ si_prc.inc