This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: rfc: new libgcc build mechanism
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: rfc: new libgcc build mechanism
- From: Alexandre Oliva <aoliva at cygnus dot com>
- Date: 10 May 2000 10:29:30 -0300
- Cc: gcc-patches at gcc dot gnu dot org
- Organization: Cygnus Solutions, a Red Hat Company
- References: <20000502003336.A12161@cygnus.com><20000503112753.A14500@cygnus.com>
On May 3, 2000, Richard Henderson <rth@cygnus.com> wrote:
> I've checked in this version, which differs from the original
> in that I've tried to make mklibgcc.in less unreadable.
It broke IRIX6. The problem is that one of the multilib directories
is named -mabi=64, and when `make' sees a line like:
mabi=64/libgcc: ; mkdir mabi=64/libgcc
It happily sets the `mabi' make macro to `64/libgcc: ; mkdir ...'.
Here's a patch that works around this annoyance. At first, I had
thought of renaming the IRIX6 directories, but I figured it could be
too much of a backward-compatibility problem, so I ended up arranging
for the generated Makefile to accommodate the `=' sign. Ok to
install?
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@cygnus.com>
* mklibgcc.in (EQ): Define it to an equal sign in the Makefile,
and replace any occurrences of `=' in multilib dirs with `$(EQ)'.
Index: gcc/mklibgcc.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/mklibgcc.in,v
retrieving revision 1.3
diff -u -r1.3 mklibgcc.in
--- gcc/mklibgcc.in 2000/05/03 23:56:03 1.3
+++ gcc/mklibgcc.in 2000/05/10 13:23:27
@@ -27,6 +27,7 @@
# Make needs VPATH to be literal.
echo 'srcdir = @srcdir@'
echo 'VPATH = @srcdir@'
+echo 'EQ = ='
echo
# Detect gcc as OLDCC. This indicates a target for which LIB1FUNCS
@@ -125,7 +126,7 @@
Xlibgcc1-asm.a)
for name in $LIB1ASMFUNCS; do
for ml in $MULTILIBS; do
- dir=`echo ${ml} | sed -e 's/;.*$//'`
+ dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
out="libgcc/${dir}/${name}${objext}"
@@ -173,7 +174,7 @@
for name in $LIB2FUNCS; do
for ml in $MULTILIBS; do
- dir=`echo ${ml} | sed -e 's/;.*$//'`
+ dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
out="libgcc/${dir}/${name}${objext}"
@@ -186,7 +187,7 @@
for name in $LIB2FUNCS_EH; do
for ml in $MULTILIBS; do
- dir=`echo ${ml} | sed -e 's/;.*$//'`
+ dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
out="libgcc/${dir}/${name}${objext}"
@@ -200,7 +201,7 @@
if [ "$FPBIT" ]; then
for name in $FPBIT_FUNCS; do
for ml in $MULTILIBS; do
- dir=`echo ${ml} | sed -e 's/;.*$//'`
+ dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
out="libgcc/${dir}/${name}${objext}"
@@ -215,7 +216,7 @@
if [ "$DPBIT" ]; then
for name in $DPBIT_FUNCS; do
for ml in $MULTILIBS; do
- dir=`echo ${ml} | sed -e 's/;.*$//'`
+ dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
out="libgcc/${dir}/${name}${objext}"
@@ -237,7 +238,7 @@
lastout=""
for ml in $MULTILIBS; do
- dir=`echo ${ml} | sed -e 's/;.*$//'`
+ dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
out="libgcc/${dir}/${f}"
@@ -254,7 +255,7 @@
done
else
for ml in $MULTILIBS; do
- dir=`echo ${ml} | sed -e 's/;.*$//'`
+ dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
out="libgcc/${dir}/${oname}${objext}"
if [ ${name}.asm = ${file} ]; then
@@ -269,7 +270,7 @@
done
for ml in $MULTILIBS; do
- dir=`echo ${ml} | sed -e 's/;.*$//'`
+ dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
libgcc_objs=""
for o in $libgcc1_objs; do
@@ -296,7 +297,7 @@
all=""
for ml in $MULTILIBS; do
- dir=`echo ${ml} | sed -e 's/;.*$//'`
+ dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
if [ $dir = . ]; then
echo "libgcc:; mkdir libgcc"
all="$all libgcc"
@@ -311,7 +312,7 @@
for f in $EXTRA_MULTILIB_PARTS; do
lastout=""
for ml in $MULTILIBS; do
- dir=`echo ${ml} | sed -e 's/;.*$//'`
+ dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
out="$dir/$f"
--
Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me