diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-18 21:31:23 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-18 21:31:23 +0000 |
commit | 8018a2d5a057df8665d72ca99a1893b0653abde3 (patch) | |
tree | 2ec83030bed9f2b214503a0be716d3039d9ce4a4 /gcc | |
parent | fbe6447aae0eac343583a8ff12392e03c806744d (diff) | |
download | gcc-8018a2d5a057df8665d72ca99a1893b0653abde3.tar.gz |
2008-03-18 Basile Starynkevitch <basile@starynkevitch.net>
* melt-cc-script.prot: added generation of date & md5sum.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@133327 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog.melt | 3 | ||||
-rw-r--r-- | gcc/melt-cc-script.proto | 18 |
2 files changed, 19 insertions, 2 deletions
diff --git a/gcc/ChangeLog.melt b/gcc/ChangeLog.melt index 51d620dd594..3b01a595ac8 100644 --- a/gcc/ChangeLog.melt +++ b/gcc/ChangeLog.melt @@ -1,4 +1,7 @@ 2008-03-18 Basile Starynkevitch <basile@starynkevitch.net> + * melt-cc-script.prot: added generation of date & md5sum. + +2008-03-18 Basile Starynkevitch <basile@starynkevitch.net> * melt-cc-script.prot: new file. * Makefile.in: added install-melt-cc-script and built-melt-cc-script targets diff --git a/gcc/melt-cc-script.proto b/gcc/melt-cc-script.proto index 73b1991ec75..a143824a0b6 100644 --- a/gcc/melt-cc-script.proto +++ b/gcc/melt-cc-script.proto @@ -30,10 +30,24 @@ melt_headerdir=":MELT_HEADERDIR:" csource=$1 nakedynstuff=$2 +datf=`tempfile -p bdat` +if { -z "$datf" ]; then + datf=/tmp/bdat$$ +fi +# generate the temporary timestamp & md5s file +md5src=`md5sum $csource` + +trap "rm -f $datf.*" EXIT + +date "+const char basilys_compiled_timestamp[]=\"$csource %c\";" > $datf.c +echo "const char basilys_md5[]=\"$md5src\";" >> $datf.c case `uname` in Linux|SunOS|Solaris) - $melt_cc -fPIC -shared $melt_cflags -I "$melt_headerdir" $csource -o $makedynstuff.so;; + $melt_cc -fPIC -shared $melt_cflags -I "$melt_headerdir" $csource $datf.c -o $makedynstuff.so;; *) libtool --mode=compile -prefer-pic $melt_cc $csource -I "$melt_headerdir" -o $makedynstuff.lo; - libtool --mode=link -module $melt_cc $makedynstuff.lo -o $makedynstuff.la;; + libtool --mode=compile -prefer-pic $melt_cc $datf.c -o $datf.lo + libtool --mode=link -module $melt_cc $makedynstuff.lo $datf.lo -o $makedynstuff.la + rm -f $datf.* + ;; esac |