diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-18 19:57:49 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-18 19:57:49 +0000 |
commit | fbe6447aae0eac343583a8ff12392e03c806744d (patch) | |
tree | 37ac608f75f2361702cd71522786d8291b6d2065 /gcc/melt-cc-script.proto | |
parent | 29ba6d4af950d9ef0569c51692a9d2e4fa538857 (diff) | |
download | gcc-fbe6447aae0eac343583a8ff12392e03c806744d.tar.gz |
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
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@133321 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/melt-cc-script.proto')
-rw-r--r-- | gcc/melt-cc-script.proto | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gcc/melt-cc-script.proto b/gcc/melt-cc-script.proto new file mode 100644 index 00000000000..73b1991ec75 --- /dev/null +++ b/gcc/melt-cc-script.proto @@ -0,0 +1,39 @@ +#! /bin/sh +#:! line starting with #:! are removed from this melt-cc-script.proto +#:! -*- bash -*- +# Copyright (C) 2008 Free Software Foundation, Inc. +# Contributed by Basile Starynkevitch <basile@starynkevitch.net> +# +# This file :MELT_SCRIPT: is part of GCC. +# +# GCC is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GCC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# <http://www.gnu.org/licenses/>. + +#:! :MELT_CC: & :MELT_CFLAGS: &:MELT_HEADERDIR: are substituted in the first 30 lines +melt_cc=":MELT_CC:" +melt_cflags=":MELT_CFLAGS:" +melt_headerdir=":MELT_HEADERDIR:" + +## script invoked by cc1 with two arguments : the generated C source to compile +## and the naked (without suffix) dynamically-loadable stuff to generate + +csource=$1 +nakedynstuff=$2 +case `uname` in +Linux|SunOS|Solaris) + $melt_cc -fPIC -shared $melt_cflags -I "$melt_headerdir" $csource -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;; +esac |